From 2d96f65276d6ca1a89fbc6a69d3dec84cea6229b Mon Sep 17 00:00:00 2001 From: VRCCat Date: Sun, 4 Dec 2022 22:35:37 +0000 Subject: [PATCH] Upgrade C# SDK to spec 1.9.1 --- .openapi-generator/FILES | 76 +- .openapi-generator/VERSION | 2 +- docs/APIConfig.md | 6 +- ...nouncement.md => APIConfigAnnouncement.md} | 2 +- ...URLList.md => APIConfigDownloadURLList.md} | 2 +- .../{APIEventConfig.md => APIConfigEvents.md} | 2 +- docs/AddGroupGalleryImageRequest.md | 10 + docs/AuthenticationApi.md | 230 +- docs/Avatar.md | 2 +- docs/AvatarsApi.md | 403 +- docs/BanGroupMemberRequest.md | 10 + docs/CreateAvatarRequest.md | 2 +- docs/CreateFileRequest.md | 2 +- docs/CreateGroupAnnouncementRequest.md | 13 + docs/CreateGroupGalleryRequest.md | 16 + docs/CreateGroupInviteRequest.md | 11 + docs/CreateGroupRequest.md | 17 + docs/CreateGroupRoleRequest.md | 14 + docs/CreateWorldRequest.md | 2 +- docs/CurrentUser.md | 2 +- docs/EconomyApi.md | 154 +- docs/Favorite.md | 2 +- docs/FavoriteGroup.md | 2 +- docs/FavoritesApi.md | 314 +- docs/File.md | 4 +- docs/FilesApi.md | 390 +- docs/FriendsApi.md | 179 +- docs/Group.md | 34 + docs/GroupAnnouncement.md | 18 + docs/GroupAuditLogEntry.md | 18 + docs/GroupGallery.md | 19 + docs/GroupGalleryImage.md | 19 + docs/GroupJoinState.md | 9 + docs/GroupLimitedMember.md | 13 + docs/GroupMember.md | 22 + docs/GroupMemberLimitedUser.md | 14 + docs/GroupMemberStatus.md | 9 + docs/GroupMyMember.md | 22 + docs/GroupPermission.md | 15 + docs/GroupPrivacy.md | 9 + docs/GroupRole.md | 21 + docs/GroupRoleTemplate.md | 9 + docs/GroupUserVisibility.md | 9 + docs/GroupsApi.md | 3077 +++++++ docs/InfoPush.md | 2 +- docs/InstancesApi.md | 153 +- docs/InviteApi.md | 325 +- docs/LimitedWorld.md | 4 +- docs/Notification.md | 5 +- docs/NotificationsApi.md | 178 +- docs/OrderOption.md | 9 + docs/PaginatedGroupAuditLogEntryList.md | 12 + docs/PermissionsApi.md | 66 +- docs/PlayermoderationApi.md | 202 +- docs/RespondGroupJoinRequest.md | 10 + docs/SortOption.md | 9 + docs/SystemApi.md | 227 +- docs/UpdateAvatarRequest.md | 2 +- docs/UpdateGroupGalleryRequest.md | 16 + docs/UpdateGroupMemberRequest.md | 12 + docs/UpdateGroupRequest.md | 19 + docs/UpdateGroupRoleRequest.md | 14 + docs/UpdateUserRequest.md | 2 +- docs/UpdateWorldRequest.md | 2 +- docs/User.md | 2 +- docs/UsersApi.md | 306 +- docs/World.md | 2 +- docs/WorldsApi.md | 626 +- openapitools.json | 2 +- src/README.md | 267 + src/VRChat.API/Api/AuthenticationApi.cs | 479 +- src/VRChat.API/Api/AvatarsApi.cs | 801 +- src/VRChat.API/Api/EconomyApi.cs | 365 +- src/VRChat.API/Api/FavoritesApi.cs | 692 +- src/VRChat.API/Api/FilesApi.cs | 966 +-- src/VRChat.API/Api/FriendsApi.cs | 405 +- src/VRChat.API/Api/GroupsApi.cs | 7377 +++++++++++++++++ src/VRChat.API/Api/InstancesApi.cs | 400 +- src/VRChat.API/Api/InviteApi.cs | 860 +- src/VRChat.API/Api/NotificationsApi.cs | 385 +- src/VRChat.API/Api/PermissionsApi.cs | 150 +- src/VRChat.API/Api/PlayermoderationApi.cs | 430 +- src/VRChat.API/Api/SystemApi.cs | 455 +- src/VRChat.API/Api/UsersApi.cs | 680 +- src/VRChat.API/Api/WorldsApi.cs | 1217 +-- src/VRChat.API/Client/ApiClient.cs | 242 +- src/VRChat.API/Client/ClientUtils.cs | 73 +- src/VRChat.API/Client/Configuration.cs | 110 +- src/VRChat.API/Client/GlobalConfiguration.cs | 2 +- .../Client/IReadableConfiguration.cs | 14 - src/VRChat.API/Client/RequestOptions.cs | 14 +- src/VRChat.API/Client/RetryConfiguration.cs | 16 +- src/VRChat.API/Model/APIConfig.cs | 587 +- ...nouncement.cs => APIConfigAnnouncement.cs} | 53 +- ...URLList.cs => APIConfigDownloadURLList.cs} | 66 +- .../{APIEventConfig.cs => APIConfigEvents.cs} | 69 +- src/VRChat.API/Model/APIHealth.cs | 29 +- src/VRChat.API/Model/AddFavoriteRequest.cs | 27 +- .../Model/AddGroupGalleryImageRequest.cs | 141 + src/VRChat.API/Model/Avatar.cs | 153 +- .../Model/AvatarUnityPackageUrlObject.cs | 9 +- src/VRChat.API/Model/BanGroupMemberRequest.cs | 135 + src/VRChat.API/Model/CreateAvatarRequest.cs | 60 +- src/VRChat.API/Model/CreateFileRequest.cs | 40 +- .../Model/CreateFileVersionRequest.cs | 28 +- .../Model/CreateGroupAnnouncementRequest.cs | 202 + .../Model/CreateGroupGalleryRequest.cs | 247 + .../Model/CreateGroupInviteRequest.cs | 149 + src/VRChat.API/Model/CreateGroupRequest.cs | 282 + .../Model/CreateGroupRoleRequest.cs | 188 + src/VRChat.API/Model/CreateWorldRequest.cs | 93 +- src/VRChat.API/Model/CurrentUser.cs | 304 +- src/VRChat.API/Model/DynamicContentRow.cs | 74 +- src/VRChat.API/Model/Error.cs | 9 +- src/VRChat.API/Model/Favorite.cs | 41 +- src/VRChat.API/Model/FavoriteGroup.cs | 78 +- src/VRChat.API/Model/File.cs | 77 +- src/VRChat.API/Model/FileData.cs | 63 +- src/VRChat.API/Model/FileUploadURL.cs | 16 +- src/VRChat.API/Model/FileVersion.cs | 35 +- .../Model/FileVersionUploadStatus.cs | 57 +- .../Model/FinishFileDataUploadRequest.cs | 35 +- src/VRChat.API/Model/FriendStatus.cs | 11 +- src/VRChat.API/Model/Group.cs | 525 ++ src/VRChat.API/Model/GroupAnnouncement.cs | 275 + src/VRChat.API/Model/GroupAuditLogEntry.cs | 273 + src/VRChat.API/Model/GroupGallery.cs | 293 + src/VRChat.API/Model/GroupGalleryImage.cs | 297 + src/VRChat.API/Model/GroupJoinState.cs | 60 + src/VRChat.API/Model/GroupLimitedMember.cs | 186 + src/VRChat.API/Model/GroupMember.cs | 333 + .../Model/GroupMemberLimitedUser.cs | 174 + src/VRChat.API/Model/GroupMemberStatus.cs | 60 + src/VRChat.API/Model/GroupMyMember.cs | 328 + src/VRChat.API/Model/GroupPermission.cs | 190 + src/VRChat.API/Model/GroupPrivacy.cs | 48 + src/VRChat.API/Model/GroupRole.cs | 306 + src/VRChat.API/Model/GroupRoleTemplate.cs | 60 + src/VRChat.API/Model/GroupUserVisibility.cs | 54 + src/VRChat.API/Model/InfoPush.cs | 80 +- src/VRChat.API/Model/InfoPushData.cs | 41 +- src/VRChat.API/Model/InfoPushDataArticle.cs | 9 +- .../Model/InfoPushDataArticleContent.cs | 17 +- src/VRChat.API/Model/InfoPushDataClickable.cs | 13 +- src/VRChat.API/Model/Instance.cs | 148 +- src/VRChat.API/Model/InstancePlatforms.cs | 17 +- .../Model/InstanceShortNameResponse.cs | 22 +- src/VRChat.API/Model/InviteMessage.cs | 51 +- src/VRChat.API/Model/InviteRequest.cs | 20 +- src/VRChat.API/Model/InviteResponse.cs | 13 +- src/VRChat.API/Model/License.cs | 35 +- src/VRChat.API/Model/LicenseGroup.cs | 43 +- src/VRChat.API/Model/LimitedUnityPackage.cs | 25 +- src/VRChat.API/Model/LimitedUser.cs | 121 +- src/VRChat.API/Model/LimitedWorld.cs | 176 +- src/VRChat.API/Model/ModerateUserRequest.cs | 18 +- src/VRChat.API/Model/Notification.cs | 95 +- src/VRChat.API/Model/OrderOption.cs | 48 + .../Model/PaginatedGroupAuditLogEntryList.cs | 156 + src/VRChat.API/Model/PastDisplayName.cs | 22 +- src/VRChat.API/Model/Permission.cs | 38 +- src/VRChat.API/Model/PlayerModeration.cs | 64 +- src/VRChat.API/Model/RequestInviteRequest.cs | 11 +- .../Model/RespondGroupJoinRequest.cs | 125 + src/VRChat.API/Model/Response.cs | 17 +- src/VRChat.API/Model/SentNotification.cs | 68 +- src/VRChat.API/Model/SortOption.cs | 144 + src/VRChat.API/Model/Subscription.cs | 48 +- src/VRChat.API/Model/Success.cs | 9 +- src/VRChat.API/Model/Transaction.cs | 58 +- src/VRChat.API/Model/TransactionAgreement.cs | 143 +- src/VRChat.API/Model/TransactionSteamInfo.cs | 56 +- .../Model/TransactionSteamWalletInfo.cs | 47 +- src/VRChat.API/Model/TwoFactorAuthCode.cs | 14 +- src/VRChat.API/Model/UnityPackage.cs | 66 +- src/VRChat.API/Model/UpdateAvatarRequest.cs | 50 +- .../Model/UpdateFavoriteGroupRequest.cs | 15 +- .../Model/UpdateGroupGalleryRequest.cs | 238 + .../Model/UpdateGroupMemberRequest.cs | 153 + src/VRChat.API/Model/UpdateGroupRequest.cs | 309 + .../Model/UpdateGroupRoleRequest.cs | 186 + .../Model/UpdateInviteMessageRequest.cs | 14 +- src/VRChat.API/Model/UpdateUserRequest.cs | 46 +- src/VRChat.API/Model/UpdateWorldRequest.cs | 76 +- src/VRChat.API/Model/User.cs | 198 +- src/VRChat.API/Model/UserExists.cs | 7 +- src/VRChat.API/Model/UserSubscription.cs | 98 +- src/VRChat.API/Model/Verify2FAResult.cs | 7 +- src/VRChat.API/Model/VerifyAuthTokenResult.cs | 18 +- src/VRChat.API/Model/World.cs | 217 +- src/VRChat.API/Model/WorldMetadata.cs | 23 +- src/VRChat.API/Model/WorldPublishStatus.cs | 7 +- src/VRChat.API/VRChat.API.csproj | 16 +- 193 files changed, 23146 insertions(+), 11243 deletions(-) rename docs/{PublicAnnouncement.md => APIConfigAnnouncement.md} (90%) rename docs/{DownloadURLList.md => APIConfigDownloadURLList.md} (92%) rename docs/{APIEventConfig.md => APIConfigEvents.md} (95%) create mode 100644 docs/AddGroupGalleryImageRequest.md create mode 100644 docs/BanGroupMemberRequest.md create mode 100644 docs/CreateGroupAnnouncementRequest.md create mode 100644 docs/CreateGroupGalleryRequest.md create mode 100644 docs/CreateGroupInviteRequest.md create mode 100644 docs/CreateGroupRequest.md create mode 100644 docs/CreateGroupRoleRequest.md create mode 100644 docs/Group.md create mode 100644 docs/GroupAnnouncement.md create mode 100644 docs/GroupAuditLogEntry.md create mode 100644 docs/GroupGallery.md create mode 100644 docs/GroupGalleryImage.md create mode 100644 docs/GroupJoinState.md create mode 100644 docs/GroupLimitedMember.md create mode 100644 docs/GroupMember.md create mode 100644 docs/GroupMemberLimitedUser.md create mode 100644 docs/GroupMemberStatus.md create mode 100644 docs/GroupMyMember.md create mode 100644 docs/GroupPermission.md create mode 100644 docs/GroupPrivacy.md create mode 100644 docs/GroupRole.md create mode 100644 docs/GroupRoleTemplate.md create mode 100644 docs/GroupUserVisibility.md create mode 100644 docs/GroupsApi.md create mode 100644 docs/OrderOption.md create mode 100644 docs/PaginatedGroupAuditLogEntryList.md create mode 100644 docs/RespondGroupJoinRequest.md create mode 100644 docs/SortOption.md create mode 100644 docs/UpdateGroupGalleryRequest.md create mode 100644 docs/UpdateGroupMemberRequest.md create mode 100644 docs/UpdateGroupRequest.md create mode 100644 docs/UpdateGroupRoleRequest.md create mode 100644 src/README.md create mode 100644 src/VRChat.API/Api/GroupsApi.cs rename src/VRChat.API/Model/{PublicAnnouncement.cs => APIConfigAnnouncement.cs} (76%) rename src/VRChat.API/Model/{DownloadURLList.cs => APIConfigDownloadURLList.cs} (76%) rename src/VRChat.API/Model/{APIEventConfig.cs => APIConfigEvents.cs} (79%) create mode 100644 src/VRChat.API/Model/AddGroupGalleryImageRequest.cs create mode 100644 src/VRChat.API/Model/BanGroupMemberRequest.cs create mode 100644 src/VRChat.API/Model/CreateGroupAnnouncementRequest.cs create mode 100644 src/VRChat.API/Model/CreateGroupGalleryRequest.cs create mode 100644 src/VRChat.API/Model/CreateGroupInviteRequest.cs create mode 100644 src/VRChat.API/Model/CreateGroupRequest.cs create mode 100644 src/VRChat.API/Model/CreateGroupRoleRequest.cs create mode 100644 src/VRChat.API/Model/Group.cs create mode 100644 src/VRChat.API/Model/GroupAnnouncement.cs create mode 100644 src/VRChat.API/Model/GroupAuditLogEntry.cs create mode 100644 src/VRChat.API/Model/GroupGallery.cs create mode 100644 src/VRChat.API/Model/GroupGalleryImage.cs create mode 100644 src/VRChat.API/Model/GroupJoinState.cs create mode 100644 src/VRChat.API/Model/GroupLimitedMember.cs create mode 100644 src/VRChat.API/Model/GroupMember.cs create mode 100644 src/VRChat.API/Model/GroupMemberLimitedUser.cs create mode 100644 src/VRChat.API/Model/GroupMemberStatus.cs create mode 100644 src/VRChat.API/Model/GroupMyMember.cs create mode 100644 src/VRChat.API/Model/GroupPermission.cs create mode 100644 src/VRChat.API/Model/GroupPrivacy.cs create mode 100644 src/VRChat.API/Model/GroupRole.cs create mode 100644 src/VRChat.API/Model/GroupRoleTemplate.cs create mode 100644 src/VRChat.API/Model/GroupUserVisibility.cs create mode 100644 src/VRChat.API/Model/OrderOption.cs create mode 100644 src/VRChat.API/Model/PaginatedGroupAuditLogEntryList.cs create mode 100644 src/VRChat.API/Model/RespondGroupJoinRequest.cs create mode 100644 src/VRChat.API/Model/SortOption.cs create mode 100644 src/VRChat.API/Model/UpdateGroupGalleryRequest.cs create mode 100644 src/VRChat.API/Model/UpdateGroupMemberRequest.cs create mode 100644 src/VRChat.API/Model/UpdateGroupRequest.cs create mode 100644 src/VRChat.API/Model/UpdateGroupRoleRequest.cs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d664110b..2c6276b7 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,21 +1,29 @@ .gitignore appveyor.yml docs/APIConfig.md -docs/APIEventConfig.md +docs/APIConfigAnnouncement.md +docs/APIConfigDownloadURLList.md +docs/APIConfigEvents.md docs/APIHealth.md docs/AddFavoriteRequest.md +docs/AddGroupGalleryImageRequest.md docs/AuthenticationApi.md docs/Avatar.md docs/AvatarUnityPackageUrlObject.md docs/AvatarsApi.md +docs/BanGroupMemberRequest.md docs/CreateAvatarRequest.md docs/CreateFileRequest.md docs/CreateFileVersionRequest.md +docs/CreateGroupAnnouncementRequest.md +docs/CreateGroupGalleryRequest.md +docs/CreateGroupInviteRequest.md +docs/CreateGroupRequest.md +docs/CreateGroupRoleRequest.md docs/CreateWorldRequest.md docs/CurrentUser.md docs/DeploymentGroup.md docs/DeveloperType.md -docs/DownloadURLList.md docs/DynamicContentRow.md docs/EconomyApi.md docs/Error.md @@ -34,6 +42,23 @@ docs/FilesApi.md docs/FinishFileDataUploadRequest.md docs/FriendStatus.md docs/FriendsApi.md +docs/Group.md +docs/GroupAnnouncement.md +docs/GroupAuditLogEntry.md +docs/GroupGallery.md +docs/GroupGalleryImage.md +docs/GroupJoinState.md +docs/GroupLimitedMember.md +docs/GroupMember.md +docs/GroupMemberLimitedUser.md +docs/GroupMemberStatus.md +docs/GroupMyMember.md +docs/GroupPermission.md +docs/GroupPrivacy.md +docs/GroupRole.md +docs/GroupRoleTemplate.md +docs/GroupUserVisibility.md +docs/GroupsApi.md docs/InfoPush.md docs/InfoPushData.md docs/InfoPushDataArticle.md @@ -61,18 +86,21 @@ docs/ModerateUserRequest.md docs/Notification.md docs/NotificationType.md docs/NotificationsApi.md +docs/OrderOption.md +docs/PaginatedGroupAuditLogEntryList.md docs/PastDisplayName.md docs/Permission.md docs/PermissionsApi.md docs/PlayerModeration.md docs/PlayerModerationType.md docs/PlayermoderationApi.md -docs/PublicAnnouncement.md docs/Region.md docs/ReleaseStatus.md docs/RequestInviteRequest.md +docs/RespondGroupJoinRequest.md docs/Response.md docs/SentNotification.md +docs/SortOption.md docs/Subscription.md docs/SubscriptionPeriod.md docs/Success.md @@ -86,6 +114,10 @@ docs/TwoFactorAuthCode.md docs/UnityPackage.md docs/UpdateAvatarRequest.md docs/UpdateFavoriteGroupRequest.md +docs/UpdateGroupGalleryRequest.md +docs/UpdateGroupMemberRequest.md +docs/UpdateGroupRequest.md +docs/UpdateGroupRoleRequest.md docs/UpdateInviteMessageRequest.md docs/UpdateUserRequest.md docs/UpdateWorldRequest.md @@ -108,6 +140,7 @@ src/VRChat.API/Api/EconomyApi.cs src/VRChat.API/Api/FavoritesApi.cs src/VRChat.API/Api/FilesApi.cs src/VRChat.API/Api/FriendsApi.cs +src/VRChat.API/Api/GroupsApi.cs src/VRChat.API/Api/InstancesApi.cs src/VRChat.API/Api/InviteApi.cs src/VRChat.API/Api/NotificationsApi.cs @@ -133,20 +166,28 @@ src/VRChat.API/Client/OpenAPIDateConverter.cs src/VRChat.API/Client/RequestOptions.cs src/VRChat.API/Client/RetryConfiguration.cs src/VRChat.API/Model/APIConfig.cs -src/VRChat.API/Model/APIEventConfig.cs +src/VRChat.API/Model/APIConfigAnnouncement.cs +src/VRChat.API/Model/APIConfigDownloadURLList.cs +src/VRChat.API/Model/APIConfigEvents.cs src/VRChat.API/Model/APIHealth.cs src/VRChat.API/Model/AbstractOpenAPISchema.cs src/VRChat.API/Model/AddFavoriteRequest.cs +src/VRChat.API/Model/AddGroupGalleryImageRequest.cs src/VRChat.API/Model/Avatar.cs src/VRChat.API/Model/AvatarUnityPackageUrlObject.cs +src/VRChat.API/Model/BanGroupMemberRequest.cs src/VRChat.API/Model/CreateAvatarRequest.cs src/VRChat.API/Model/CreateFileRequest.cs src/VRChat.API/Model/CreateFileVersionRequest.cs +src/VRChat.API/Model/CreateGroupAnnouncementRequest.cs +src/VRChat.API/Model/CreateGroupGalleryRequest.cs +src/VRChat.API/Model/CreateGroupInviteRequest.cs +src/VRChat.API/Model/CreateGroupRequest.cs +src/VRChat.API/Model/CreateGroupRoleRequest.cs src/VRChat.API/Model/CreateWorldRequest.cs src/VRChat.API/Model/CurrentUser.cs src/VRChat.API/Model/DeploymentGroup.cs src/VRChat.API/Model/DeveloperType.cs -src/VRChat.API/Model/DownloadURLList.cs src/VRChat.API/Model/DynamicContentRow.cs src/VRChat.API/Model/Error.cs src/VRChat.API/Model/Favorite.cs @@ -161,6 +202,22 @@ src/VRChat.API/Model/FileVersion.cs src/VRChat.API/Model/FileVersionUploadStatus.cs src/VRChat.API/Model/FinishFileDataUploadRequest.cs src/VRChat.API/Model/FriendStatus.cs +src/VRChat.API/Model/Group.cs +src/VRChat.API/Model/GroupAnnouncement.cs +src/VRChat.API/Model/GroupAuditLogEntry.cs +src/VRChat.API/Model/GroupGallery.cs +src/VRChat.API/Model/GroupGalleryImage.cs +src/VRChat.API/Model/GroupJoinState.cs +src/VRChat.API/Model/GroupLimitedMember.cs +src/VRChat.API/Model/GroupMember.cs +src/VRChat.API/Model/GroupMemberLimitedUser.cs +src/VRChat.API/Model/GroupMemberStatus.cs +src/VRChat.API/Model/GroupMyMember.cs +src/VRChat.API/Model/GroupPermission.cs +src/VRChat.API/Model/GroupPrivacy.cs +src/VRChat.API/Model/GroupRole.cs +src/VRChat.API/Model/GroupRoleTemplate.cs +src/VRChat.API/Model/GroupUserVisibility.cs src/VRChat.API/Model/InfoPush.cs src/VRChat.API/Model/InfoPushData.cs src/VRChat.API/Model/InfoPushDataArticle.cs @@ -185,16 +242,19 @@ src/VRChat.API/Model/MIMEType.cs src/VRChat.API/Model/ModerateUserRequest.cs src/VRChat.API/Model/Notification.cs src/VRChat.API/Model/NotificationType.cs +src/VRChat.API/Model/OrderOption.cs +src/VRChat.API/Model/PaginatedGroupAuditLogEntryList.cs src/VRChat.API/Model/PastDisplayName.cs src/VRChat.API/Model/Permission.cs src/VRChat.API/Model/PlayerModeration.cs src/VRChat.API/Model/PlayerModerationType.cs -src/VRChat.API/Model/PublicAnnouncement.cs src/VRChat.API/Model/Region.cs src/VRChat.API/Model/ReleaseStatus.cs src/VRChat.API/Model/RequestInviteRequest.cs +src/VRChat.API/Model/RespondGroupJoinRequest.cs src/VRChat.API/Model/Response.cs src/VRChat.API/Model/SentNotification.cs +src/VRChat.API/Model/SortOption.cs src/VRChat.API/Model/Subscription.cs src/VRChat.API/Model/SubscriptionPeriod.cs src/VRChat.API/Model/Success.cs @@ -207,6 +267,10 @@ src/VRChat.API/Model/TwoFactorAuthCode.cs src/VRChat.API/Model/UnityPackage.cs src/VRChat.API/Model/UpdateAvatarRequest.cs src/VRChat.API/Model/UpdateFavoriteGroupRequest.cs +src/VRChat.API/Model/UpdateGroupGalleryRequest.cs +src/VRChat.API/Model/UpdateGroupMemberRequest.cs +src/VRChat.API/Model/UpdateGroupRequest.cs +src/VRChat.API/Model/UpdateGroupRoleRequest.cs src/VRChat.API/Model/UpdateInviteMessageRequest.cs src/VRChat.API/Model/UpdateUserRequest.cs src/VRChat.API/Model/UpdateWorldRequest.cs diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 0df17dd0..e230c839 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1 \ No newline at end of file +5.3.0 \ No newline at end of file diff --git a/docs/APIConfig.md b/docs/APIConfig.md index 2602a53a..cf4e4974 100644 --- a/docs/APIConfig.md +++ b/docs/APIConfig.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **VoiceEnableDegradation** | **bool** | Unknown, probably voice optimization testing | [default to false] **VoiceEnableReceiverLimiting** | **bool** | Unknown, probably voice optimization testing | [default to true] **Address** | **string** | VRChat's office address | -**Announcements** | [**List<PublicAnnouncement>**](PublicAnnouncement.md) | Public Announcements | +**Announcements** | [**List<APIConfigAnnouncement>**](APIConfigAnnouncement.md) | Public Announcements | **ApiKey** | **string** | apiKey to be used for all other requests | **AppName** | **string** | Game name | [default to "VrChat"] **BuildVersionTag** | **string** | Build tag of the API server | @@ -43,9 +43,9 @@ Name | Type | Description | Notes **DisableUdon** | **bool** | Toggles if Udon should be universally disabled in-game. | [default to false] **DisableUpgradeAccount** | **bool** | Toggles if account upgrading \"linking with Steam/Oculus\" should be disabled. | [default to false] **DownloadLinkWindows** | **string** | Download link for game on the Oculus Rift website. | -**DownloadUrls** | [**DownloadURLList**](DownloadURLList.md) | | +**DownloadUrls** | [**APIConfigDownloadURLList**](APIConfigDownloadURLList.md) | | **DynamicWorldRows** | [**List<DynamicContentRow>**](DynamicContentRow.md) | Array of DynamicWorldRow objects, used by the game to display the list of world rows | -**Events** | [**APIEventConfig**](APIEventConfig.md) | | +**Events** | [**APIConfigEvents**](APIConfigEvents.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 | [default to "https://hello.vrchat.com"] diff --git a/docs/PublicAnnouncement.md b/docs/APIConfigAnnouncement.md similarity index 90% rename from docs/PublicAnnouncement.md rename to docs/APIConfigAnnouncement.md index 245542b5..afe3c70a 100644 --- a/docs/PublicAnnouncement.md +++ b/docs/APIConfigAnnouncement.md @@ -1,4 +1,4 @@ -# VRChat.API.Model.PublicAnnouncement +# VRChat.API.Model.APIConfigAnnouncement Public Announcement ## Properties diff --git a/docs/DownloadURLList.md b/docs/APIConfigDownloadURLList.md similarity index 92% rename from docs/DownloadURLList.md rename to docs/APIConfigDownloadURLList.md index 0c9a168f..8e265a15 100644 --- a/docs/DownloadURLList.md +++ b/docs/APIConfigDownloadURLList.md @@ -1,4 +1,4 @@ -# VRChat.API.Model.DownloadURLList +# VRChat.API.Model.APIConfigDownloadURLList Download links for various development assets. ## Properties diff --git a/docs/APIEventConfig.md b/docs/APIConfigEvents.md similarity index 95% rename from docs/APIEventConfig.md rename to docs/APIConfigEvents.md index 1b72ba06..7d472f30 100644 --- a/docs/APIEventConfig.md +++ b/docs/APIConfigEvents.md @@ -1,4 +1,4 @@ -# VRChat.API.Model.APIEventConfig +# VRChat.API.Model.APIConfigEvents ## Properties diff --git a/docs/AddGroupGalleryImageRequest.md b/docs/AddGroupGalleryImageRequest.md new file mode 100644 index 00000000..0d3566e4 --- /dev/null +++ b/docs/AddGroupGalleryImageRequest.md @@ -0,0 +1,10 @@ +# VRChat.API.Model.AddGroupGalleryImageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FileId** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md index 16df18a0..b77b9418 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationApi.md @@ -2,15 +2,16 @@ 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 +------------- | ------------- | ------------- +[**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 + # **CheckUserExists** @@ -42,10 +43,10 @@ namespace Example // config.AddApiKeyPrefix("apiKey", "Bearer"); var apiInstance = new AuthenticationApi(config); - var email = "email_example"; // string | Filter by email. (optional) - var displayName = "displayName_example"; // string | Filter by displayName. (optional) - var userId = "userId_example"; // string | Filter by UserID. (optional) - var excludeUserId = "excludeUserId_example"; // string | Exclude by UserID. (optional) + var email = email_example; // string | Filter by email. (optional) + var displayName = displayName_example; // string | Filter by displayName. (optional) + var userId = userId_example; // string | Filter by UserID. (optional) + var excludeUserId = excludeUserId_example; // string | Exclude by UserID. (optional) try { @@ -55,8 +56,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AuthenticationApi.CheckUserExists: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AuthenticationApi.CheckUserExists: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -64,34 +65,14 @@ namespace Example } ``` -#### Using the CheckUserExistsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Check User Exists - ApiResponse response = apiInstance.CheckUserExistsWithHttpInfo(email, displayName, userId, excludeUserId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AuthenticationApi.CheckUserExistsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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] | +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] ### Return type @@ -149,7 +130,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new AuthenticationApi(config); - var userId = "userId_example"; // string | + var userId = userId_example; // string | Must be a valid user ID. try { @@ -159,8 +140,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AuthenticationApi.DeleteUser: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AuthenticationApi.DeleteUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -168,31 +149,11 @@ namespace Example } ``` -#### Using the DeleteUserWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Delete User - ApiResponse response = apiInstance.DeleteUserWithHttpInfo(userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AuthenticationApi.DeleteUserWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **userId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | ### Return type @@ -262,8 +223,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AuthenticationApi.GetCurrentUser: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AuthenticationApi.GetCurrentUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -271,28 +232,9 @@ namespace Example } ``` -#### Using the GetCurrentUserWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Login and/or Get Current User Info - ApiResponse response = apiInstance.GetCurrentUserWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AuthenticationApi.GetCurrentUserWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type [**CurrentUser**](CurrentUser.md) @@ -354,8 +296,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AuthenticationApi.Logout: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AuthenticationApi.Logout: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -363,28 +305,9 @@ namespace Example } ``` -#### Using the LogoutWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Logout - ApiResponse response = apiInstance.LogoutWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AuthenticationApi.LogoutWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type [**Success**](Success.md) @@ -447,8 +370,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AuthenticationApi.Verify2FA: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AuthenticationApi.Verify2FA: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -456,31 +379,11 @@ namespace Example } ``` -#### Using the Verify2FAWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Verify 2FA code - ApiResponse response = apiInstance.Verify2FAWithHttpInfo(twoFactorAuthCode); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AuthenticationApi.Verify2FAWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **twoFactorAuthCode** | [**TwoFactorAuthCode**](TwoFactorAuthCode.md) | | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **twoFactorAuthCode** | [**TwoFactorAuthCode**](TwoFactorAuthCode.md)| | [optional] ### Return type @@ -543,8 +446,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AuthenticationApi.VerifyAuthToken: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AuthenticationApi.VerifyAuthToken: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -552,28 +455,9 @@ namespace Example } ``` -#### Using the VerifyAuthTokenWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Verify Auth Token - ApiResponse response = apiInstance.VerifyAuthTokenWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AuthenticationApi.VerifyAuthTokenWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type [**VerifyAuthTokenResult**](VerifyAuthTokenResult.md) @@ -636,8 +520,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AuthenticationApi.VerifyRecoveryCode: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AuthenticationApi.VerifyRecoveryCode: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -645,31 +529,11 @@ namespace Example } ``` -#### Using the VerifyRecoveryCodeWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Verify 2FA code with Recovery code - ApiResponse response = apiInstance.VerifyRecoveryCodeWithHttpInfo(twoFactorAuthCode); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AuthenticationApi.VerifyRecoveryCodeWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **twoFactorAuthCode** | [**TwoFactorAuthCode**](TwoFactorAuthCode.md) | | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **twoFactorAuthCode** | [**TwoFactorAuthCode**](TwoFactorAuthCode.md)| | [optional] ### Return type diff --git a/docs/Avatar.md b/docs/Avatar.md index 8ba5bc9e..9aeeb6d8 100644 --- a/docs/Avatar.md +++ b/docs/Avatar.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **ImageUrl** | **string** | | **Name** | **string** | | **ReleaseStatus** | **ReleaseStatus** | | -**Tags** | **List<string>** | | +**Tags** | **List<string>** | | **ThumbnailImageUrl** | **string** | | **UnityPackageUrl** | **string** | | **UnityPackageUrlObject** | [**AvatarUnityPackageUrlObject**](AvatarUnityPackageUrlObject.md) | | diff --git a/docs/AvatarsApi.md b/docs/AvatarsApi.md index b787c3fa..5068d8c4 100644 --- a/docs/AvatarsApi.md +++ b/docs/AvatarsApi.md @@ -2,17 +2,18 @@ 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 | -| [**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 | +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 +[**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** @@ -58,8 +59,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AvatarsApi.CreateAvatar: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AvatarsApi.CreateAvatar: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -67,31 +68,11 @@ namespace Example } ``` -#### Using the CreateAvatarWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Create Avatar - ApiResponse response = apiInstance.CreateAvatarWithHttpInfo(createAvatarRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AvatarsApi.CreateAvatarWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **createAvatarRequest** | [**CreateAvatarRequest**](CreateAvatarRequest.md) | | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createAvatarRequest** | [**CreateAvatarRequest**](CreateAvatarRequest.md)| | [optional] ### Return type @@ -149,7 +130,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new AvatarsApi(config); - var avatarId = "avatarId_example"; // string | + var avatarId = avatarId_example; // string | Must be a valid avatar ID. try { @@ -159,8 +140,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AvatarsApi.DeleteAvatar: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AvatarsApi.DeleteAvatar: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -168,31 +149,11 @@ namespace Example } ``` -#### Using the DeleteAvatarWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Delete Avatar - ApiResponse response = apiInstance.DeleteAvatarWithHttpInfo(avatarId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AvatarsApi.DeleteAvatarWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **avatarId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avatarId** | **string**| Must be a valid avatar ID. | ### Return type @@ -251,7 +212,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new AvatarsApi(config); - var avatarId = "avatarId_example"; // string | + var avatarId = avatarId_example; // string | Must be a valid avatar ID. try { @@ -261,8 +222,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AvatarsApi.GetAvatar: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AvatarsApi.GetAvatar: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -270,31 +231,11 @@ namespace Example } ``` -#### Using the GetAvatarWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Avatar - ApiResponse response = apiInstance.GetAvatarWithHttpInfo(avatarId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AvatarsApi.GetAvatarWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **avatarId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avatarId** | **string**| Must be a valid avatar ID. | ### Return type @@ -321,7 +262,7 @@ catch (ApiException e) # **GetFavoritedAvatars** -> List<Avatar> GetFavoritedAvatars (bool? featured = null, string sort = null, int? n = null, string order = null, int? offset = null, string search = null, string tag = null, string notag = null, string releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null, string userId = null) +> List<Avatar> GetFavoritedAvatars (bool? featured = null, SortOption? sort = null, int? n = null, OrderOption? order = null, int? offset = null, string search = null, string tag = null, string notag = null, ReleaseStatus? releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null, string userId = null) List Favorited Avatars @@ -354,18 +295,18 @@ namespace Example var apiInstance = new AvatarsApi(config); var featured = true; // bool? | Filters on featured results. (optional) - var sort = popularity; // string | (optional) (default to popularity) - var n = 60; // int? | The number of objects to return. (optional) (default to 60) - var order = descending; // string | (optional) (default to descending) + var sort = ; // SortOption? | The sort order of the results. (optional) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) + var order = ; // OrderOption? | Result ordering (optional) var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) - var search = "search_example"; // string | Filters by world name. (optional) - var tag = "tag_example"; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) - var notag = "notag_example"; // string | Tags to exclude (comma-separated). (optional) - var releaseStatus = "public"; // string | Filter by ReleaseStatus. (optional) (default to public) - var maxUnityVersion = "maxUnityVersion_example"; // string | The maximum Unity version supported by the asset. (optional) - var minUnityVersion = "minUnityVersion_example"; // string | The minimum Unity version supported by the asset. (optional) - var platform = "platform_example"; // string | The platform the asset supports. (optional) - var userId = "userId_example"; // string | Target user to see information on, admin-only. (optional) + var search = search_example; // string | Filters by world name. (optional) + var tag = tag_example; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) + var notag = notag_example; // string | Tags to exclude (comma-separated). (optional) + var releaseStatus = ; // ReleaseStatus? | Filter by ReleaseStatus. (optional) + var maxUnityVersion = maxUnityVersion_example; // string | The maximum Unity version supported by the asset. (optional) + var minUnityVersion = minUnityVersion_example; // string | The minimum Unity version supported by the asset. (optional) + var platform = platform_example; // string | The platform the asset supports. (optional) + var userId = userId_example; // string | Target user to see information on, admin-only. (optional) try { @@ -375,8 +316,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AvatarsApi.GetFavoritedAvatars: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AvatarsApi.GetFavoritedAvatars: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -384,43 +325,23 @@ namespace Example } ``` -#### Using the GetFavoritedAvatarsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Favorited Avatars - ApiResponse> response = apiInstance.GetFavoritedAvatarsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AvatarsApi.GetFavoritedAvatarsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **featured** | **bool?** | Filters on featured results. | [optional] | -| **sort** | **string** | | [optional] [default to popularity] | -| **n** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **order** | **string** | | [optional] [default to descending] | -| **offset** | **int?** | 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] | -| **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** | **bool?**| Filters on featured results. | [optional] + **sort** | **SortOption?**| The sort order of the results. | [optional] + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **order** | **OrderOption?**| Result ordering | [optional] + **offset** | **int?**| 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?**| Filter by ReleaseStatus. | [optional] + **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 @@ -479,7 +400,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new AvatarsApi(config); - var userId = "userId_example"; // string | + var userId = userId_example; // string | Must be a valid user ID. try { @@ -489,8 +410,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AvatarsApi.GetOwnAvatar: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AvatarsApi.GetOwnAvatar: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -498,31 +419,11 @@ namespace Example } ``` -#### Using the GetOwnAvatarWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Own Avatar - ApiResponse response = apiInstance.GetOwnAvatarWithHttpInfo(userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AvatarsApi.GetOwnAvatarWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **userId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | ### Return type @@ -549,7 +450,7 @@ catch (ApiException e) # **SearchAvatars** -> List<Avatar> SearchAvatars (bool? featured = null, string sort = null, string user = null, string userId = null, int? n = null, string order = null, int? offset = null, string tag = null, string notag = null, string releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null) +> List<Avatar> SearchAvatars (bool? featured = null, SortOption? sort = null, string user = null, string userId = null, int? n = null, OrderOption? order = null, int? offset = null, string tag = null, string notag = null, ReleaseStatus? releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null) Search Avatars @@ -582,18 +483,18 @@ namespace Example var apiInstance = new AvatarsApi(config); var featured = true; // bool? | Filters on featured results. (optional) - var sort = popularity; // string | (optional) (default to popularity) - var user = "me"; // string | Set to `me` for searching own avatars. (optional) - var userId = "userId_example"; // string | Filter by UserID. (optional) - var n = 60; // int? | The number of objects to return. (optional) (default to 60) - var order = descending; // string | (optional) (default to descending) + var sort = ; // SortOption? | The sort order of the results. (optional) + var user = user_example; // string | Set to `me` for searching own avatars. (optional) + var userId = userId_example; // string | Filter by UserID. (optional) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) + var order = ; // OrderOption? | Result ordering (optional) var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) - var tag = "tag_example"; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) - var notag = "notag_example"; // string | Tags to exclude (comma-separated). (optional) - var releaseStatus = "public"; // string | Filter by ReleaseStatus. (optional) (default to public) - var maxUnityVersion = "maxUnityVersion_example"; // string | The maximum Unity version supported by the asset. (optional) - var minUnityVersion = "minUnityVersion_example"; // string | The minimum Unity version supported by the asset. (optional) - var platform = "platform_example"; // string | The platform the asset supports. (optional) + var tag = tag_example; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) + var notag = notag_example; // string | Tags to exclude (comma-separated). (optional) + var releaseStatus = ; // ReleaseStatus? | Filter by ReleaseStatus. (optional) + var maxUnityVersion = maxUnityVersion_example; // string | The maximum Unity version supported by the asset. (optional) + var minUnityVersion = minUnityVersion_example; // string | The minimum Unity version supported by the asset. (optional) + var platform = platform_example; // string | The platform the asset supports. (optional) try { @@ -603,8 +504,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AvatarsApi.SearchAvatars: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AvatarsApi.SearchAvatars: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -612,43 +513,23 @@ namespace Example } ``` -#### Using the SearchAvatarsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Search Avatars - ApiResponse> response = apiInstance.SearchAvatarsWithHttpInfo(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AvatarsApi.SearchAvatarsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **featured** | **bool?** | Filters on featured results. | [optional] | -| **sort** | **string** | | [optional] [default to popularity] | -| **user** | **string** | Set to `me` for searching own avatars. | [optional] | -| **userId** | **string** | Filter by UserID. | [optional] | -| **n** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **order** | **string** | | [optional] [default to descending] | -| **offset** | **int?** | 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] | -| **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** | **bool?**| Filters on featured results. | [optional] + **sort** | **SortOption?**| The sort order of the results. | [optional] + **user** | **string**| Set to `me` for searching own avatars. | [optional] + **userId** | **string**| Filter by UserID. | [optional] + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **order** | **OrderOption?**| Result ordering | [optional] + **offset** | **int?**| 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?**| Filter by ReleaseStatus. | [optional] + **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] ### Return type @@ -706,7 +587,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new AvatarsApi(config); - var avatarId = "avatarId_example"; // string | + var avatarId = avatarId_example; // string | Must be a valid avatar ID. try { @@ -716,8 +597,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AvatarsApi.SelectAvatar: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AvatarsApi.SelectAvatar: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -725,31 +606,11 @@ namespace Example } ``` -#### Using the SelectAvatarWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Select Avatar - ApiResponse response = apiInstance.SelectAvatarWithHttpInfo(avatarId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AvatarsApi.SelectAvatarWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **avatarId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avatarId** | **string**| Must be a valid avatar ID. | ### Return type @@ -808,7 +669,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new AvatarsApi(config); - var avatarId = "avatarId_example"; // string | + var avatarId = avatarId_example; // string | Must be a valid avatar ID. try { @@ -818,8 +679,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AvatarsApi.SelectFallbackAvatar: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AvatarsApi.SelectFallbackAvatar: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -827,31 +688,11 @@ namespace Example } ``` -#### Using the SelectFallbackAvatarWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Select Fallback Avatar - ApiResponse response = apiInstance.SelectFallbackAvatarWithHttpInfo(avatarId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AvatarsApi.SelectFallbackAvatarWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **avatarId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avatarId** | **string**| Must be a valid avatar ID. | ### Return type @@ -911,7 +752,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new AvatarsApi(config); - var avatarId = "avatarId_example"; // string | + var avatarId = avatarId_example; // string | Must be a valid avatar ID. var updateAvatarRequest = new UpdateAvatarRequest(); // UpdateAvatarRequest | (optional) try @@ -922,8 +763,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling AvatarsApi.UpdateAvatar: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling AvatarsApi.UpdateAvatar: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -931,32 +772,12 @@ namespace Example } ``` -#### Using the UpdateAvatarWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Update Avatar - ApiResponse response = apiInstance.UpdateAvatarWithHttpInfo(avatarId, updateAvatarRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling AvatarsApi.UpdateAvatarWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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 diff --git a/docs/BanGroupMemberRequest.md b/docs/BanGroupMemberRequest.md new file mode 100644 index 00000000..23395b38 --- /dev/null +++ b/docs/BanGroupMemberRequest.md @@ -0,0 +1,10 @@ +# VRChat.API.Model.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. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateAvatarRequest.md b/docs/CreateAvatarRequest.md index 031691d5..7eb9b4a6 100644 --- a/docs/CreateAvatarRequest.md +++ b/docs/CreateAvatarRequest.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Id** | **string** | | [optional] **Name** | **string** | | **Description** | **string** | | [optional] -**Tags** | **List<string>** | | [optional] +**Tags** | **List<string>** | | [optional] **ImageUrl** | **string** | | **ReleaseStatus** | **ReleaseStatus** | | [optional] **_Version** | **decimal** | | [optional] [default to 1M] diff --git a/docs/CreateFileRequest.md b/docs/CreateFileRequest.md index 7f551903..11403049 100644 --- a/docs/CreateFileRequest.md +++ b/docs/CreateFileRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Name** | **string** | | **MimeType** | **MIMEType** | | **Extension** | **string** | | -**Tags** | **List<string>** | | [optional] +**Tags** | **List<string>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateGroupAnnouncementRequest.md b/docs/CreateGroupAnnouncementRequest.md new file mode 100644 index 00000000..531e6f2f --- /dev/null +++ b/docs/CreateGroupAnnouncementRequest.md @@ -0,0 +1,13 @@ +# VRChat.API.Model.CreateGroupAnnouncementRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | Announcement title | +**Text** | **string** | Announcement text | [optional] +**ImageId** | **string** | | [optional] +**SendNotification** | **bool** | Send notification to group members. | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateGroupGalleryRequest.md b/docs/CreateGroupGalleryRequest.md new file mode 100644 index 00000000..a0fb9806 --- /dev/null +++ b/docs/CreateGroupGalleryRequest.md @@ -0,0 +1,16 @@ +# VRChat.API.Model.CreateGroupGalleryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the gallery. | +**Description** | **string** | Description of the gallery. | [optional] +**MembersOnly** | **bool** | Whether the gallery is members only. | [optional] [default to false] +**RoleIdsToView** | **List<string>** | | [optional] +**RoleIdsToSubmit** | **List<string>** | | [optional] +**RoleIdsToAutoApprove** | **List<string>** | | [optional] +**RoleIdsToManage** | **List<string>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateGroupInviteRequest.md b/docs/CreateGroupInviteRequest.md new file mode 100644 index 00000000..d706f4ab --- /dev/null +++ b/docs/CreateGroupInviteRequest.md @@ -0,0 +1,11 @@ +# VRChat.API.Model.CreateGroupInviteRequest + +## 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. | +**ConfirmOverrideBlock** | **bool** | | [optional] [default to true] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateGroupRequest.md b/docs/CreateGroupRequest.md new file mode 100644 index 00000000..52dd9124 --- /dev/null +++ b/docs/CreateGroupRequest.md @@ -0,0 +1,17 @@ +# VRChat.API.Model.CreateGroupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ShortCode** | **string** | | +**Description** | **string** | | [optional] +**JoinState** | **GroupJoinState** | | [optional] +**IconId** | **string** | | [optional] [default to "null"] +**BannerId** | **string** | | [optional] [default to "null"] +**Privacy** | **GroupPrivacy** | | [optional] +**RoleTemplate** | **GroupRoleTemplate** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateGroupRoleRequest.md b/docs/CreateGroupRoleRequest.md new file mode 100644 index 00000000..0b672a75 --- /dev/null +++ b/docs/CreateGroupRoleRequest.md @@ -0,0 +1,14 @@ +# VRChat.API.Model.CreateGroupRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**Name** | **string** | | [optional] +**Description** | **string** | | [optional] +**IsSelfAssignable** | **bool** | | [optional] [default to false] +**Permissions** | **List<string>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateWorldRequest.md b/docs/CreateWorldRequest.md index 580327fd..7ce37ea6 100644 --- a/docs/CreateWorldRequest.md +++ b/docs/CreateWorldRequest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **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] +**Tags** | **List<string>** | | [optional] **UnityPackageUrl** | **string** | | [optional] **UnityVersion** | **string** | | [optional] [default to "5.3.4p1"] diff --git a/docs/CurrentUser.md b/docs/CurrentUser.md index c2e3f969..446c0117 100644 --- a/docs/CurrentUser.md +++ b/docs/CurrentUser.md @@ -36,7 +36,7 @@ Name | Type | Description | Notes **OculusId** | **string** | | **OfflineFriends** | **List<string>** | | [optional] **OnlineFriends** | **List<string>** | | [optional] -**PastDisplayNames** | [**List<PastDisplayName>**](PastDisplayName.md) | | +**PastDisplayNames** | [**List<PastDisplayName>**](PastDisplayName.md) | | **ProfilePicOverride** | **string** | | **State** | **UserState** | | **Status** | **UserStatus** | | diff --git a/docs/EconomyApi.md b/docs/EconomyApi.md index fb086df0..9f104d75 100644 --- a/docs/EconomyApi.md +++ b/docs/EconomyApi.md @@ -2,13 +2,14 @@ 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 +------------- | ------------- | ------------- +[**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 + # **GetCurrentSubscriptions** @@ -53,8 +54,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling EconomyApi.GetCurrentSubscriptions: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling EconomyApi.GetCurrentSubscriptions: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -62,28 +63,9 @@ namespace Example } ``` -#### Using the GetCurrentSubscriptionsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Current Subscriptions - ApiResponse> response = apiInstance.GetCurrentSubscriptionsWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling EconomyApi.GetCurrentSubscriptionsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type [**List<UserSubscription>**](UserSubscription.md) @@ -140,7 +122,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new EconomyApi(config); - var licenseGroupId = "licenseGroupId_example"; // string | + var licenseGroupId = licenseGroupId_example; // string | Must be a valid license group ID. try { @@ -150,8 +132,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling EconomyApi.GetLicenseGroup: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling EconomyApi.GetLicenseGroup: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -159,31 +141,11 @@ namespace Example } ``` -#### Using the GetLicenseGroupWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get License Group - ApiResponse response = apiInstance.GetLicenseGroupWithHttpInfo(licenseGroupId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling EconomyApi.GetLicenseGroupWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **licenseGroupId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **licenseGroupId** | **string**| Must be a valid license group ID. | ### Return type @@ -241,7 +203,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new EconomyApi(config); - var transactionId = "transactionId_example"; // string | + var transactionId = transactionId_example; // string | Must be a valid transaction ID. try { @@ -251,8 +213,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling EconomyApi.GetSteamTransaction: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling EconomyApi.GetSteamTransaction: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -260,31 +222,11 @@ namespace Example } ``` -#### Using the GetSteamTransactionWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Steam Transaction - ApiResponse response = apiInstance.GetSteamTransactionWithHttpInfo(transactionId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling EconomyApi.GetSteamTransactionWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **transactionId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transactionId** | **string**| Must be a valid transaction ID. | ### Return type @@ -351,8 +293,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling EconomyApi.GetSteamTransactions: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling EconomyApi.GetSteamTransactions: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -360,28 +302,9 @@ namespace Example } ``` -#### Using the GetSteamTransactionsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Steam Transactions - ApiResponse> response = apiInstance.GetSteamTransactionsWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling EconomyApi.GetSteamTransactionsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type [**List<Transaction>**](Transaction.md) @@ -447,8 +370,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling EconomyApi.GetSubscriptions: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling EconomyApi.GetSubscriptions: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -456,28 +379,9 @@ namespace Example } ``` -#### Using the GetSubscriptionsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Subscriptions - ApiResponse> response = apiInstance.GetSubscriptionsWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling EconomyApi.GetSubscriptionsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type [**List<Subscription>**](Subscription.md) diff --git a/docs/Favorite.md b/docs/Favorite.md index cc903a88..c1421fb4 100644 --- a/docs/Favorite.md +++ b/docs/Favorite.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **FavoriteId** | **string** | MUST be either AvatarID, UserID or WorldID. | **Id** | **string** | | -**Tags** | **List<string>** | | +**Tags** | **List<string>** | | **Type** | **FavoriteType** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FavoriteGroup.md b/docs/FavoriteGroup.md index 930691ff..b2097cbc 100644 --- a/docs/FavoriteGroup.md +++ b/docs/FavoriteGroup.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **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>** | | +**Tags** | **List<string>** | | **Type** | **FavoriteType** | | **Visibility** | **FavoriteGroupVisibility** | | diff --git a/docs/FavoritesApi.md b/docs/FavoritesApi.md index 0828b539..5fc23f1f 100644 --- a/docs/FavoritesApi.md +++ b/docs/FavoritesApi.md @@ -2,16 +2,17 @@ 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 +[**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 + # **AddFavorite** @@ -57,8 +58,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FavoritesApi.AddFavorite: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FavoritesApi.AddFavorite: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -66,31 +67,11 @@ namespace Example } ``` -#### Using the AddFavoriteWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Add Favorite - ApiResponse response = apiInstance.AddFavoriteWithHttpInfo(addFavoriteRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FavoritesApi.AddFavoriteWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **addFavoriteRequest** | [**AddFavoriteRequest**](AddFavoriteRequest.md) | | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **addFavoriteRequest** | [**AddFavoriteRequest**](AddFavoriteRequest.md)| | [optional] ### Return type @@ -149,9 +130,9 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FavoritesApi(config); - var favoriteGroupType = "world"; // string | The type of group to fetch, must be a valid FavoriteType. - var favoriteGroupName = "favoriteGroupName_example"; // string | - var userId = "userId_example"; // string | + var favoriteGroupType = favoriteGroupType_example; // string | The type of group to fetch, must be a valid FavoriteType. + var favoriteGroupName = favoriteGroupName_example; // string | The name of the group to fetch, must be a name of a FavoriteGroup. + var userId = userId_example; // string | Must be a valid user ID. try { @@ -161,8 +142,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FavoritesApi.ClearFavoriteGroup: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FavoritesApi.ClearFavoriteGroup: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -170,33 +151,13 @@ namespace Example } ``` -#### Using the ClearFavoriteGroupWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Clear Favorite Group - ApiResponse response = apiInstance.ClearFavoriteGroupWithHttpInfo(favoriteGroupType, favoriteGroupName, userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FavoritesApi.ClearFavoriteGroupWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **favoriteGroupType** | **string** | The type of group to fetch, must be a valid FavoriteType. | | -| **favoriteGroupName** | **string** | | | -| **userId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **favoriteGroupType** | **string**| The type of group to fetch, must be a valid FavoriteType. | + **favoriteGroupName** | **string**| The name of the group to fetch, must be a name of a FavoriteGroup. | + **userId** | **string**| Must be a valid user ID. | ### Return type @@ -253,7 +214,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FavoritesApi(config); - var favoriteId = "favoriteId_example"; // string | + var favoriteId = favoriteId_example; // string | Must be a valid favorite ID. try { @@ -263,8 +224,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FavoritesApi.GetFavorite: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FavoritesApi.GetFavorite: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -272,31 +233,11 @@ namespace Example } ``` -#### Using the GetFavoriteWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Show Favorite - ApiResponse response = apiInstance.GetFavoriteWithHttpInfo(favoriteId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FavoritesApi.GetFavoriteWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **favoriteId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **favoriteId** | **string**| Must be a valid favorite ID. | ### Return type @@ -355,9 +296,9 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FavoritesApi(config); - var favoriteGroupType = "world"; // string | The type of group to fetch, must be a valid FavoriteType. - var favoriteGroupName = "favoriteGroupName_example"; // string | - var userId = "userId_example"; // string | + var favoriteGroupType = favoriteGroupType_example; // string | The type of group to fetch, must be a valid FavoriteType. + var favoriteGroupName = favoriteGroupName_example; // string | The name of the group to fetch, must be a name of a FavoriteGroup. + var userId = userId_example; // string | Must be a valid user ID. try { @@ -367,8 +308,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FavoritesApi.GetFavoriteGroup: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FavoritesApi.GetFavoriteGroup: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -376,33 +317,13 @@ namespace Example } ``` -#### Using the GetFavoriteGroupWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Show Favorite Group - ApiResponse response = apiInstance.GetFavoriteGroupWithHttpInfo(favoriteGroupType, favoriteGroupName, userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FavoritesApi.GetFavoriteGroupWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **favoriteGroupType** | **string** | The type of group to fetch, must be a valid FavoriteType. | | -| **favoriteGroupName** | **string** | | | -| **userId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **favoriteGroupType** | **string**| The type of group to fetch, must be a valid FavoriteType. | + **favoriteGroupName** | **string**| The name of the group to fetch, must be a name of a FavoriteGroup. | + **userId** | **string**| Must be a valid user ID. | ### Return type @@ -459,9 +380,9 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FavoritesApi(config); - var n = 60; // int? | The number of objects to return. (optional) (default to 60) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) - var ownerId = "ownerId_example"; // string | The owner of whoms favorite groups to return. Must be a UserID. (optional) + var ownerId = ownerId_example; // string | The owner of whoms favorite groups to return. Must be a UserID. (optional) try { @@ -471,8 +392,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FavoritesApi.GetFavoriteGroups: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FavoritesApi.GetFavoriteGroups: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -480,33 +401,13 @@ namespace Example } ``` -#### Using the GetFavoriteGroupsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Favorite Groups - ApiResponse> response = apiInstance.GetFavoriteGroupsWithHttpInfo(n, offset, ownerId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FavoritesApi.GetFavoriteGroupsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **n** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **offset** | **int?** | 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] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **offset** | **int?**| 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] ### Return type @@ -564,10 +465,10 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FavoritesApi(config); - var n = 60; // int? | The number of objects to return. (optional) (default to 60) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) - var type = "type_example"; // string | The type of favorites to return, FavoriteType. (optional) - var tag = "tag_example"; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) + var type = type_example; // string | The type of favorites to return, FavoriteType. (optional) + var tag = tag_example; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) try { @@ -577,8 +478,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FavoritesApi.GetFavorites: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FavoritesApi.GetFavorites: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -586,34 +487,14 @@ namespace Example } ``` -#### Using the GetFavoritesWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Favorites - ApiResponse> response = apiInstance.GetFavoritesWithHttpInfo(n, offset, type, tag); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FavoritesApi.GetFavoritesWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **n** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **offset** | **int?** | 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** | **int?**| The number of objects to return. | [optional] [default to 60] + **offset** | **int?**| 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 @@ -671,7 +552,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FavoritesApi(config); - var favoriteId = "favoriteId_example"; // string | + var favoriteId = favoriteId_example; // string | Must be a valid favorite ID. try { @@ -681,8 +562,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FavoritesApi.RemoveFavorite: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FavoritesApi.RemoveFavorite: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -690,31 +571,11 @@ namespace Example } ``` -#### Using the RemoveFavoriteWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Remove Favorite - ApiResponse response = apiInstance.RemoveFavoriteWithHttpInfo(favoriteId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FavoritesApi.RemoveFavoriteWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **favoriteId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **favoriteId** | **string**| Must be a valid favorite ID. | ### Return type @@ -773,9 +634,9 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FavoritesApi(config); - var favoriteGroupType = "world"; // string | The type of group to fetch, must be a valid FavoriteType. - var favoriteGroupName = "favoriteGroupName_example"; // string | - var userId = "userId_example"; // string | + var favoriteGroupType = favoriteGroupType_example; // string | The type of group to fetch, must be a valid FavoriteType. + var favoriteGroupName = favoriteGroupName_example; // string | The name of the group to fetch, must be a name of a FavoriteGroup. + var userId = userId_example; // string | Must be a valid user ID. var updateFavoriteGroupRequest = new UpdateFavoriteGroupRequest(); // UpdateFavoriteGroupRequest | (optional) try @@ -785,8 +646,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FavoritesApi.UpdateFavoriteGroup: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FavoritesApi.UpdateFavoriteGroup: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -794,31 +655,14 @@ namespace Example } ``` -#### Using the UpdateFavoriteGroupWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Update Favorite Group - apiInstance.UpdateFavoriteGroupWithHttpInfo(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FavoritesApi.UpdateFavoriteGroupWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **favoriteGroupType** | **string** | The type of group to fetch, must be a valid FavoriteType. | | -| **favoriteGroupName** | **string** | | | -| **userId** | **string** | | | -| **updateFavoriteGroupRequest** | [**UpdateFavoriteGroupRequest**](UpdateFavoriteGroupRequest.md) | | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **favoriteGroupType** | **string**| The type of group to fetch, must be a valid FavoriteType. | + **favoriteGroupName** | **string**| The name of the group to fetch, must be a name of a FavoriteGroup. | + **userId** | **string**| Must be a valid user ID. | + **updateFavoriteGroupRequest** | [**UpdateFavoriteGroupRequest**](UpdateFavoriteGroupRequest.md)| | [optional] ### Return type diff --git a/docs/File.md b/docs/File.md index 326f14bf..a7828eab 100644 --- a/docs/File.md +++ b/docs/File.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **MimeType** | **MIMEType** | | **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** | [**List<FileVersion>**](FileVersion.md) | | +**Tags** | **List<string>** | | +**Versions** | [**List<FileVersion>**](FileVersion.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FilesApi.md b/docs/FilesApi.md index e6ed22fe..6f92ff2a 100644 --- a/docs/FilesApi.md +++ b/docs/FilesApi.md @@ -2,18 +2,19 @@ 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 +[**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 + # **CreateFile** @@ -59,8 +60,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FilesApi.CreateFile: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FilesApi.CreateFile: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -68,31 +69,11 @@ namespace Example } ``` -#### Using the CreateFileWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Create File - ApiResponse response = apiInstance.CreateFileWithHttpInfo(createFileRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FilesApi.CreateFileWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **createFileRequest** | [**CreateFileRequest**](CreateFileRequest.md) | | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createFileRequest** | [**CreateFileRequest**](CreateFileRequest.md)| | [optional] ### Return type @@ -149,7 +130,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FilesApi(config); - var fileId = file_00000000-0000-0000-0000-000000000000; // string | + var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID. var createFileVersionRequest = new CreateFileVersionRequest(); // CreateFileVersionRequest | (optional) try @@ -160,8 +141,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FilesApi.CreateFileVersion: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FilesApi.CreateFileVersion: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -169,32 +150,12 @@ namespace Example } ``` -#### Using the CreateFileVersionWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Create File Version - ApiResponse response = apiInstance.CreateFileVersionWithHttpInfo(fileId, createFileVersionRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FilesApi.CreateFileVersionWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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 @@ -251,7 +212,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FilesApi(config); - var fileId = file_00000000-0000-0000-0000-000000000000; // string | + var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID. try { @@ -261,8 +222,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FilesApi.DeleteFile: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FilesApi.DeleteFile: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -270,31 +231,11 @@ namespace Example } ``` -#### Using the DeleteFileWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Delete File - ApiResponse response = apiInstance.DeleteFileWithHttpInfo(fileId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FilesApi.DeleteFileWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **fileId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileId** | **string**| Must be a valid file ID. | ### Return type @@ -352,8 +293,8 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FilesApi(config); - var fileId = file_00000000-0000-0000-0000-000000000000; // string | - var versionId = 1; // int | + var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID. + var versionId = 1; // int | Version ID of the asset. try { @@ -363,8 +304,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FilesApi.DeleteFileVersion: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FilesApi.DeleteFileVersion: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -372,32 +313,12 @@ namespace Example } ``` -#### Using the DeleteFileVersionWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Delete File Version - ApiResponse response = apiInstance.DeleteFileVersionWithHttpInfo(fileId, versionId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FilesApi.DeleteFileVersionWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **fileId** | **string** | | | -| **versionId** | **int** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileId** | **string**| Must be a valid file ID. | + **versionId** | **int**| Version ID of the asset. | ### Return type @@ -456,8 +377,8 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FilesApi(config); - var fileId = file_00000000-0000-0000-0000-000000000000; // string | - var versionId = 1; // int | + var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID. + var versionId = 1; // int | Version ID of the asset. try { @@ -466,8 +387,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FilesApi.DownloadFileVersion: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FilesApi.DownloadFileVersion: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -475,29 +396,12 @@ namespace Example } ``` -#### Using the DownloadFileVersionWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Download File Version - apiInstance.DownloadFileVersionWithHttpInfo(fileId, versionId); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FilesApi.DownloadFileVersionWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **fileId** | **string** | | | -| **versionId** | **int** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileId** | **string**| Must be a valid file ID. | + **versionId** | **int**| Version ID of the asset. | ### Return type @@ -554,9 +458,9 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FilesApi(config); - var fileId = file_00000000-0000-0000-0000-000000000000; // string | - var versionId = 1; // int | - var fileType = file; // string | + var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID. + var versionId = 1; // int | Version ID of the asset. + var fileType = file; // string | Type of file. var 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`. (optional) try @@ -567,8 +471,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FilesApi.FinishFileDataUpload: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FilesApi.FinishFileDataUpload: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -576,34 +480,14 @@ namespace Example } ``` -#### Using the FinishFileDataUploadWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Finish FileData Upload - ApiResponse response = apiInstance.FinishFileDataUploadWithHttpInfo(fileId, versionId, fileType, finishFileDataUploadRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FilesApi.FinishFileDataUploadWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **fileId** | **string** | | | -| **versionId** | **int** | | | -| **fileType** | **string** | | | -| **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** | **int**| Version ID of the asset. | + **fileType** | **string**| Type of file. | + **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 @@ -660,7 +544,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FilesApi(config); - var fileId = file_00000000-0000-0000-0000-000000000000; // string | + var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID. try { @@ -670,8 +554,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FilesApi.GetFile: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FilesApi.GetFile: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -679,31 +563,11 @@ namespace Example } ``` -#### Using the GetFileWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Show File - ApiResponse response = apiInstance.GetFileWithHttpInfo(fileId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FilesApi.GetFileWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **fileId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileId** | **string**| Must be a valid file ID. | ### Return type @@ -761,9 +625,9 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FilesApi(config); - var fileId = file_00000000-0000-0000-0000-000000000000; // string | - var versionId = 1; // int | - var fileType = file; // string | + var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID. + var versionId = 1; // int | Version ID of the asset. + var fileType = file; // string | Type of file. try { @@ -773,8 +637,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FilesApi.GetFileDataUploadStatus: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FilesApi.GetFileDataUploadStatus: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -782,33 +646,13 @@ namespace Example } ``` -#### Using the GetFileDataUploadStatusWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Check FileData Upload Status - ApiResponse response = apiInstance.GetFileDataUploadStatusWithHttpInfo(fileId, versionId, fileType); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FilesApi.GetFileDataUploadStatusWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **fileId** | **string** | | | -| **versionId** | **int** | | | -| **fileType** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileId** | **string**| Must be a valid file ID. | + **versionId** | **int**| Version ID of the asset. | + **fileType** | **string**| Type of file. | ### Return type @@ -865,9 +709,9 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FilesApi(config); - var tag = "tag_example"; // string | Tag, for example \"icon\" or \"gallery\", not included by default. (optional) - var userId = "userId_example"; // string | UserID, will always generate a 500 permission error. (optional) - var n = 60; // int? | The number of objects to return. (optional) (default to 60) + var tag = tag_example; // string | Tag, for example \"icon\" or \"gallery\", not included by default. (optional) + var userId = userId_example; // string | UserID, will always generate a 500 permission error. (optional) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) try @@ -878,8 +722,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FilesApi.GetFiles: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FilesApi.GetFiles: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -887,34 +731,14 @@ namespace Example } ``` -#### Using the GetFilesWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Files - ApiResponse> response = apiInstance.GetFilesWithHttpInfo(tag, userId, n, offset); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FilesApi.GetFilesWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **offset** | **int?** | A zero-based offset from the default object sorting from where search results start. | [optional] | +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** | **int?**| The number of objects to return. | [optional] [default to 60] + **offset** | **int?**| A zero-based offset from the default object sorting from where search results start. | [optional] ### Return type @@ -971,10 +795,10 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FilesApi(config); - var fileId = file_00000000-0000-0000-0000-000000000000; // string | - var versionId = 1; // int | - var fileType = file; // string | - var partNumber = 1; // int? | (optional) + var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID. + var versionId = 1; // int | Version ID of the asset. + var fileType = file; // string | Type of file. + var partNumber = 1; // int? | The part number to start uploading. If not provided, the first part will be started. (optional) try { @@ -984,8 +808,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FilesApi.StartFileDataUpload: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FilesApi.StartFileDataUpload: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -993,34 +817,14 @@ namespace Example } ``` -#### Using the StartFileDataUploadWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Start FileData Upload - ApiResponse response = apiInstance.StartFileDataUploadWithHttpInfo(fileId, versionId, fileType, partNumber); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FilesApi.StartFileDataUploadWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **fileId** | **string** | | | -| **versionId** | **int** | | | -| **fileType** | **string** | | | -| **partNumber** | **int?** | | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileId** | **string**| Must be a valid file ID. | + **versionId** | **int**| Version ID of the asset. | + **fileType** | **string**| Type of file. | + **partNumber** | **int?**| The part number to start uploading. If not provided, the first part will be started. | [optional] ### Return type diff --git a/docs/FriendsApi.md b/docs/FriendsApi.md index 0e348b48..49f581e9 100644 --- a/docs/FriendsApi.md +++ b/docs/FriendsApi.md @@ -2,13 +2,14 @@ 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 +------------- | ------------- | ------------- +[**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 + # **DeleteFriendRequest** @@ -44,7 +45,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FriendsApi(config); - var userId = "userId_example"; // string | + var userId = userId_example; // string | Must be a valid user ID. try { @@ -54,8 +55,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FriendsApi.DeleteFriendRequest: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FriendsApi.DeleteFriendRequest: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -63,31 +64,11 @@ namespace Example } ``` -#### Using the DeleteFriendRequestWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Delete Friend Request - ApiResponse response = apiInstance.DeleteFriendRequestWithHttpInfo(userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FriendsApi.DeleteFriendRequestWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **userId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | ### Return type @@ -146,7 +127,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FriendsApi(config); - var userId = "userId_example"; // string | + var userId = userId_example; // string | Must be a valid user ID. try { @@ -156,8 +137,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FriendsApi.Friend: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FriendsApi.Friend: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -165,31 +146,11 @@ namespace Example } ``` -#### Using the FriendWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Send Friend Request - ApiResponse response = apiInstance.FriendWithHttpInfo(userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FriendsApi.FriendWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **userId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | ### Return type @@ -248,7 +209,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FriendsApi(config); - var userId = "userId_example"; // string | + var userId = userId_example; // string | Must be a valid user ID. try { @@ -258,8 +219,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FriendsApi.GetFriendStatus: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FriendsApi.GetFriendStatus: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -267,31 +228,11 @@ namespace Example } ``` -#### Using the GetFriendStatusWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Check Friend Status - ApiResponse response = apiInstance.GetFriendStatusWithHttpInfo(userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FriendsApi.GetFriendStatusWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **userId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | ### Return type @@ -350,7 +291,7 @@ namespace Example var apiInstance = new FriendsApi(config); var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) - var n = 60; // int? | The number of objects to return. (optional) (default to 60) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) var offline = true; // bool? | Returns *only* offline users if true, returns only online and active users if false (optional) try @@ -361,8 +302,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FriendsApi.GetFriends: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FriendsApi.GetFriends: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -370,33 +311,13 @@ namespace Example } ``` -#### Using the GetFriendsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Friends - ApiResponse> response = apiInstance.GetFriendsWithHttpInfo(offset, n, offline); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FriendsApi.GetFriendsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **offset** | **int?** | A zero-based offset from the default object sorting from where search results start. | [optional] | -| **n** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **offline** | **bool?** | Returns *only* offline users if true, returns only online and active users if false | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **offset** | **int?**| A zero-based offset from the default object sorting from where search results start. | [optional] + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **offline** | **bool?**| Returns *only* offline users if true, returns only online and active users if false | [optional] ### Return type @@ -454,7 +375,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new FriendsApi(config); - var userId = "userId_example"; // string | + var userId = userId_example; // string | Must be a valid user ID. try { @@ -464,8 +385,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling FriendsApi.Unfriend: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling FriendsApi.Unfriend: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -473,31 +394,11 @@ namespace Example } ``` -#### Using the UnfriendWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Unfriend - ApiResponse response = apiInstance.UnfriendWithHttpInfo(userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling FriendsApi.UnfriendWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **userId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | ### Return type diff --git a/docs/Group.md b/docs/Group.md new file mode 100644 index 00000000..00caa08c --- /dev/null +++ b/docs/Group.md @@ -0,0 +1,34 @@ +# VRChat.API.Model.Group + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**Name** | **string** | | [optional] +**ShortCode** | **string** | | [optional] +**Discriminator** | **string** | | [optional] +**Description** | **string** | | [optional] +**IconUrl** | **string** | | [optional] +**BannerUrl** | **string** | | [optional] +**Privacy** | **GroupPrivacy** | | [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] +**Links** | **List<string>** | | [optional] +**Languages** | **List<string>** | | [optional] +**IconId** | **string** | | [optional] +**BannerId** | **string** | | [optional] +**MemberCount** | **int** | | [optional] +**MemberCountSyncedAt** | **DateTime** | | [optional] +**IsVerified** | **bool** | | [optional] [default to false] +**JoinState** | **GroupJoinState** | | [optional] +**Tags** | **List<string>** | | [optional] +**Galleries** | [**List<GroupGallery>**](GroupGallery.md) | | [optional] +**CreatedAt** | **DateTime** | | [optional] +**OnlineMemberCount** | **int** | | [optional] +**MembershipStatus** | **GroupMemberStatus** | | [optional] +**MyMember** | [**GroupMyMember**](GroupMyMember.md) | | [optional] +**Roles** | [**List<GroupRole>**](GroupRole.md) | Only returned if ?includeRoles=true is specified. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupAnnouncement.md b/docs/GroupAnnouncement.md new file mode 100644 index 00000000..69486a51 --- /dev/null +++ b/docs/GroupAnnouncement.md @@ -0,0 +1,18 @@ +# VRChat.API.Model.GroupAnnouncement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**GroupId** | **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] +**Title** | **string** | | [optional] +**Text** | **string** | | [optional] +**ImageId** | **string** | | [optional] +**ImageUrl** | **string** | | [optional] +**CreatedAt** | **DateTime?** | | [optional] +**UpdatedAt** | **DateTime?** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupAuditLogEntry.md b/docs/GroupAuditLogEntry.md new file mode 100644 index 00000000..e873e00a --- /dev/null +++ b/docs/GroupAuditLogEntry.md @@ -0,0 +1,18 @@ +# VRChat.API.Model.GroupAuditLogEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**CreatedAt** | **DateTime** | | [optional] +**GroupId** | **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] +**ActorDisplayname** | **string** | | [optional] +**TargetId** | **string** | Typically GroupID or GroupRoleID, but could be other types of IDs. | [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] [default to "group.update"] +**Description** | **string** | A human-readable description of the event. | [optional] +**Data** | **Object** | The data associated with the event. The format of this data is dependent on the event type. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupGallery.md b/docs/GroupGallery.md new file mode 100644 index 00000000..03341d5d --- /dev/null +++ b/docs/GroupGallery.md @@ -0,0 +1,19 @@ +# VRChat.API.Model.GroupGallery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**Name** | **string** | Name of the gallery. | [optional] +**Description** | **string** | Description of the gallery. | [optional] +**MembersOnly** | **bool** | Whether the gallery is members only. | [optional] [default to false] +**RoleIdsToView** | **List<string>** | | [optional] +**RoleIdsToSubmit** | **List<string>** | | [optional] +**RoleIdsToAutoApprove** | **List<string>** | | [optional] +**RoleIdsToManage** | **List<string>** | | [optional] +**CreatedAt** | **DateTime** | | [optional] +**UpdatedAt** | **DateTime** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupGalleryImage.md b/docs/GroupGalleryImage.md new file mode 100644 index 00000000..35e1c39b --- /dev/null +++ b/docs/GroupGalleryImage.md @@ -0,0 +1,19 @@ +# VRChat.API.Model.GroupGalleryImage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**GroupId** | **string** | | [optional] +**GalleryId** | **string** | | [optional] +**FileId** | **string** | | [optional] +**ImageUrl** | **string** | | [optional] +**CreatedAt** | **DateTime** | | [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] +**Approved** | **bool** | | [optional] [default to false] +**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] +**ApprovedAt** | **DateTime** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupJoinState.md b/docs/GroupJoinState.md new file mode 100644 index 00000000..81bedef2 --- /dev/null +++ b/docs/GroupJoinState.md @@ -0,0 +1,9 @@ +# VRChat.API.Model.GroupJoinState + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupLimitedMember.md b/docs/GroupLimitedMember.md new file mode 100644 index 00000000..37b505db --- /dev/null +++ b/docs/GroupLimitedMember.md @@ -0,0 +1,13 @@ +# VRChat.API.Model.GroupLimitedMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**GroupId** | **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] +**IsRepresenting** | **bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupMember.md b/docs/GroupMember.md new file mode 100644 index 00000000..ed8c7165 --- /dev/null +++ b/docs/GroupMember.md @@ -0,0 +1,22 @@ +# VRChat.API.Model.GroupMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**GroupId** | **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] +**IsRepresenting** | **bool** | Whether the user is representing the group. This makes the group show up above the name tag in-game. | [optional] [default to false] +**User** | [**GroupMemberLimitedUser**](GroupMemberLimitedUser.md) | | [optional] +**RoleIds** | **List<string>** | | [optional] +**JoinedAt** | **DateTime** | | [optional] +**MembershipStatus** | **string** | | [optional] +**Visibility** | **string** | | [optional] +**IsSubscribedToAnnouncements** | **bool** | | [optional] [default to false] +**CreatedAt** | **DateTime?** | Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. | [optional] +**BannedAt** | **DateTime?** | Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. | [optional] +**ManagerNotes** | **string** | Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupMemberLimitedUser.md b/docs/GroupMemberLimitedUser.md new file mode 100644 index 00000000..16bfe6b0 --- /dev/null +++ b/docs/GroupMemberLimitedUser.md @@ -0,0 +1,14 @@ +# VRChat.API.Model.GroupMemberLimitedUser +Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**DisplayName** | **string** | | [optional] +**ThumbnailUrl** | **string** | | [optional] +**IconUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupMemberStatus.md b/docs/GroupMemberStatus.md new file mode 100644 index 00000000..0c607daa --- /dev/null +++ b/docs/GroupMemberStatus.md @@ -0,0 +1,9 @@ +# VRChat.API.Model.GroupMemberStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupMyMember.md b/docs/GroupMyMember.md new file mode 100644 index 00000000..9b15cc41 --- /dev/null +++ b/docs/GroupMyMember.md @@ -0,0 +1,22 @@ +# VRChat.API.Model.GroupMyMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**GroupId** | **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] +**RoleIds** | **List<string>** | | [optional] +**ManagerNotes** | **string** | | [optional] +**MembershipStatus** | **string** | | [optional] +**IsSubscribedToAnnouncements** | **bool** | | [optional] [default to true] +**Visibility** | **string** | | [optional] +**IsRepresenting** | **bool** | | [optional] [default to false] +**JoinedAt** | **DateTime** | | [optional] +**BannedAt** | **string** | | [optional] +**Has2FA** | **bool** | | [optional] [default to false] +**Permissions** | **List<string>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupPermission.md b/docs/GroupPermission.md new file mode 100644 index 00000000..af33ef13 --- /dev/null +++ b/docs/GroupPermission.md @@ -0,0 +1,15 @@ +# VRChat.API.Model.GroupPermission +A permission that can be granted to a role in a group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the permission. | [optional] +**DisplayName** | **string** | The display name of the permission. | [optional] +**Help** | **string** | Human-readable description of the permission. | [optional] +**IsManagementPermission** | **bool** | Whether this permission is a \"management\" permission. | [optional] [default to false] +**AllowedToAdd** | **bool** | Whether the user is allowed to add this permission to a role. | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupPrivacy.md b/docs/GroupPrivacy.md new file mode 100644 index 00000000..6324348a --- /dev/null +++ b/docs/GroupPrivacy.md @@ -0,0 +1,9 @@ +# VRChat.API.Model.GroupPrivacy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupRole.md b/docs/GroupRole.md new file mode 100644 index 00000000..48097208 --- /dev/null +++ b/docs/GroupRole.md @@ -0,0 +1,21 @@ +# VRChat.API.Model.GroupRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**GroupId** | **string** | | [optional] +**Name** | **string** | | [optional] +**Description** | **string** | | [optional] +**IsSelfAssignable** | **bool** | | [optional] [default to false] +**Permissions** | **List<string>** | | [optional] +**IsManagementRole** | **bool** | | [optional] [default to false] +**RequiresTwoFactor** | **bool** | | [optional] [default to false] +**RequiresPurchase** | **bool** | | [optional] [default to false] +**Order** | **int** | | [optional] +**CreatedAt** | **DateTime** | | [optional] +**UpdatedAt** | **DateTime** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupRoleTemplate.md b/docs/GroupRoleTemplate.md new file mode 100644 index 00000000..55ab29e1 --- /dev/null +++ b/docs/GroupRoleTemplate.md @@ -0,0 +1,9 @@ +# VRChat.API.Model.GroupRoleTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupUserVisibility.md b/docs/GroupUserVisibility.md new file mode 100644 index 00000000..fcd7df62 --- /dev/null +++ b/docs/GroupUserVisibility.md @@ -0,0 +1,9 @@ +# VRChat.API.Model.GroupUserVisibility + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md new file mode 100644 index 00000000..2e8419f7 --- /dev/null +++ b/docs/GroupsApi.md @@ -0,0 +1,3077 @@ +# VRChat.API.Api.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 +[**BanGroupMember**](GroupsApi.md#bangroupmember) | **POST** /groups/{groupId}/bans | Ban Group Member +[**CancelGroupRequest**](GroupsApi.md#cancelgrouprequest) | **DELETE** /groups/{groupId}/requests | Cancel Group Join Request +[**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 +[**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 +[**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 +[**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 +[**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 +[**GetGroupRequests**](GroupsApi.md#getgrouprequests) | **GET** /groups/{groupId}/requests | Get Group Join Requests +[**GetGroupRoles**](GroupsApi.md#getgrouproles) | **GET** /groups/{groupId}/roles | Get Group Roles +[**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 +[**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 +[**UpdateGroupRole**](GroupsApi.md#updategrouprole) | **PUT** /groups/{groupId}/roles/{groupRoleId} | Update Group Role + + + +# **AddGroupGalleryImage** +> GroupGalleryImage AddGroupGalleryImage (string groupId, string groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest = null) + +Add Group Gallery Image + +Adds an image to a Group gallery. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class AddGroupGalleryImageExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var groupGalleryId = ggal_00000000-0000-0000-0000-000000000000; // string | Must be a valid group gallery ID. + var addGroupGalleryImageRequest = new AddGroupGalleryImageRequest(); // AddGroupGalleryImageRequest | (optional) + + try + { + // Add Group Gallery Image + GroupGalleryImage result = apiInstance.AddGroupGalleryImage(groupId, groupGalleryId, addGroupGalleryImageRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.AddGroupGalleryImage: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### 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)| | [optional] + +### Return type + +[**GroupGalleryImage**](GroupGalleryImage.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [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 apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **AddGroupMemberRole** +> List<string> AddGroupMemberRole (string groupId, string userId, string groupRoleId) + +Add Role to GroupMember + +Adds a Role to a Group Member + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class AddGroupMemberRoleExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var userId = userId_example; // string | Must be a valid user ID. + var groupRoleId = grol_00000000-0000-0000-0000-000000000000; // string | Must be a valid group role ID. + + try + { + // Add Role to GroupMember + List result = apiInstance.AddGroupMemberRole(groupId, userId, groupRoleId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.AddGroupMemberRole: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### 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** + +### 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 GroupRoleID objects. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **BanGroupMember** +> GroupMember BanGroupMember (string groupId, BanGroupMemberRequest banGroupMemberRequest = null) + +Ban Group Member + +Bans a user from a Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class BanGroupMemberExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var banGroupMemberRequest = new BanGroupMemberRequest(); // BanGroupMemberRequest | (optional) + + try + { + // Ban Group Member + GroupMember result = apiInstance.BanGroupMember(groupId, banGroupMemberRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.BanGroupMember: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **banGroupMemberRequest** | [**BanGroupMemberRequest**](BanGroupMemberRequest.md)| | [optional] + +### Return type + +[**GroupMember**](GroupMember.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [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 apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CancelGroupRequest** +> void CancelGroupRequest (string groupId) + +Cancel Group Join Request + +Cancels a request sent to join the group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class CancelGroupRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + + try + { + // Cancel Group Join Request + apiInstance.CancelGroupRequest(groupId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.CancelGroupRequest: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + +### Return type + +void (empty response body) + +### 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** | 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. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateGroup** +> Group CreateGroup (CreateGroupRequest createGroupRequest = null) + +Create Group + +Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class CreateGroupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var createGroupRequest = new CreateGroupRequest(); // CreateGroupRequest | (optional) + + try + { + // Create Group + Group result = apiInstance.CreateGroup(createGroupRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.CreateGroup: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createGroupRequest** | [**CreateGroupRequest**](CreateGroupRequest.md)| | [optional] + +### Return type + +[**Group**](Group.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [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 apiKey or auth cookie. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateGroupAnnouncement** +> GroupAnnouncement CreateGroupAnnouncement (string groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest = null) + +Create Group Announcement + +Creates an Announcement for a Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class CreateGroupAnnouncementExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var createGroupAnnouncementRequest = new CreateGroupAnnouncementRequest(); // CreateGroupAnnouncementRequest | (optional) + + try + { + // Create Group Announcement + GroupAnnouncement result = apiInstance.CreateGroupAnnouncement(groupId, createGroupAnnouncementRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.CreateGroupAnnouncement: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **createGroupAnnouncementRequest** | [**CreateGroupAnnouncementRequest**](CreateGroupAnnouncementRequest.md)| | [optional] + +### Return type + +[**GroupAnnouncement**](GroupAnnouncement.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [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 apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateGroupGallery** +> GroupGallery CreateGroupGallery (string groupId, CreateGroupGalleryRequest createGroupGalleryRequest = null) + +Create Group Gallery + +Creates a gallery for a Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class CreateGroupGalleryExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var createGroupGalleryRequest = new CreateGroupGalleryRequest(); // CreateGroupGalleryRequest | (optional) + + try + { + // Create Group Gallery + GroupGallery result = apiInstance.CreateGroupGallery(groupId, createGroupGalleryRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.CreateGroupGallery: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **createGroupGalleryRequest** | [**CreateGroupGalleryRequest**](CreateGroupGalleryRequest.md)| | [optional] + +### Return type + +[**GroupGallery**](GroupGallery.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [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 apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateGroupInvite** +> void CreateGroupInvite (string groupId, CreateGroupInviteRequest createGroupInviteRequest = null) + +Invite User to Group + +Sends an invite to a user to join the group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class CreateGroupInviteExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var createGroupInviteRequest = new CreateGroupInviteRequest(); // CreateGroupInviteRequest | (optional) + + try + { + // Invite User to Group + apiInstance.CreateGroupInvite(groupId, createGroupInviteRequest); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.CreateGroupInvite: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **createGroupInviteRequest** | [**CreateGroupInviteRequest**](CreateGroupInviteRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [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** | User <displayName> is already invited | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateGroupRole** +> GroupRole CreateGroupRole (string groupId, CreateGroupRoleRequest createGroupRoleRequest = null) + +Create GroupRole + +Create a Group role. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class CreateGroupRoleExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var createGroupRoleRequest = new CreateGroupRoleRequest(); // CreateGroupRoleRequest | (optional) + + try + { + // Create GroupRole + GroupRole result = apiInstance.CreateGroupRole(groupId, createGroupRoleRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.CreateGroupRole: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **createGroupRoleRequest** | [**CreateGroupRoleRequest**](CreateGroupRoleRequest.md)| | [optional] + +### Return type + +[**GroupRole**](GroupRole.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [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 apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteGroup** +> Success DeleteGroup (string groupId) + +Delete Group + +Deletes a Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class DeleteGroupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + + try + { + // Delete Group + Success result = apiInstance.DeleteGroup(groupId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.DeleteGroup: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + +### 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** | Successful response after deleting a Group. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteGroupAnnouncement** +> Success DeleteGroupAnnouncement (string groupId) + +Delete Group Announcement + +Deletes the announcement for a Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class DeleteGroupAnnouncementExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + + try + { + // Delete Group Announcement + Success result = apiInstance.DeleteGroupAnnouncement(groupId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.DeleteGroupAnnouncement: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + +### 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** | Successful response after deleting/clearing the group announcement. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteGroupGallery** +> Success DeleteGroupGallery (string groupId, string groupGalleryId) + +Delete Group Gallery + +Deletes a gallery for a Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class DeleteGroupGalleryExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var groupGalleryId = ggal_00000000-0000-0000-0000-000000000000; // string | Must be a valid group gallery ID. + + try + { + // Delete Group Gallery + Success result = apiInstance.DeleteGroupGallery(groupId, groupGalleryId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.DeleteGroupGallery: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### 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 + +[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** | Successful response after deleting a group gallery. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteGroupGalleryImage** +> Success DeleteGroupGalleryImage (string groupId, string groupGalleryId, string groupGalleryImageId) + +Delete Group Gallery Image + +Deletes an image from a Group gallery. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class DeleteGroupGalleryImageExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var groupGalleryId = ggal_00000000-0000-0000-0000-000000000000; // string | Must be a valid group gallery ID. + var groupGalleryImageId = ggim_00000000-0000-0000-0000-000000000000; // string | Must be a valid group gallery image ID. + + try + { + // Delete Group Gallery Image + Success result = apiInstance.DeleteGroupGalleryImage(groupId, groupGalleryId, groupGalleryImageId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.DeleteGroupGalleryImage: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### 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 + +[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** | Successful response after deleting a group gallery image. | - | +| **401** | Error response due to missing apiKey or 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. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteGroupInvite** +> void DeleteGroupInvite (string groupId, string userId) + +Delete User Invite + +Deletes an Group invite sent to a User + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class DeleteGroupInviteExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var userId = userId_example; // string | Must be a valid user ID. + + try + { + // Delete User Invite + apiInstance.DeleteGroupInvite(groupId, userId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.DeleteGroupInvite: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **userId** | **string**| Must be a valid user ID. | + +### Return type + +void (empty response body) + +### 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** | OK | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteGroupRole** +> List<GroupRole> DeleteGroupRole (string groupId, string groupRoleId) + +Delete Group Role + +Deletes a Group Role by ID and returns the remaining roles. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class DeleteGroupRoleExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var groupRoleId = grol_00000000-0000-0000-0000-000000000000; // string | Must be a valid group role ID. + + try + { + // Delete Group Role + List result = apiInstance.DeleteGroupRole(groupId, groupRoleId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.DeleteGroupRole: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### 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 + +[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 GroupRole objects. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a group you are not member of. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetGroup** +> Group GetGroup (string groupId, bool? includeRoles = null) + +Get Group by ID + +Returns a single Group by ID. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class GetGroupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var includeRoles = true; // bool? | Include roles for the Group object. Defaults to false. (optional) + + try + { + // Get Group by ID + Group result = apiInstance.GetGroup(groupId, includeRoles); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.GetGroup: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **includeRoles** | **bool?**| Include roles for the Group object. Defaults to false. | [optional] + +### Return type + +[**Group**](Group.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 Group object. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetGroupAnnouncements** +> GroupAnnouncement GetGroupAnnouncements (string 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 +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class GetGroupAnnouncementsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + + try + { + // Get Group Announcement + GroupAnnouncement result = apiInstance.GetGroupAnnouncements(groupId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.GetGroupAnnouncements: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + +### Return type + +[**GroupAnnouncement**](GroupAnnouncement.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 GroupAnnouncement object. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetGroupAuditLogs** +> PaginatedGroupAuditLogEntryList GetGroupAuditLogs (string groupId, int? n = null, int? offset = null, DateTime? startDate = null, DateTime? endDate = null) + +Get Group Audit Logs + +Returns a list of audit logs for a Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class GetGroupAuditLogsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var n = 56; // int? | The number of objects to return. (optional) (default to 60) + var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) + var startDate = 2013-10-20T19:20:30+01:00; // DateTime? | The start date of the search range. (optional) + var endDate = 2013-10-20T19:20:30+01:00; // DateTime? | The end date of the search range. (optional) + + try + { + // Get Group Audit Logs + PaginatedGroupAuditLogEntryList result = apiInstance.GetGroupAuditLogs(groupId, n, offset, startDate, endDate); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.GetGroupAuditLogs: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **offset** | **int?**| A zero-based offset from the default object sorting from where search results start. | [optional] + **startDate** | **DateTime?**| The start date of the search range. | [optional] + **endDate** | **DateTime?**| The end date of the search range. | [optional] + +### Return type + +[**PaginatedGroupAuditLogEntryList**](PaginatedGroupAuditLogEntryList.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 GroupAudit objects, wrapped in new pagination format. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetGroupBans** +> List<GroupMember> GetGroupBans (string groupId, int? n = null, int? offset = null) + +Get Group Bans + +Returns a list of banned users for a Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class GetGroupBansExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var n = 56; // int? | The number of objects to return. (optional) (default to 60) + var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) + + try + { + // Get Group Bans + List result = apiInstance.GetGroupBans(groupId, n, offset); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.GetGroupBans: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **offset** | **int?**| A zero-based offset from the default object sorting from where search results start. | [optional] + +### Return type + +[**List<GroupMember>**](GroupMember.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 GroupMember objects. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetGroupGalleryImages** +> List<GroupGalleryImage> GetGroupGalleryImages (string groupId, string groupGalleryId, int? n = null, int? offset = null, bool? approved = null) + +Get Group Gallery Images + +Returns a list of images for a Group gallery. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class GetGroupGalleryImagesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var groupGalleryId = ggal_00000000-0000-0000-0000-000000000000; // string | Must be a valid group gallery ID. + var n = 56; // int? | The number of objects to return. (optional) (default to 60) + var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) + var approved = true; // bool? | If specified, only returns images that have been approved or not approved. (optional) + + try + { + // Get Group Gallery Images + List result = apiInstance.GetGroupGalleryImages(groupId, groupGalleryId, n, offset, approved); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.GetGroupGalleryImages: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **groupGalleryId** | **string**| Must be a valid group gallery ID. | + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **offset** | **int?**| A zero-based offset from the default object sorting from where search results start. | [optional] + **approved** | **bool?**| If specified, only returns images that have been approved or not approved. | [optional] + +### Return type + +[**List<GroupGalleryImage>**](GroupGalleryImage.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 GroupGalleryImage objects. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetGroupInvites** +> List<GroupMember> GetGroupInvites (string groupId) + +Get Group Invites Sent + +Returns a list of members that have been invited to the Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class GetGroupInvitesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + + try + { + // Get Group Invites Sent + List result = apiInstance.GetGroupInvites(groupId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.GetGroupInvites: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + +### Return type + +[**List<GroupMember>**](GroupMember.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 GroupMember objects. | - | +| **401** | Error response due to missing apiKey or 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. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetGroupMember** +> GroupLimitedMember GetGroupMember (string groupId, string userId) + +Get Group Member + +Returns a LimitedGroup Member. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class GetGroupMemberExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var userId = userId_example; // string | Must be a valid user ID. + + try + { + // Get Group Member + GroupLimitedMember result = apiInstance.GetGroupMember(groupId, userId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.GetGroupMember: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **userId** | **string**| Must be a valid user ID. | + +### Return type + +[**GroupLimitedMember**](GroupLimitedMember.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 GroupMember objects. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetGroupMembers** +> List<GroupMember> GetGroupMembers (string groupId, int? n = null, int? offset = null) + +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 +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class GetGroupMembersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var n = 56; // int? | The number of objects to return. (optional) (default to 60) + var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) + + try + { + // List Group Members + List result = apiInstance.GetGroupMembers(groupId, n, offset); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.GetGroupMembers: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **offset** | **int?**| A zero-based offset from the default object sorting from where search results start. | [optional] + +### Return type + +[**List<GroupMember>**](GroupMember.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 GroupMember 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. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetGroupPermissions** +> List<GroupPermission> GetGroupPermissions (string groupId) + +List Group Permissions + +Returns a List of all possible/available permissions for a Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class GetGroupPermissionsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + + try + { + // List Group Permissions + List result = apiInstance.GetGroupPermissions(groupId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.GetGroupPermissions: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + +### Return type + +[**List<GroupPermission>**](GroupPermission.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 GroupPermission 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. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetGroupRequests** +> List<GroupMember> GetGroupRequests (string groupId) + +Get Group Join Requests + +Returns a list of members that have requested to join the Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class GetGroupRequestsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + + try + { + // Get Group Join Requests + List result = apiInstance.GetGroupRequests(groupId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.GetGroupRequests: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + +### Return type + +[**List<GroupMember>**](GroupMember.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 GroupMember objects. | - | +| **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. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetGroupRoles** +> List<GroupRole> GetGroupRoles (string groupId) + +Get Group Roles + +Returns a Group Role by ID. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class GetGroupRolesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + + try + { + // Get Group Roles + List result = apiInstance.GetGroupRoles(groupId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.GetGroupRoles: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + +### Return type + +[**List<GroupRole>**](GroupRole.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 GroupRole objects. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **JoinGroup** +> Group JoinGroup (string groupId) + +Join Group + +Join a Group by ID and returns the joined Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class JoinGroupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + + try + { + // Join Group + Group result = apiInstance.JoinGroup(groupId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.JoinGroup: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + +### Return type + +[**Group**](Group.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 Group object. | - | +| **400** | Error response when trying to join a group that the user is already a member of. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **KickGroupMember** +> void KickGroupMember (string groupId, string userId) + +Kick Group Member + +Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class KickGroupMemberExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var userId = userId_example; // string | Must be a valid user ID. + + try + { + // Kick Group Member + apiInstance.KickGroupMember(groupId, userId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.KickGroupMember: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **userId** | **string**| Must be a valid user ID. | + +### Return type + +void (empty response body) + +### 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** | OK | - | +| **401** | Error response due to missing apiKey or 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. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **LeaveGroup** +> void LeaveGroup (string groupId) + +Leave Group + +Leave a group by ID. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class LeaveGroupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + + try + { + // Leave Group + apiInstance.LeaveGroup(groupId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.LeaveGroup: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + +### Return type + +void (empty response body) + +### 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** | 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. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **RemoveGroupMemberRole** +> List<string> RemoveGroupMemberRole (string groupId, string userId, string groupRoleId) + +Remove Role from GroupMember + +Removes a Role from a Group Member + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class RemoveGroupMemberRoleExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var userId = userId_example; // string | Must be a valid user ID. + var groupRoleId = grol_00000000-0000-0000-0000-000000000000; // string | Must be a valid group role ID. + + try + { + // Remove Role from GroupMember + List result = apiInstance.RemoveGroupMemberRole(groupId, userId, groupRoleId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.RemoveGroupMemberRole: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### 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** + +### 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 GroupRoleID objects. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **RespondGroupJoinRequest** +> void RespondGroupJoinRequest (string groupId, string userId, RespondGroupJoinRequest respondGroupJoinRequest = null) + +Respond Group Join request + +Responds to a Group Join Request with Accept/Deny + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class RespondGroupJoinRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var userId = userId_example; // string | Must be a valid user ID. + var respondGroupJoinRequest = new RespondGroupJoinRequest(); // RespondGroupJoinRequest | (optional) + + try + { + // Respond Group Join request + apiInstance.RespondGroupJoinRequest(groupId, userId, respondGroupJoinRequest); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.RespondGroupJoinRequest: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### 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)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [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 apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UnbanGroupMember** +> GroupMember UnbanGroupMember (string groupId, string userId) + +Unban Group Member + +Unbans a user from a Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class UnbanGroupMemberExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var userId = userId_example; // string | Must be a valid user ID. + + try + { + // Unban Group Member + GroupMember result = apiInstance.UnbanGroupMember(groupId, userId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.UnbanGroupMember: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### 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 + +[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 GroupMember objects. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateGroup** +> Group UpdateGroup (string groupId, UpdateGroupRequest updateGroupRequest = null) + +Update Group + +Updates a Group and returns it. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class UpdateGroupExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var updateGroupRequest = new UpdateGroupRequest(); // UpdateGroupRequest | (optional) + + try + { + // Update Group + Group result = apiInstance.UpdateGroup(groupId, updateGroupRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.UpdateGroup: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| Must be a valid group ID. | + **updateGroupRequest** | [**UpdateGroupRequest**](UpdateGroupRequest.md)| | [optional] + +### Return type + +[**Group**](Group.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [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 apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateGroupGallery** +> GroupGallery UpdateGroupGallery (string groupId, string groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest = null) + +Update Group Gallery + +Updates a gallery for a Group. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class UpdateGroupGalleryExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var groupGalleryId = ggal_00000000-0000-0000-0000-000000000000; // string | Must be a valid group gallery ID. + var updateGroupGalleryRequest = new UpdateGroupGalleryRequest(); // UpdateGroupGalleryRequest | (optional) + + try + { + // Update Group Gallery + GroupGallery result = apiInstance.UpdateGroupGallery(groupId, groupGalleryId, updateGroupGalleryRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.UpdateGroupGallery: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### 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 + +[apiKeyCookie](../README.md#apiKeyCookie), [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 apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateGroupMember** +> GroupLimitedMember UpdateGroupMember (string groupId, string userId, UpdateGroupMemberRequest updateGroupMemberRequest = null) + +Update Group Member + +Updates a Group Member + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class UpdateGroupMemberExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var userId = userId_example; // string | Must be a valid user ID. + var updateGroupMemberRequest = new UpdateGroupMemberRequest(); // UpdateGroupMemberRequest | (optional) + + try + { + // Update Group Member + GroupLimitedMember result = apiInstance.UpdateGroupMember(groupId, userId, updateGroupMemberRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.UpdateGroupMember: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### 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 + +[**GroupLimitedMember**](GroupLimitedMember.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [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 apiKey or auth cookie. | - | +| **404** | Error response when trying to perform operations on a non-existing group. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateGroupRole** +> List<GroupRole> UpdateGroupRole (string groupId, string groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest = null) + +Update Group Role + +Updates a group role by ID. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example +{ + public class UpdateGroupRoleExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new GroupsApi(config); + var groupId = grp_00000000-0000-0000-0000-000000000000; // string | Must be a valid group ID. + var groupRoleId = grol_00000000-0000-0000-0000-000000000000; // string | Must be a valid group role ID. + var updateGroupRoleRequest = new UpdateGroupRoleRequest(); // UpdateGroupRoleRequest | (optional) + + try + { + // Update Group Role + List result = apiInstance.UpdateGroupRole(groupId, groupRoleId, updateGroupRoleRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling GroupsApi.UpdateGroupRole: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### 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 + +[apiKeyCookie](../README.md#apiKeyCookie), [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 apiKey or auth cookie. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InfoPush.md b/docs/InfoPush.md index b3d847c1..a6b37546 100644 --- a/docs/InfoPush.md +++ b/docs/InfoPush.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **IsEnabled** | **bool** | | [default to true] **ReleaseStatus** | **ReleaseStatus** | | **Priority** | **int** | | -**Tags** | **List<string>** | | +**Tags** | **List<string>** | | **Data** | [**InfoPushData**](InfoPushData.md) | | **Hash** | **string** | Unknown usage, MD5 | **CreatedAt** | **DateTime** | | diff --git a/docs/InstancesApi.md b/docs/InstancesApi.md index f47d76c8..977750b0 100644 --- a/docs/InstancesApi.md +++ b/docs/InstancesApi.md @@ -2,12 +2,13 @@ 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 | -| [**GetInstanceByShortName**](InstancesApi.md#getinstancebyshortname) | **GET** /instances/s/{shortName} | Get Instance By Short Name | -| [**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 +------------- | ------------- | ------------- +[**GetInstance**](InstancesApi.md#getinstance) | **GET** /instances/{worldId}:{instanceId} | Get Instance +[**GetInstanceByShortName**](InstancesApi.md#getinstancebyshortname) | **GET** /instances/s/{shortName} | Get Instance By Short Name +[**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 + # **GetInstance** @@ -43,8 +44,8 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InstancesApi(config); - var worldId = "worldId_example"; // string | - var instanceId = "instanceId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. + var instanceId = instanceId_example; // string | Must be a valid instance ID. try { @@ -54,8 +55,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InstancesApi.GetInstance: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InstancesApi.GetInstance: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -63,32 +64,12 @@ namespace Example } ``` -#### Using the GetInstanceWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Instance - ApiResponse response = apiInstance.GetInstanceWithHttpInfo(worldId, instanceId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InstancesApi.GetInstanceWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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 @@ -146,7 +127,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InstancesApi(config); - var shortName = "shortName_example"; // string | + var shortName = shortName_example; // string | Must be a valid instance short name. try { @@ -156,8 +137,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InstancesApi.GetInstanceByShortName: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InstancesApi.GetInstanceByShortName: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -165,31 +146,11 @@ namespace Example } ``` -#### Using the GetInstanceByShortNameWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Instance By Short Name - ApiResponse response = apiInstance.GetInstanceByShortNameWithHttpInfo(shortName); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InstancesApi.GetInstanceByShortNameWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **shortName** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **shortName** | **string**| Must be a valid instance short name. | ### Return type @@ -248,8 +209,8 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InstancesApi(config); - var worldId = "worldId_example"; // string | - var instanceId = "instanceId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. + var instanceId = instanceId_example; // string | Must be a valid instance ID. try { @@ -259,8 +220,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InstancesApi.GetShortName: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InstancesApi.GetShortName: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -268,32 +229,12 @@ namespace Example } ``` -#### Using the GetShortNameWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Instance Short Name - ApiResponse response = apiInstance.GetShortNameWithHttpInfo(worldId, instanceId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InstancesApi.GetShortNameWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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 @@ -351,8 +292,8 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InstancesApi(config); - var worldId = "worldId_example"; // string | - var instanceId = "instanceId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. + var instanceId = instanceId_example; // string | Must be a valid instance ID. try { @@ -362,8 +303,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InstancesApi.SendSelfInvite: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InstancesApi.SendSelfInvite: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -371,32 +312,12 @@ namespace Example } ``` -#### Using the SendSelfInviteWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Send Self Invite - ApiResponse response = apiInstance.SendSelfInviteWithHttpInfo(worldId, instanceId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InstancesApi.SendSelfInviteWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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 diff --git a/docs/InviteApi.md b/docs/InviteApi.md index 2c51c496..54012445 100644 --- a/docs/InviteApi.md +++ b/docs/InviteApi.md @@ -2,20 +2,21 @@ 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 | -| [**InviteMyselfTo**](InviteApi.md#invitemyselfto) | **POST** /invite/myself/to/{worldId}:{instanceId} | Invite Myself To Instance | -| [**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 +[**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 + # **GetInviteMessage** -> InviteMessage GetInviteMessage (string userId, string messageType, int slot) +> InviteMessage GetInviteMessage (string userId, InviteMessageType messageType, int slot) Get Invite Message @@ -47,9 +48,9 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InviteApi(config); - var userId = "userId_example"; // string | - var messageType = "message"; // string | - var slot = 56; // int | + var userId = userId_example; // string | Must be a valid user ID. + var messageType = ; // InviteMessageType | The type of message to fetch, must be a valid InviteMessageType. + var slot = 56; // int | The message slot to fetch of a given message type. try { @@ -59,8 +60,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InviteApi.GetInviteMessage: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InviteApi.GetInviteMessage: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -68,33 +69,13 @@ namespace Example } ``` -#### Using the GetInviteMessageWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Invite Message - ApiResponse response = apiInstance.GetInviteMessageWithHttpInfo(userId, messageType, slot); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InviteApi.GetInviteMessageWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **userId** | **string** | | | -| **messageType** | **string** | | | -| **slot** | **int** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | + **messageType** | **InviteMessageType**| The type of message to fetch, must be a valid InviteMessageType. | + **slot** | **int**| The message slot to fetch of a given message type. | ### Return type @@ -122,7 +103,7 @@ catch (ApiException e) # **GetInviteMessages** -> List<InviteMessage> GetInviteMessages (string userId, string messageType) +> List<InviteMessage> GetInviteMessages (string userId, InviteMessageType messageType) List Invite Messages @@ -154,8 +135,8 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InviteApi(config); - var userId = "userId_example"; // string | - var messageType = "message"; // string | + var userId = userId_example; // string | Must be a valid user ID. + var messageType = ; // InviteMessageType | The type of message to fetch, must be a valid InviteMessageType. try { @@ -165,8 +146,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InviteApi.GetInviteMessages: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InviteApi.GetInviteMessages: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -174,32 +155,12 @@ namespace Example } ``` -#### Using the GetInviteMessagesWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Invite Messages - ApiResponse> response = apiInstance.GetInviteMessagesWithHttpInfo(userId, messageType); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InviteApi.GetInviteMessagesWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **userId** | **string** | | | -| **messageType** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | + **messageType** | **InviteMessageType**| The type of message to fetch, must be a valid InviteMessageType. | ### Return type @@ -258,8 +219,8 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InviteApi(config); - var worldId = "worldId_example"; // string | - var instanceId = "instanceId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. + var instanceId = instanceId_example; // string | Must be a valid instance ID. try { @@ -269,8 +230,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InviteApi.InviteMyselfTo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InviteApi.InviteMyselfTo: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -278,32 +239,12 @@ namespace Example } ``` -#### Using the InviteMyselfToWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Invite Myself To Instance - ApiResponse response = apiInstance.InviteMyselfToWithHttpInfo(worldId, instanceId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InviteApi.InviteMyselfToWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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 @@ -362,7 +303,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InviteApi(config); - var userId = "userId_example"; // string | + var userId = userId_example; // string | Must be a valid user ID. var inviteRequest = new InviteRequest(); // InviteRequest | Slot number of the Invite Message to use when inviting a user. (optional) try @@ -373,8 +314,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InviteApi.InviteUser: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InviteApi.InviteUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -382,32 +323,12 @@ namespace Example } ``` -#### Using the InviteUserWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Invite User - ApiResponse response = apiInstance.InviteUserWithHttpInfo(userId, inviteRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InviteApi.InviteUserWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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. | [optional] ### Return type @@ -465,7 +386,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InviteApi(config); - var userId = "userId_example"; // string | + var userId = userId_example; // string | Must be a valid user ID. var requestInviteRequest = new RequestInviteRequest(); // RequestInviteRequest | Slot number of the Request Message to use when request an invite. (optional) try @@ -476,8 +397,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InviteApi.RequestInvite: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InviteApi.RequestInvite: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -485,32 +406,12 @@ namespace Example } ``` -#### Using the RequestInviteWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Request Invite - ApiResponse response = apiInstance.RequestInviteWithHttpInfo(userId, requestInviteRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InviteApi.RequestInviteWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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 @@ -536,7 +437,7 @@ catch (ApiException e) # **ResetInviteMessage** -> List<InviteMessage> ResetInviteMessage (string userId, string messageType, int slot) +> List<InviteMessage> ResetInviteMessage (string userId, InviteMessageType messageType, int slot) Reset Invite Message @@ -568,9 +469,9 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InviteApi(config); - var userId = "userId_example"; // string | - var messageType = "message"; // string | - var slot = 56; // int | + var userId = userId_example; // string | Must be a valid user ID. + var messageType = ; // InviteMessageType | The type of message to fetch, must be a valid InviteMessageType. + var slot = 56; // int | The message slot to fetch of a given message type. try { @@ -580,8 +481,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InviteApi.ResetInviteMessage: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InviteApi.ResetInviteMessage: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -589,33 +490,13 @@ namespace Example } ``` -#### Using the ResetInviteMessageWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Reset Invite Message - ApiResponse> response = apiInstance.ResetInviteMessageWithHttpInfo(userId, messageType, slot); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InviteApi.ResetInviteMessageWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **userId** | **string** | | | -| **messageType** | **string** | | | -| **slot** | **int** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | + **messageType** | **InviteMessageType**| The type of message to fetch, must be a valid InviteMessageType. | + **slot** | **int**| The message slot to fetch of a given message type. | ### Return type @@ -676,7 +557,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InviteApi(config); - var notificationId = "notificationId_example"; // string | + var notificationId = notificationId_example; // string | Must be a valid notification ID. var inviteResponse = new InviteResponse(); // InviteResponse | Slot number of the Response Message to use when responding to a user. (optional) try @@ -687,8 +568,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InviteApi.RespondInvite: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InviteApi.RespondInvite: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -696,32 +577,12 @@ namespace Example } ``` -#### Using the RespondInviteWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Respond Invite - ApiResponse response = apiInstance.RespondInviteWithHttpInfo(notificationId, inviteResponse); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InviteApi.RespondInviteWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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. | [optional] ### Return type @@ -747,7 +608,7 @@ catch (ApiException e) # **UpdateInviteMessage** -> List<InviteMessage> UpdateInviteMessage (string userId, string messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = null) +> List<InviteMessage> UpdateInviteMessage (string userId, InviteMessageType messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = null) Update Invite Message @@ -779,9 +640,9 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new InviteApi(config); - var userId = "userId_example"; // string | - var messageType = "message"; // string | - var slot = 56; // int | + var userId = userId_example; // string | Must be a valid user ID. + var messageType = ; // InviteMessageType | The type of message to fetch, must be a valid InviteMessageType. + var slot = 56; // int | The message slot to fetch of a given message type. var updateInviteMessageRequest = new UpdateInviteMessageRequest(); // UpdateInviteMessageRequest | Message of what to set the invite message to. (optional) try @@ -792,8 +653,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling InviteApi.UpdateInviteMessage: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling InviteApi.UpdateInviteMessage: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -801,34 +662,14 @@ namespace Example } ``` -#### Using the UpdateInviteMessageWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Update Invite Message - ApiResponse> response = apiInstance.UpdateInviteMessageWithHttpInfo(userId, messageType, slot, updateInviteMessageRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling InviteApi.UpdateInviteMessageWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **userId** | **string** | | | -| **messageType** | **string** | | | -| **slot** | **int** | | | -| **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**| The type of message to fetch, must be a valid InviteMessageType. | + **slot** | **int**| 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 diff --git a/docs/LimitedWorld.md b/docs/LimitedWorld.md index 152e92f7..b4107024 100644 --- a/docs/LimitedWorld.md +++ b/docs/LimitedWorld.md @@ -19,9 +19,9 @@ Name | Type | Description | Notes **Popularity** | **int** | | [default to 0] **PublicationDate** | **string** | | **ReleaseStatus** | **ReleaseStatus** | | -**Tags** | **List<string>** | | +**Tags** | **List<string>** | | **ThumbnailImageUrl** | **string** | | -**UnityPackages** | [**List<LimitedUnityPackage>**](LimitedUnityPackage.md) | | +**UnityPackages** | [**List<LimitedUnityPackage>**](LimitedUnityPackage.md) | | **UpdatedAt** | **DateTime** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Notification.md b/docs/Notification.md index 72afca46..c644cf30 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -5,10 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CreatedAt** | **DateTime** | | -**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. | [default to "{}"] +**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. | [default to "{}"] **Id** | **string** | | **Message** | **string** | | -**Seen** | **bool** | | [default to false] +**Seen** | **bool** | Not included in notification objects received from the Websocket API | [optional] [default to false] +**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] **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/NotificationsApi.md b/docs/NotificationsApi.md index 5e9f6074..9318637d 100644 --- a/docs/NotificationsApi.md +++ b/docs/NotificationsApi.md @@ -2,13 +2,14 @@ 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 +[**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 + # **AcceptFriendRequest** @@ -44,7 +45,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new NotificationsApi(config); - var notificationId = "notificationId_example"; // string | + var notificationId = notificationId_example; // string | Must be a valid notification ID. try { @@ -54,8 +55,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling NotificationsApi.AcceptFriendRequest: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling NotificationsApi.AcceptFriendRequest: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -63,31 +64,11 @@ namespace Example } ``` -#### Using the AcceptFriendRequestWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Accept Friend Request - ApiResponse response = apiInstance.AcceptFriendRequestWithHttpInfo(notificationId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling NotificationsApi.AcceptFriendRequestWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **notificationId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **notificationId** | **string**| Must be a valid notification ID. | ### Return type @@ -155,8 +136,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling NotificationsApi.ClearNotifications: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling NotificationsApi.ClearNotifications: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -164,28 +145,9 @@ namespace Example } ``` -#### Using the ClearNotificationsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Clear All Notifications - ApiResponse response = apiInstance.ClearNotificationsWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling NotificationsApi.ClearNotificationsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type [**Success**](Success.md) @@ -242,7 +204,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new NotificationsApi(config); - var notificationId = "notificationId_example"; // string | + var notificationId = notificationId_example; // string | Must be a valid notification ID. try { @@ -252,8 +214,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling NotificationsApi.DeleteNotification: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling NotificationsApi.DeleteNotification: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -261,31 +223,11 @@ namespace Example } ``` -#### Using the DeleteNotificationWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Delete Notification - ApiResponse response = apiInstance.DeleteNotificationWithHttpInfo(notificationId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling NotificationsApi.DeleteNotificationWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **notificationId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **notificationId** | **string**| Must be a valid notification ID. | ### Return type @@ -347,7 +289,7 @@ namespace Example var sent = true; // bool? | Return notifications sent by the user. Must be false or omitted. (optional) var hidden = true; // bool? | Whether to return hidden or non-hidden notifications. True only allowed on type `friendRequest`. (optional) var after = five_minutes_ago; // string | Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) - var n = 60; // int? | The number of objects to return. (optional) (default to 60) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) try @@ -358,8 +300,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling NotificationsApi.GetNotifications: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling NotificationsApi.GetNotifications: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -367,36 +309,16 @@ namespace Example } ``` -#### Using the GetNotificationsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Notifications - ApiResponse> response = apiInstance.GetNotificationsWithHttpInfo(type, sent, hidden, after, n, offset); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling NotificationsApi.GetNotificationsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| 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** | **bool?** | Return notifications sent by the user. Must be false or omitted. | [optional] | -| **hidden** | **bool?** | 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** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **offset** | **int?** | 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** | **bool?**| Return notifications sent by the user. Must be false or omitted. | [optional] + **hidden** | **bool?**| 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** | **int?**| The number of objects to return. | [optional] [default to 60] + **offset** | **int?**| A zero-based offset from the default object sorting from where search results start. | [optional] ### Return type @@ -454,7 +376,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new NotificationsApi(config); - var notificationId = "notificationId_example"; // string | + var notificationId = notificationId_example; // string | Must be a valid notification ID. try { @@ -464,8 +386,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling NotificationsApi.MarkNotificationAsRead: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling NotificationsApi.MarkNotificationAsRead: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -473,31 +395,11 @@ namespace Example } ``` -#### Using the MarkNotificationAsReadWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Mark Notification As Read - ApiResponse response = apiInstance.MarkNotificationAsReadWithHttpInfo(notificationId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling NotificationsApi.MarkNotificationAsReadWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **notificationId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **notificationId** | **string**| Must be a valid notification ID. | ### Return type diff --git a/docs/OrderOption.md b/docs/OrderOption.md new file mode 100644 index 00000000..a86511e0 --- /dev/null +++ b/docs/OrderOption.md @@ -0,0 +1,9 @@ +# VRChat.API.Model.OrderOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PaginatedGroupAuditLogEntryList.md b/docs/PaginatedGroupAuditLogEntryList.md new file mode 100644 index 00000000..136a0751 --- /dev/null +++ b/docs/PaginatedGroupAuditLogEntryList.md @@ -0,0 +1,12 @@ +# VRChat.API.Model.PaginatedGroupAuditLogEntryList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**List<GroupAuditLogEntry>**](GroupAuditLogEntry.md) | | [optional] +**TotalCount** | **int** | The total number of results that the query would return if there were no pagination. | [optional] +**HasNext** | **bool** | Whether there are more results after this page. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PermissionsApi.md b/docs/PermissionsApi.md index 09f9aa6b..6841b668 100644 --- a/docs/PermissionsApi.md +++ b/docs/PermissionsApi.md @@ -2,10 +2,11 @@ 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 | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAssignedPermissions**](PermissionsApi.md#getassignedpermissions) | **GET** /auth/permissions | Get Assigned Permissions +[**GetPermission**](PermissionsApi.md#getpermission) | **GET** /permissions/{permissionId} | Get Permission + # **GetAssignedPermissions** @@ -50,8 +51,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling PermissionsApi.GetAssignedPermissions: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling PermissionsApi.GetAssignedPermissions: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -59,28 +60,9 @@ namespace Example } ``` -#### Using the GetAssignedPermissionsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Assigned Permissions - ApiResponse> response = apiInstance.GetAssignedPermissionsWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling PermissionsApi.GetAssignedPermissionsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type [**List<Permission>**](Permission.md) @@ -137,7 +119,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new PermissionsApi(config); - var permissionId = "permissionId_example"; // string | + var permissionId = permissionId_example; // string | Must be a valid permission ID. try { @@ -147,8 +129,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling PermissionsApi.GetPermission: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling PermissionsApi.GetPermission: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -156,31 +138,11 @@ namespace Example } ``` -#### Using the GetPermissionWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Permission - ApiResponse response = apiInstance.GetPermissionWithHttpInfo(permissionId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling PermissionsApi.GetPermissionWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **permissionId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **permissionId** | **string**| Must be a valid permission ID. | ### Return type diff --git a/docs/PlayermoderationApi.md b/docs/PlayermoderationApi.md index 9135fa16..f51c6e52 100644 --- a/docs/PlayermoderationApi.md +++ b/docs/PlayermoderationApi.md @@ -2,14 +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 +[**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 + # **ClearAllPlayerModerations** @@ -54,8 +55,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling PlayermoderationApi.ClearAllPlayerModerations: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling PlayermoderationApi.ClearAllPlayerModerations: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -63,28 +64,9 @@ namespace Example } ``` -#### Using the ClearAllPlayerModerationsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Clear All Player Moderations - ApiResponse response = apiInstance.ClearAllPlayerModerationsWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling PlayermoderationApi.ClearAllPlayerModerationsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type [**Success**](Success.md) @@ -141,7 +123,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new PlayermoderationApi(config); - var playerModerationId = "playerModerationId_example"; // string | + var playerModerationId = playerModerationId_example; // string | Must be a valid `pmod_` ID. try { @@ -151,8 +133,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling PlayermoderationApi.DeletePlayerModeration: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling PlayermoderationApi.DeletePlayerModeration: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -160,31 +142,11 @@ namespace Example } ``` -#### Using the DeletePlayerModerationWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Delete Player Moderation - ApiResponse response = apiInstance.DeletePlayerModerationWithHttpInfo(playerModerationId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling PlayermoderationApi.DeletePlayerModerationWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **playerModerationId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **playerModerationId** | **string**| Must be a valid `pmod_` ID. | ### Return type @@ -243,7 +205,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new PlayermoderationApi(config); - var playerModerationId = "playerModerationId_example"; // string | + var playerModerationId = playerModerationId_example; // string | Must be a valid `pmod_` ID. try { @@ -253,8 +215,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling PlayermoderationApi.GetPlayerModeration: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling PlayermoderationApi.GetPlayerModeration: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -262,31 +224,11 @@ namespace Example } ``` -#### Using the GetPlayerModerationWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get Player Moderation - ApiResponse response = apiInstance.GetPlayerModerationWithHttpInfo(playerModerationId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling PlayermoderationApi.GetPlayerModerationWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **playerModerationId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **playerModerationId** | **string**| Must be a valid `pmod_` ID. | ### Return type @@ -345,8 +287,8 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new PlayermoderationApi(config); - var type = "type_example"; // string | Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) - var targetUserId = "targetUserId_example"; // string | Must be valid UserID. (optional) + var type = type_example; // string | Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) + var targetUserId = targetUserId_example; // string | Must be valid UserID. (optional) try { @@ -356,8 +298,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling PlayermoderationApi.GetPlayerModerations: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling PlayermoderationApi.GetPlayerModerations: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -365,32 +307,12 @@ namespace Example } ``` -#### Using the GetPlayerModerationsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Search Player Moderations - ApiResponse> response = apiInstance.GetPlayerModerationsWithHttpInfo(type, targetUserId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling PlayermoderationApi.GetPlayerModerationsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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** | **string**| Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. | [optional] + **targetUserId** | **string**| Must be valid UserID. | [optional] ### Return type @@ -458,8 +380,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling PlayermoderationApi.ModerateUser: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling PlayermoderationApi.ModerateUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -467,31 +389,11 @@ namespace Example } ``` -#### Using the ModerateUserWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Moderate User - ApiResponse response = apiInstance.ModerateUserWithHttpInfo(moderateUserRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling PlayermoderationApi.ModerateUserWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **moderateUserRequest** | [**ModerateUserRequest**](ModerateUserRequest.md) | | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **moderateUserRequest** | [**ModerateUserRequest**](ModerateUserRequest.md)| | [optional] ### Return type @@ -559,8 +461,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling PlayermoderationApi.UnmoderateUser: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling PlayermoderationApi.UnmoderateUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -568,31 +470,11 @@ namespace Example } ``` -#### Using the UnmoderateUserWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Unmoderate User - ApiResponse response = apiInstance.UnmoderateUserWithHttpInfo(moderateUserRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling PlayermoderationApi.UnmoderateUserWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **moderateUserRequest** | [**ModerateUserRequest**](ModerateUserRequest.md) | | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **moderateUserRequest** | [**ModerateUserRequest**](ModerateUserRequest.md)| | [optional] ### Return type diff --git a/docs/RespondGroupJoinRequest.md b/docs/RespondGroupJoinRequest.md new file mode 100644 index 00000000..3f382619 --- /dev/null +++ b/docs/RespondGroupJoinRequest.md @@ -0,0 +1,10 @@ +# VRChat.API.Model.RespondGroupJoinRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Action** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SortOption.md b/docs/SortOption.md new file mode 100644 index 00000000..952e6cd8 --- /dev/null +++ b/docs/SortOption.md @@ -0,0 +1,9 @@ +# VRChat.API.Model.SortOption + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SystemApi.md b/docs/SystemApi.md index fe907fce..26da679a 100644 --- a/docs/SystemApi.md +++ b/docs/SystemApi.md @@ -2,15 +2,16 @@ 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 +------------- | ------------- | ------------- +[**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 + # **GetCSS** @@ -37,8 +38,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://api.vrchat.cloud/api/1"; var apiInstance = new SystemApi(config); - var 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. (optional) (default to public) - var branch = "\"main\""; // string | Specifies which git branch the site should load frontend source code from. (optional) (default to "main") + var variant = variant_example; // 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) + var branch = branch_example; // string | Specifies which git branch the site should load frontend source code from. (optional) (default to "main") try { @@ -48,8 +49,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling SystemApi.GetCSS: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling SystemApi.GetCSS: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -57,32 +58,12 @@ namespace Example } ``` -#### Using the GetCSSWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Download CSS - ApiResponse response = apiInstance.GetCSSWithHttpInfo(variant, branch); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling SystemApi.GetCSSWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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] | -| **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] + **branch** | **string**| Specifies which git branch the site should load frontend source code from. | [optional] [default to "main"] ### Return type @@ -140,8 +121,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling SystemApi.GetConfig: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling SystemApi.GetConfig: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -149,28 +130,9 @@ namespace Example } ``` -#### Using the GetConfigWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Fetch API Config - ApiResponse response = apiInstance.GetConfigWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling SystemApi.GetConfigWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type [**APIConfig**](APIConfig.md) @@ -226,8 +188,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling SystemApi.GetCurrentOnlineUsers: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling SystemApi.GetCurrentOnlineUsers: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -235,28 +197,9 @@ namespace Example } ``` -#### Using the GetCurrentOnlineUsersWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Current Online Users - ApiResponse response = apiInstance.GetCurrentOnlineUsersWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling SystemApi.GetCurrentOnlineUsersWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type **int** @@ -312,8 +255,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling SystemApi.GetHealth: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling SystemApi.GetHealth: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -321,28 +264,9 @@ namespace Example } ``` -#### Using the GetHealthWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Check API Health - ApiResponse response = apiInstance.GetHealthWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling SystemApi.GetHealthWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type [**APIHealth**](APIHealth.md) @@ -389,8 +313,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://api.vrchat.cloud/api/1"; var apiInstance = new SystemApi(config); - var require = "require_example"; // string | Tags to include (comma-separated). All of the tags needs to be present. (optional) - var include = "include_example"; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) + var require = require_example; // string | Tags to include (comma-separated). All of the tags needs to be present. (optional) + var include = include_example; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) try { @@ -400,8 +324,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling SystemApi.GetInfoPush: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling SystemApi.GetInfoPush: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -409,32 +333,12 @@ namespace Example } ``` -#### Using the GetInfoPushWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Show Information Notices - ApiResponse> response = apiInstance.GetInfoPushWithHttpInfo(require, include); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling SystemApi.GetInfoPushWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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 @@ -482,8 +386,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://api.vrchat.cloud/api/1"; var apiInstance = new SystemApi(config); - var 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. (optional) (default to public) - var branch = "\"main\""; // string | Specifies which git branch the site should load frontend source code from. (optional) (default to "main") + var variant = variant_example; // 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) + var branch = branch_example; // string | Specifies which git branch the site should load frontend source code from. (optional) (default to "main") try { @@ -493,8 +397,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling SystemApi.GetJavaScript: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling SystemApi.GetJavaScript: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -502,32 +406,12 @@ namespace Example } ``` -#### Using the GetJavaScriptWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Download JavaScript - ApiResponse response = apiInstance.GetJavaScriptWithHttpInfo(variant, branch); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling SystemApi.GetJavaScriptWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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] | -| **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] + **branch** | **string**| Specifies which git branch the site should load frontend source code from. | [optional] [default to "main"] ### Return type @@ -585,8 +469,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling SystemApi.GetSystemTime: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling SystemApi.GetSystemTime: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -594,28 +478,9 @@ namespace Example } ``` -#### Using the GetSystemTimeWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Current System Time - ApiResponse response = apiInstance.GetSystemTimeWithHttpInfo(); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling SystemApi.GetSystemTimeWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters This endpoint does not need any parameter. + ### Return type **DateTime** diff --git a/docs/UpdateAvatarRequest.md b/docs/UpdateAvatarRequest.md index e82411d3..b4304695 100644 --- a/docs/UpdateAvatarRequest.md +++ b/docs/UpdateAvatarRequest.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Id** | **string** | | [optional] **Name** | **string** | | [optional] **Description** | **string** | | [optional] -**Tags** | **List<string>** | | [optional] +**Tags** | **List<string>** | | [optional] **ImageUrl** | **string** | | [optional] **ReleaseStatus** | **ReleaseStatus** | | [optional] **_Version** | **decimal** | | [optional] [default to 1M] diff --git a/docs/UpdateGroupGalleryRequest.md b/docs/UpdateGroupGalleryRequest.md new file mode 100644 index 00000000..5dc90e83 --- /dev/null +++ b/docs/UpdateGroupGalleryRequest.md @@ -0,0 +1,16 @@ +# VRChat.API.Model.UpdateGroupGalleryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the gallery. | [optional] +**Description** | **string** | Description of the gallery. | [optional] +**MembersOnly** | **bool** | Whether the gallery is members only. | [optional] [default to false] +**RoleIdsToView** | **List<string>** | | [optional] +**RoleIdsToSubmit** | **List<string>** | | [optional] +**RoleIdsToAutoApprove** | **List<string>** | | [optional] +**RoleIdsToManage** | **List<string>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateGroupMemberRequest.md b/docs/UpdateGroupMemberRequest.md new file mode 100644 index 00000000..ec70d030 --- /dev/null +++ b/docs/UpdateGroupMemberRequest.md @@ -0,0 +1,12 @@ +# VRChat.API.Model.UpdateGroupMemberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Visibility** | **GroupUserVisibility** | | [optional] +**IsSubscribedToAnnouncements** | **bool** | | [optional] +**ManagerNotes** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateGroupRequest.md b/docs/UpdateGroupRequest.md new file mode 100644 index 00000000..a647baf3 --- /dev/null +++ b/docs/UpdateGroupRequest.md @@ -0,0 +1,19 @@ +# VRChat.API.Model.UpdateGroupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] +**ShortCode** | **string** | | [optional] +**Description** | **string** | | [optional] +**JoinState** | **GroupJoinState** | | [optional] +**IconId** | **string** | | [optional] [default to "null"] +**BannerId** | **string** | | [optional] [default to "null"] +**Languages** | **List<string>** | 3 letter language code | [optional] +**Links** | **List<string>** | | [optional] +**Rules** | **string** | | [optional] +**Tags** | **List<string>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateGroupRoleRequest.md b/docs/UpdateGroupRoleRequest.md new file mode 100644 index 00000000..c532e4d4 --- /dev/null +++ b/docs/UpdateGroupRoleRequest.md @@ -0,0 +1,14 @@ +# VRChat.API.Model.UpdateGroupRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] +**Description** | **string** | | [optional] +**IsSelfAssignable** | **bool** | | [optional] [default to false] +**Permissions** | **List<string>** | | [optional] +**Order** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateUserRequest.md b/docs/UpdateUserRequest.md index 09a02ff7..c4d1ff34 100644 --- a/docs/UpdateUserRequest.md +++ b/docs/UpdateUserRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Email** | **string** | | [optional] **Birthday** | **DateTime** | | [optional] **AcceptedTOSVersion** | **decimal** | | [optional] -**Tags** | **List<string>** | | [optional] +**Tags** | **List<string>** | | [optional] **Status** | **UserStatus** | | [optional] **StatusDescription** | **string** | | [optional] **Bio** | **string** | | [optional] diff --git a/docs/UpdateWorldRequest.md b/docs/UpdateWorldRequest.md index 8053ad62..f3ab7583 100644 --- a/docs/UpdateWorldRequest.md +++ b/docs/UpdateWorldRequest.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **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] +**Tags** | **List<string>** | | [optional] **UnityPackageUrl** | **string** | | [optional] **UnityVersion** | **string** | | [optional] [default to "5.3.4p1"] diff --git a/docs/User.md b/docs/User.md index ea2175f2..425abcf7 100644 --- a/docs/User.md +++ b/docs/User.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes **State** | **UserState** | | **Status** | **UserStatus** | | **StatusDescription** | **string** | | -**Tags** | **List<string>** | | +**Tags** | **List<string>** | | **TravelingToInstance** | **string** | | [optional] **TravelingToLocation** | **string** | | [optional] **TravelingToWorld** | **string** | | [optional] diff --git a/docs/UsersApi.md b/docs/UsersApi.md index 67f3a54f..af397b1d 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -2,12 +2,15 @@ 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 +------------- | ------------- | ------------- +[**GetUser**](UsersApi.md#getuser) | **GET** /users/{userId} | Get User by ID +[**GetUserByName**](UsersApi.md#getuserbyname) | **GET** /users/{username}/name | Get User by Username +[**GetUserGroupRequests**](UsersApi.md#getusergrouprequests) | **GET** /users/{userId}/groups/requested | Get User Group Requests +[**GetUserGroups**](UsersApi.md#getusergroups) | **GET** /users/{userId}/groups | Get User Groups +[**SearchUsers**](UsersApi.md#searchusers) | **GET** /users | Search All Users +[**UpdateUser**](UsersApi.md#updateuser) | **PUT** /users/{userId} | Update User Info + # **GetUser** @@ -43,7 +46,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new UsersApi(config); - var userId = "userId_example"; // string | + var userId = userId_example; // string | Must be a valid user ID. try { @@ -53,8 +56,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling UsersApi.GetUser: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling UsersApi.GetUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -62,31 +65,11 @@ namespace Example } ``` -#### Using the GetUserWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get User by ID - ApiResponse response = apiInstance.GetUserWithHttpInfo(userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling UsersApi.GetUserWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **userId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | ### Return type @@ -144,7 +127,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new UsersApi(config); - var username = "username_example"; // string | + var username = username_example; // string | Username of the user try { @@ -154,8 +137,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling UsersApi.GetUserByName: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling UsersApi.GetUserByName: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -163,35 +146,177 @@ namespace Example } ``` -#### Using the GetUserByNameWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **string**| Username of the user | + +### Return type + +[**User**](User.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 User object. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetUserGroupRequests** +> List<Group> GetUserGroupRequests (string userId) + +Get User Group Requests + +Returns a list of Groups the user has requested to be invited into. + +### Example ```csharp -try +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example { - // Get User by Username - ApiResponse response = apiInstance.GetUserByNameWithHttpInfo(username); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); + public class GetUserGroupRequestsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new UsersApi(config); + var userId = userId_example; // string | Must be a valid user ID. + + try + { + // Get User Group Requests + List result = apiInstance.GetUserGroupRequests(userId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling UsersApi.GetUserGroupRequests: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } } -catch (ApiException e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | + +### Return type + +[**List<Group>**](Group.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 Group objects. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetUserGroups** +> List<Group> GetUserGroups (string userId) + +Get User Groups + +Get user's public groups + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace Example { - Debug.Print("Exception when calling UsersApi.GetUserByNameWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); + public class GetUserGroupsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.vrchat.cloud/api/1"; + // Configure API key authorization: apiKeyCookie + config.AddApiKey("apiKey", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("apiKey", "Bearer"); + // Configure API key authorization: authCookie + config.AddApiKey("auth", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("auth", "Bearer"); + + var apiInstance = new UsersApi(config); + var userId = userId_example; // string | Must be a valid user ID. + + try + { + // Get User Groups + List result = apiInstance.GetUserGroups(userId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling UsersApi.GetUserGroups: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } } ``` ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **username** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| Must be a valid user ID. | ### Return type -[**User**](User.md) +[**List<Group>**](Group.md) ### Authorization @@ -206,7 +331,7 @@ catch (ApiException e) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single User object. | - | +| **200** | Returns a list of Group objects. | - | | **401** | Error response due to missing apiKey or auth cookie. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -245,9 +370,9 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new UsersApi(config); - var search = "search_example"; // string | Searches by `displayName`. Will return empty array if search query is empty or missing. (optional) - var developerType = "developerType_example"; // string | Active user by developer type, none for normal users and internal for moderators (optional) - var n = 60; // int? | The number of objects to return. (optional) (default to 60) + var search = search_example; // string | Searches by `displayName`. Will return empty array if search query is empty or missing. (optional) + var developerType = developerType_example; // string | Active user by developer type, none for normal users and internal for moderators (optional) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) try @@ -258,8 +383,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling UsersApi.SearchUsers: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling UsersApi.SearchUsers: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -267,34 +392,14 @@ namespace Example } ``` -#### Using the SearchUsersWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Search All Users - ApiResponse> response = apiInstance.SearchUsersWithHttpInfo(search, developerType, n, offset); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling UsersApi.SearchUsersWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **offset** | **int?** | 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** | **int?**| The number of objects to return. | [optional] [default to 60] + **offset** | **int?**| A zero-based offset from the default object sorting from where search results start. | [optional] ### Return type @@ -353,7 +458,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new UsersApi(config); - var userId = "userId_example"; // string | + var userId = userId_example; // string | Must be a valid user ID. var updateUserRequest = new UpdateUserRequest(); // UpdateUserRequest | (optional) try @@ -364,8 +469,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling UsersApi.UpdateUser: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling UsersApi.UpdateUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -373,32 +478,12 @@ namespace Example } ``` -#### Using the UpdateUserWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Update User Info - ApiResponse response = apiInstance.UpdateUserWithHttpInfo(userId, updateUserRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling UsersApi.UpdateUserWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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 @@ -418,6 +503,7 @@ catch (ApiException e) | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Returns a single CurrentUser object. | - | +| **401** | Error response due to missing apiKey or auth cookie. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/World.md b/docs/World.md index 200b3d53..d04a7ed1 100644 --- a/docs/World.md +++ b/docs/World.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes **PublicOccupants** | **int** | Will always be `0` when unauthenticated. | [optional] [default to 0] **PublicationDate** | **string** | | **ReleaseStatus** | **ReleaseStatus** | | -**Tags** | **List<string>** | | +**Tags** | **List<string>** | | **ThumbnailImageUrl** | **string** | | **UnityPackages** | [**List<UnityPackage>**](UnityPackage.md) | Empty if unauthenticated. | **UpdatedAt** | **DateTime** | | diff --git a/docs/WorldsApi.md b/docs/WorldsApi.md index 727a1c0c..b4d6099a 100644 --- a/docs/WorldsApi.md +++ b/docs/WorldsApi.md @@ -2,21 +2,22 @@ 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 +------------- | ------------- | ------------- +[**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 + # **CreateWorld** @@ -53,8 +54,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.CreateWorld: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.CreateWorld: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -62,31 +63,11 @@ namespace Example } ``` -#### Using the CreateWorldWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Create World - ApiResponse response = apiInstance.CreateWorldWithHttpInfo(createWorldRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.CreateWorldWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **createWorldRequest** | [**CreateWorldRequest**](CreateWorldRequest.md) | | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createWorldRequest** | [**CreateWorldRequest**](CreateWorldRequest.md)| | [optional] ### Return type @@ -145,7 +126,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new WorldsApi(config); - var worldId = "worldId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. try { @@ -154,8 +135,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.DeleteWorld: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.DeleteWorld: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -163,28 +144,11 @@ namespace Example } ``` -#### Using the DeleteWorldWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Delete World - apiInstance.DeleteWorldWithHttpInfo(worldId); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.DeleteWorldWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **worldId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **worldId** | **string**| Must be a valid world ID. | ### Return type @@ -211,7 +175,7 @@ void (empty response body) # **GetActiveWorlds** -> List<LimitedWorld> GetActiveWorlds (bool? featured = null, string sort = null, int? n = null, string order = null, int? offset = null, string search = null, string tag = null, string notag = null, string releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null) +> List<LimitedWorld> GetActiveWorlds (bool? featured = null, SortOption? sort = null, int? n = null, OrderOption? order = null, int? offset = null, string search = null, string tag = null, string notag = null, ReleaseStatus? releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null) List Active Worlds @@ -244,17 +208,17 @@ namespace Example var apiInstance = new WorldsApi(config); var featured = true; // bool? | Filters on featured results. (optional) - var sort = popularity; // string | (optional) (default to popularity) - var n = 60; // int? | The number of objects to return. (optional) (default to 60) - var order = descending; // string | (optional) (default to descending) + var sort = ; // SortOption? | The sort order of the results. (optional) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) + var order = ; // OrderOption? | Result ordering (optional) var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) - var search = "search_example"; // string | Filters by world name. (optional) - var tag = "tag_example"; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) - var notag = "notag_example"; // string | Tags to exclude (comma-separated). (optional) - var releaseStatus = "public"; // string | Filter by ReleaseStatus. (optional) (default to public) - var maxUnityVersion = "maxUnityVersion_example"; // string | The maximum Unity version supported by the asset. (optional) - var minUnityVersion = "minUnityVersion_example"; // string | The minimum Unity version supported by the asset. (optional) - var platform = "platform_example"; // string | The platform the asset supports. (optional) + var search = search_example; // string | Filters by world name. (optional) + var tag = tag_example; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) + var notag = notag_example; // string | Tags to exclude (comma-separated). (optional) + var releaseStatus = ; // ReleaseStatus? | Filter by ReleaseStatus. (optional) + var maxUnityVersion = maxUnityVersion_example; // string | The maximum Unity version supported by the asset. (optional) + var minUnityVersion = minUnityVersion_example; // string | The minimum Unity version supported by the asset. (optional) + var platform = platform_example; // string | The platform the asset supports. (optional) try { @@ -264,8 +228,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.GetActiveWorlds: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.GetActiveWorlds: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -273,42 +237,22 @@ namespace Example } ``` -#### Using the GetActiveWorldsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Active Worlds - ApiResponse> response = apiInstance.GetActiveWorldsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.GetActiveWorldsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **featured** | **bool?** | Filters on featured results. | [optional] | -| **sort** | **string** | | [optional] [default to popularity] | -| **n** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **order** | **string** | | [optional] [default to descending] | -| **offset** | **int?** | 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] | -| **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** | **bool?**| Filters on featured results. | [optional] + **sort** | **SortOption?**| The sort order of the results. | [optional] + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **order** | **OrderOption?**| Result ordering | [optional] + **offset** | **int?**| 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?**| Filter by ReleaseStatus. | [optional] + **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] ### Return type @@ -334,7 +278,7 @@ catch (ApiException e) # **GetFavoritedWorlds** -> List<LimitedWorld> GetFavoritedWorlds (bool? featured = null, string sort = null, int? n = null, string order = null, int? offset = null, string search = null, string tag = null, string notag = null, string releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null, string userId = null) +> List<LimitedWorld> GetFavoritedWorlds (bool? featured = null, SortOption? sort = null, int? n = null, OrderOption? order = null, int? offset = null, string search = null, string tag = null, string notag = null, ReleaseStatus? releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null, string userId = null) List Favorited Worlds @@ -367,18 +311,18 @@ namespace Example var apiInstance = new WorldsApi(config); var featured = true; // bool? | Filters on featured results. (optional) - var sort = popularity; // string | (optional) (default to popularity) - var n = 60; // int? | The number of objects to return. (optional) (default to 60) - var order = descending; // string | (optional) (default to descending) + var sort = ; // SortOption? | The sort order of the results. (optional) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) + var order = ; // OrderOption? | Result ordering (optional) var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) - var search = "search_example"; // string | Filters by world name. (optional) - var tag = "tag_example"; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) - var notag = "notag_example"; // string | Tags to exclude (comma-separated). (optional) - var releaseStatus = "public"; // string | Filter by ReleaseStatus. (optional) (default to public) - var maxUnityVersion = "maxUnityVersion_example"; // string | The maximum Unity version supported by the asset. (optional) - var minUnityVersion = "minUnityVersion_example"; // string | The minimum Unity version supported by the asset. (optional) - var platform = "platform_example"; // string | The platform the asset supports. (optional) - var userId = "userId_example"; // string | Target user to see information on, admin-only. (optional) + var search = search_example; // string | Filters by world name. (optional) + var tag = tag_example; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) + var notag = notag_example; // string | Tags to exclude (comma-separated). (optional) + var releaseStatus = ; // ReleaseStatus? | Filter by ReleaseStatus. (optional) + var maxUnityVersion = maxUnityVersion_example; // string | The maximum Unity version supported by the asset. (optional) + var minUnityVersion = minUnityVersion_example; // string | The minimum Unity version supported by the asset. (optional) + var platform = platform_example; // string | The platform the asset supports. (optional) + var userId = userId_example; // string | Target user to see information on, admin-only. (optional) try { @@ -388,8 +332,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.GetFavoritedWorlds: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.GetFavoritedWorlds: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -397,43 +341,23 @@ namespace Example } ``` -#### Using the GetFavoritedWorldsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Favorited Worlds - ApiResponse> response = apiInstance.GetFavoritedWorldsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.GetFavoritedWorldsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **featured** | **bool?** | Filters on featured results. | [optional] | -| **sort** | **string** | | [optional] [default to popularity] | -| **n** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **order** | **string** | | [optional] [default to descending] | -| **offset** | **int?** | 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] | -| **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** | **bool?**| Filters on featured results. | [optional] + **sort** | **SortOption?**| The sort order of the results. | [optional] + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **order** | **OrderOption?**| Result ordering | [optional] + **offset** | **int?**| 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?**| Filter by ReleaseStatus. | [optional] + **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 @@ -460,7 +384,7 @@ catch (ApiException e) # **GetRecentWorlds** -> List<LimitedWorld> GetRecentWorlds (bool? featured = null, string sort = null, int? n = null, string order = null, int? offset = null, string search = null, string tag = null, string notag = null, string releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null, string userId = null) +> List<LimitedWorld> GetRecentWorlds (bool? featured = null, SortOption? sort = null, int? n = null, OrderOption? order = null, int? offset = null, string search = null, string tag = null, string notag = null, ReleaseStatus? releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null, string userId = null) List Recent Worlds @@ -493,18 +417,18 @@ namespace Example var apiInstance = new WorldsApi(config); var featured = true; // bool? | Filters on featured results. (optional) - var sort = popularity; // string | (optional) (default to popularity) - var n = 60; // int? | The number of objects to return. (optional) (default to 60) - var order = descending; // string | (optional) (default to descending) + var sort = ; // SortOption? | The sort order of the results. (optional) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) + var order = ; // OrderOption? | Result ordering (optional) var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) - var search = "search_example"; // string | Filters by world name. (optional) - var tag = "tag_example"; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) - var notag = "notag_example"; // string | Tags to exclude (comma-separated). (optional) - var releaseStatus = "public"; // string | Filter by ReleaseStatus. (optional) (default to public) - var maxUnityVersion = "maxUnityVersion_example"; // string | The maximum Unity version supported by the asset. (optional) - var minUnityVersion = "minUnityVersion_example"; // string | The minimum Unity version supported by the asset. (optional) - var platform = "platform_example"; // string | The platform the asset supports. (optional) - var userId = "userId_example"; // string | Target user to see information on, admin-only. (optional) + var search = search_example; // string | Filters by world name. (optional) + var tag = tag_example; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) + var notag = notag_example; // string | Tags to exclude (comma-separated). (optional) + var releaseStatus = ; // ReleaseStatus? | Filter by ReleaseStatus. (optional) + var maxUnityVersion = maxUnityVersion_example; // string | The maximum Unity version supported by the asset. (optional) + var minUnityVersion = minUnityVersion_example; // string | The minimum Unity version supported by the asset. (optional) + var platform = platform_example; // string | The platform the asset supports. (optional) + var userId = userId_example; // string | Target user to see information on, admin-only. (optional) try { @@ -514,8 +438,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.GetRecentWorlds: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.GetRecentWorlds: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -523,43 +447,23 @@ namespace Example } ``` -#### Using the GetRecentWorldsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // List Recent Worlds - ApiResponse> response = apiInstance.GetRecentWorldsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.GetRecentWorldsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **featured** | **bool?** | Filters on featured results. | [optional] | -| **sort** | **string** | | [optional] [default to popularity] | -| **n** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **order** | **string** | | [optional] [default to descending] | -| **offset** | **int?** | 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] | -| **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** | **bool?**| Filters on featured results. | [optional] + **sort** | **SortOption?**| The sort order of the results. | [optional] + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **order** | **OrderOption?**| Result ordering | [optional] + **offset** | **int?**| 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?**| Filter by ReleaseStatus. | [optional] + **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 @@ -614,7 +518,7 @@ namespace Example // config.AddApiKeyPrefix("apiKey", "Bearer"); var apiInstance = new WorldsApi(config); - var worldId = "worldId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. try { @@ -624,8 +528,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.GetWorld: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.GetWorld: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -633,31 +537,11 @@ namespace Example } ``` -#### Using the GetWorldWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get World by ID - ApiResponse response = apiInstance.GetWorldWithHttpInfo(worldId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.GetWorldWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **worldId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **worldId** | **string**| Must be a valid world ID. | ### Return type @@ -715,8 +599,8 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new WorldsApi(config); - var worldId = "worldId_example"; // string | - var instanceId = "instanceId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. + var instanceId = instanceId_example; // string | Must be a valid instance ID. try { @@ -726,8 +610,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.GetWorldInstance: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.GetWorldInstance: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -735,32 +619,12 @@ namespace Example } ``` -#### Using the GetWorldInstanceWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get World Instance - ApiResponse response = apiInstance.GetWorldInstanceWithHttpInfo(worldId, instanceId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.GetWorldInstanceWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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 @@ -818,7 +682,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new WorldsApi(config); - var worldId = "worldId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. try { @@ -828,8 +692,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.GetWorldMetadata: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.GetWorldMetadata: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -837,31 +701,11 @@ namespace Example } ``` -#### Using the GetWorldMetadataWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get World Metadata - ApiResponse response = apiInstance.GetWorldMetadataWithHttpInfo(worldId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.GetWorldMetadataWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **worldId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **worldId** | **string**| Must be a valid world ID. | ### Return type @@ -919,7 +763,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new WorldsApi(config); - var worldId = "worldId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. try { @@ -929,8 +773,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.GetWorldPublishStatus: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.GetWorldPublishStatus: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -938,31 +782,11 @@ namespace Example } ``` -#### Using the GetWorldPublishStatusWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Get World Publish Status - ApiResponse response = apiInstance.GetWorldPublishStatusWithHttpInfo(worldId); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.GetWorldPublishStatusWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **worldId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **worldId** | **string**| Must be a valid world ID. | ### Return type @@ -1021,7 +845,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new WorldsApi(config); - var worldId = "worldId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. try { @@ -1030,8 +854,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.PublishWorld: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.PublishWorld: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1039,28 +863,11 @@ namespace Example } ``` -#### Using the PublishWorldWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Publish World - apiInstance.PublishWorldWithHttpInfo(worldId); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.PublishWorldWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **worldId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **worldId** | **string**| Must be a valid world ID. | ### Return type @@ -1087,7 +894,7 @@ void (empty response body) # **SearchWorlds** -> List<LimitedWorld> SearchWorlds (bool? featured = null, string sort = null, string user = null, string userId = null, int? n = null, string order = null, int? offset = null, string search = null, string tag = null, string notag = null, string releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null) +> List<LimitedWorld> SearchWorlds (bool? featured = null, SortOption? sort = null, string user = null, string userId = null, int? n = null, OrderOption? order = null, int? offset = null, string search = null, string tag = null, string notag = null, ReleaseStatus? releaseStatus = null, string maxUnityVersion = null, string minUnityVersion = null, string platform = null) Search All Worlds @@ -1120,19 +927,19 @@ namespace Example var apiInstance = new WorldsApi(config); var featured = true; // bool? | Filters on featured results. (optional) - var sort = popularity; // string | (optional) (default to popularity) - var user = "me"; // string | Set to `me` for searching own worlds. (optional) - var userId = "userId_example"; // string | Filter by UserID. (optional) - var n = 60; // int? | The number of objects to return. (optional) (default to 60) - var order = descending; // string | (optional) (default to descending) + var sort = ; // SortOption? | The sort order of the results. (optional) + var user = user_example; // string | Set to `me` for searching own worlds. (optional) + var userId = userId_example; // string | Filter by UserID. (optional) + var n = 56; // int? | The number of objects to return. (optional) (default to 60) + var order = ; // OrderOption? | Result ordering (optional) var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional) - var search = "search_example"; // string | Filters by world name. (optional) - var tag = "tag_example"; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) - var notag = "notag_example"; // string | Tags to exclude (comma-separated). (optional) - var releaseStatus = "public"; // string | Filter by ReleaseStatus. (optional) (default to public) - var maxUnityVersion = "maxUnityVersion_example"; // string | The maximum Unity version supported by the asset. (optional) - var minUnityVersion = "minUnityVersion_example"; // string | The minimum Unity version supported by the asset. (optional) - var platform = "platform_example"; // string | The platform the asset supports. (optional) + var search = search_example; // string | Filters by world name. (optional) + var tag = tag_example; // string | Tags to include (comma-separated). Any of the tags needs to be present. (optional) + var notag = notag_example; // string | Tags to exclude (comma-separated). (optional) + var releaseStatus = ; // ReleaseStatus? | Filter by ReleaseStatus. (optional) + var maxUnityVersion = maxUnityVersion_example; // string | The maximum Unity version supported by the asset. (optional) + var minUnityVersion = minUnityVersion_example; // string | The minimum Unity version supported by the asset. (optional) + var platform = platform_example; // string | The platform the asset supports. (optional) try { @@ -1142,8 +949,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.SearchWorlds: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.SearchWorlds: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1151,44 +958,24 @@ namespace Example } ``` -#### Using the SearchWorldsWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Search All Worlds - ApiResponse> response = apiInstance.SearchWorldsWithHttpInfo(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.SearchWorldsWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **featured** | **bool?** | Filters on featured results. | [optional] | -| **sort** | **string** | | [optional] [default to popularity] | -| **user** | **string** | Set to `me` for searching own worlds. | [optional] | -| **userId** | **string** | Filter by UserID. | [optional] | -| **n** | **int?** | The number of objects to return. | [optional] [default to 60] | -| **order** | **string** | | [optional] [default to descending] | -| **offset** | **int?** | 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] | -| **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** | **bool?**| Filters on featured results. | [optional] + **sort** | **SortOption?**| The sort order of the results. | [optional] + **user** | **string**| Set to `me` for searching own worlds. | [optional] + **userId** | **string**| Filter by UserID. | [optional] + **n** | **int?**| The number of objects to return. | [optional] [default to 60] + **order** | **OrderOption?**| Result ordering | [optional] + **offset** | **int?**| 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?**| Filter by ReleaseStatus. | [optional] + **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] ### Return type @@ -1246,7 +1033,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new WorldsApi(config); - var worldId = "worldId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. try { @@ -1255,8 +1042,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.UnpublishWorld: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.UnpublishWorld: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1264,28 +1051,11 @@ namespace Example } ``` -#### Using the UnpublishWorldWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Unpublish World - apiInstance.UnpublishWorldWithHttpInfo(worldId); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.UnpublishWorldWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### Parameters -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| **worldId** | **string** | | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **worldId** | **string**| Must be a valid world ID. | ### Return type @@ -1344,7 +1114,7 @@ namespace Example // config.AddApiKeyPrefix("auth", "Bearer"); var apiInstance = new WorldsApi(config); - var worldId = "worldId_example"; // string | + var worldId = worldId_example; // string | Must be a valid world ID. var updateWorldRequest = new UpdateWorldRequest(); // UpdateWorldRequest | (optional) try @@ -1355,8 +1125,8 @@ namespace Example } catch (ApiException e) { - Debug.Print("Exception when calling WorldsApi.UpdateWorld: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print("Exception when calling WorldsApi.UpdateWorld: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1364,32 +1134,12 @@ namespace Example } ``` -#### Using the UpdateWorldWithHttpInfo variant -This returns an ApiResponse object which contains the response data, status code and headers. - -```csharp -try -{ - // Update World - ApiResponse response = apiInstance.UpdateWorldWithHttpInfo(worldId, updateWorldRequest); - Debug.Write("Status Code: " + response.StatusCode); - Debug.Write("Response Headers: " + response.Headers); - Debug.Write("Response Body: " + response.Data); -} -catch (ApiException e) -{ - Debug.Print("Exception when calling WorldsApi.UpdateWorldWithHttpInfo: " + e.Message); - Debug.Print("Status Code: " + e.ErrorCode); - Debug.Print(e.StackTrace); -} -``` - ### 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 diff --git a/openapitools.json b/openapitools.json index f5f966a1..3b40e47a 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "6.2.1" + "version": "5.3.0" } } diff --git a/src/README.md b/src/README.md new file mode 100644 index 00000000..2d0e18ff --- /dev/null +++ b/src/README.md @@ -0,0 +1,267 @@ +![](https://raw.githubusercontent.com/vrchatapi/vrchatapi.github.io/main/static/assets/img/lang/lang_csharp_banner_1500x300.png) + +# VRChat API Library for C# + +A C# client to interact with the unofficial VRChat API. Supports all REST calls specified in https://github.com/vrchatapi/specification. + +## Disclaimer + +This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. + +> Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind: +> * We do not provide documentation or support for the API. +> * Do not make queries to the API more than once per 60 seconds. +> * Abuse of the API may result in account termination. +> * Access to API endpoints may break at any given time, with no warning. + +As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. + +## Installation + +Install with NuGet: + +```bash +# With .NET CLI +dotnet add package VRChat.API --version + +# Or with Package Manager +Install-Package VRChat.API -Version +``` + +## Getting Started + +The following example code authenticates you with the API, fetches your join-date, and prints the name of a world. + +```csharp +using System; +using VRChat.API.Api; +using VRChat.API.Client; +using VRChat.API.Model; + + +// Authentication credentials +Configuration Config = new Configuration(); +Config.Username = "username"; +Config.Password = "password"; + +// Create instances of API's we'll need +AuthenticationApi AuthApi = new AuthenticationApi(Config); +UsersApi UserApi = new UsersApi(Config); +WorldsApi WorldApi = new WorldsApi(Config); + +try +{ + // Calling "GetCurrentUser(Async)" logs you in if you are not already logged in. + CurrentUser CurrentUser = await AuthApi.GetCurrentUserAsync(); + Console.WriteLine("Logged in as {0}, Current Avatar {1}", CurrentUser.DisplayName, CurrentUser.CurrentAvatar); + + User OtherUser = await UserApi.GetUserAsync("usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469"); + Console.WriteLine("Found user {0}, joined {1}", OtherUser.DisplayName, OtherUser.DateJoined); + + World World = await WorldApi.GetWorldAsync("wrld_ba913a96-fac4-4048-a062-9aa5db092812"); + Console.WriteLine("Found world {0}, visits: {1}", World.Name, World.Visits); +} +catch (ApiException e) +{ + Console.WriteLine("Exception when calling API: {0}", e.Message); + Console.WriteLine("Status Code: {0}", e.ErrorCode); + Console.WriteLine(e.ToString()); +} +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.vrchat.cloud/api/1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthenticationApi* | [**CheckUserExists**](docs/AuthenticationApi.md#checkuserexists) | **GET** /auth/exists | Check User Exists +*AuthenticationApi* | [**DeleteUser**](docs/AuthenticationApi.md#deleteuser) | **PUT** /user/{userId}/delete | Delete User +*AuthenticationApi* | [**GetCurrentUser**](docs/AuthenticationApi.md#getcurrentuser) | **GET** /auth/user | Login and/or Get Current User Info +*AuthenticationApi* | [**Logout**](docs/AuthenticationApi.md#logout) | **PUT** /logout | Logout +*AuthenticationApi* | [**Verify2FA**](docs/AuthenticationApi.md#verify2fa) | **POST** /auth/twofactorauth/totp/verify | Verify 2FA code +*AuthenticationApi* | [**VerifyAuthToken**](docs/AuthenticationApi.md#verifyauthtoken) | **GET** /auth | Verify Auth Token +*AuthenticationApi* | [**VerifyRecoveryCode**](docs/AuthenticationApi.md#verifyrecoverycode) | **POST** /auth/twofactorauth/otp/verify | Verify 2FA code with Recovery code +*AvatarsApi* | [**CreateAvatar**](docs/AvatarsApi.md#createavatar) | **POST** /avatars | Create Avatar +*AvatarsApi* | [**DeleteAvatar**](docs/AvatarsApi.md#deleteavatar) | **DELETE** /avatars/{avatarId} | Delete Avatar +*AvatarsApi* | [**GetAvatar**](docs/AvatarsApi.md#getavatar) | **GET** /avatars/{avatarId} | Get Avatar +*AvatarsApi* | [**GetFavoritedAvatars**](docs/AvatarsApi.md#getfavoritedavatars) | **GET** /avatars/favorites | List Favorited Avatars +*AvatarsApi* | [**SearchAvatars**](docs/AvatarsApi.md#searchavatars) | **GET** /avatars | Search Avatars +*AvatarsApi* | [**SelectAvatar**](docs/AvatarsApi.md#selectavatar) | **PUT** /avatars/{avatarId}/select | Select Avatar +*AvatarsApi* | [**SelectFallbackAvatar**](docs/AvatarsApi.md#selectfallbackavatar) | **PUT** /avatars/{avatarId}/selectFallback | Select Fallback Avatar +*AvatarsApi* | [**UpdateAvatar**](docs/AvatarsApi.md#updateavatar) | **PUT** /avatars/{avatarId} | Update Avatar +*EconomyApi* | [**GetCurrentSubscriptions**](docs/EconomyApi.md#getcurrentsubscriptions) | **GET** /auth/user/subscription | Get Current Subscriptions +*EconomyApi* | [**GetLicenseGroup**](docs/EconomyApi.md#getlicensegroup) | **GET** /licenseGroups/{licenseGroupId} | Get License Group +*EconomyApi* | [**GetSteamTransaction**](docs/EconomyApi.md#getsteamtransaction) | **GET** /Steam/transactions/{transactionId} | Get Steam Transaction +*EconomyApi* | [**GetSteamTransactions**](docs/EconomyApi.md#getsteamtransactions) | **GET** /Steam/transactions | List Steam Transactions +*EconomyApi* | [**GetSubscriptions**](docs/EconomyApi.md#getsubscriptions) | **GET** /subscriptions | List Subscriptions +*FavoritesApi* | [**AddFavorite**](docs/FavoritesApi.md#addfavorite) | **POST** /favorites | Add Favorite +*FavoritesApi* | [**ClearFavoriteGroup**](docs/FavoritesApi.md#clearfavoritegroup) | **DELETE** /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} | Clear Favorite Group +*FavoritesApi* | [**GetFavorite**](docs/FavoritesApi.md#getfavorite) | **GET** /favorites/{favoriteId} | Show Favorite +*FavoritesApi* | [**GetFavoriteGroup**](docs/FavoritesApi.md#getfavoritegroup) | **GET** /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} | Show Favorite Group +*FavoritesApi* | [**GetFavoriteGroups**](docs/FavoritesApi.md#getfavoritegroups) | **GET** /favorite/groups | List Favorite Groups +*FavoritesApi* | [**GetFavorites**](docs/FavoritesApi.md#getfavorites) | **GET** /favorites | List Favorites +*FavoritesApi* | [**RemoveFavorite**](docs/FavoritesApi.md#removefavorite) | **DELETE** /favorites/{favoriteId} | Remove Favorite +*FavoritesApi* | [**UpdateFavoriteGroup**](docs/FavoritesApi.md#updatefavoritegroup) | **PUT** /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} | Update Favorite Group +*FilesApi* | [**CreateFile**](docs/FilesApi.md#createfile) | **POST** /file | Create File +*FilesApi* | [**CreateFileVersion**](docs/FilesApi.md#createfileversion) | **POST** /file/{fileId} | Create File Version +*FilesApi* | [**DeleteFile**](docs/FilesApi.md#deletefile) | **DELETE** /file/{fileId} | Delete File +*FilesApi* | [**DeleteFileVersion**](docs/FilesApi.md#deletefileversion) | **DELETE** /file/{fileId}/{versionId} | Delete File Version +*FilesApi* | [**DownloadFileVersion**](docs/FilesApi.md#downloadfileversion) | **GET** /file/{fileId}/{versionId} | Download File Version +*FilesApi* | [**FinishFileDataUpload**](docs/FilesApi.md#finishfiledataupload) | **PUT** /file/{fileId}/{versionId}/{fileType}/finish | Finish FileData Upload +*FilesApi* | [**GetFile**](docs/FilesApi.md#getfile) | **GET** /file/{fileId} | Show File +*FilesApi* | [**GetFileDataUploadStatus**](docs/FilesApi.md#getfiledatauploadstatus) | **GET** /file/{fileId}/{versionId}/{fileType}/status | Check FileData Upload Status +*FilesApi* | [**GetFiles**](docs/FilesApi.md#getfiles) | **GET** /files | List Files +*FilesApi* | [**StartFileDataUpload**](docs/FilesApi.md#startfiledataupload) | **PUT** /file/{fileId}/{versionId}/{fileType}/start | Start FileData Upload +*FriendsApi* | [**DeleteFriendRequest**](docs/FriendsApi.md#deletefriendrequest) | **DELETE** /user/{userId}/friendRequest | Delete Friend Request +*FriendsApi* | [**Friend**](docs/FriendsApi.md#friend) | **POST** /user/{userId}/friendRequest | Send Friend Request +*FriendsApi* | [**GetFriendStatus**](docs/FriendsApi.md#getfriendstatus) | **GET** /user/{userId}/friendStatus | Check Friend Status +*FriendsApi* | [**GetFriends**](docs/FriendsApi.md#getfriends) | **GET** /auth/user/friends | List Friends +*FriendsApi* | [**Unfriend**](docs/FriendsApi.md#unfriend) | **DELETE** /auth/user/friends/{userId} | Unfriend +*InstancesApi* | [**GetInstance**](docs/InstancesApi.md#getinstance) | **GET** /instances/{worldId}:{instanceId} | Get Instance +*InstancesApi* | [**GetInstanceByShortName**](docs/InstancesApi.md#getinstancebyshortname) | **GET** /instances/s/{shortName} | Get Instance By Short Name +*InstancesApi* | [**GetShortName**](docs/InstancesApi.md#getshortname) | **GET** /instances/{worldId}:{instanceId}/shortName | Get Instance Short Name +*InstancesApi* | [**SendSelfInvite**](docs/InstancesApi.md#sendselfinvite) | **POST** /instances/{worldId}:{instanceId}/invite | Send Self Invite +*InviteApi* | [**GetInviteMessage**](docs/InviteApi.md#getinvitemessage) | **GET** /message/{userId}/{messageType}/{slot} | Get Invite Message +*InviteApi* | [**GetInviteMessages**](docs/InviteApi.md#getinvitemessages) | **GET** /message/{userId}/{messageType} | List Invite Messages +*InviteApi* | [**InviteMyselfTo**](docs/InviteApi.md#invitemyselfto) | **POST** /invite/myself/to/{worldId}:{instanceId} | Invite Myself To Instance +*InviteApi* | [**InviteUser**](docs/InviteApi.md#inviteuser) | **POST** /invite/{userId} | Invite User +*InviteApi* | [**RequestInvite**](docs/InviteApi.md#requestinvite) | **POST** /requestInvite/{userId} | Request Invite +*InviteApi* | [**ResetInviteMessage**](docs/InviteApi.md#resetinvitemessage) | **DELETE** /message/{userId}/{messageType}/{slot} | Reset Invite Message +*InviteApi* | [**RespondInvite**](docs/InviteApi.md#respondinvite) | **POST** /invite/{notificationId}/response | Respond Invite +*InviteApi* | [**UpdateInviteMessage**](docs/InviteApi.md#updateinvitemessage) | **PUT** /message/{userId}/{messageType}/{slot} | Update Invite Message +*NotificationsApi* | [**AcceptFriendRequest**](docs/NotificationsApi.md#acceptfriendrequest) | **PUT** /auth/user/notifications/{notificationId}/accept | Accept Friend Request +*NotificationsApi* | [**ClearNotifications**](docs/NotificationsApi.md#clearnotifications) | **PUT** /auth/user/notifications/clear | Clear All Notifications +*NotificationsApi* | [**DeleteNotification**](docs/NotificationsApi.md#deletenotification) | **PUT** /auth/user/notifications/{notificationId}/hide | Delete Notification +*NotificationsApi* | [**GetNotifications**](docs/NotificationsApi.md#getnotifications) | **GET** /auth/user/notifications | List Notifications +*NotificationsApi* | [**MarkNotificationAsRead**](docs/NotificationsApi.md#marknotificationasread) | **PUT** /auth/user/notifications/{notificationId}/see | Mark Notification As Read +*PermissionsApi* | [**GetAssignedPermissions**](docs/PermissionsApi.md#getassignedpermissions) | **GET** /auth/permissions | Get Assigned Permissions +*PermissionsApi* | [**GetPermission**](docs/PermissionsApi.md#getpermission) | **GET** /permissions/{permissionId} | Get Permission +*PlayermoderationApi* | [**ClearAllPlayerModerations**](docs/PlayermoderationApi.md#clearallplayermoderations) | **DELETE** /auth/user/playermoderations | Clear All Player Moderations +*PlayermoderationApi* | [**DeletePlayerModeration**](docs/PlayermoderationApi.md#deleteplayermoderation) | **DELETE** /auth/user/playermoderations/{playerModerationId} | Delete Player Moderation +*PlayermoderationApi* | [**GetPlayerModeration**](docs/PlayermoderationApi.md#getplayermoderation) | **GET** /auth/user/playermoderations/{playerModerationId} | Get Player Moderation +*PlayermoderationApi* | [**GetPlayerModerations**](docs/PlayermoderationApi.md#getplayermoderations) | **GET** /auth/user/playermoderations | Search Player Moderations +*PlayermoderationApi* | [**ModerateUser**](docs/PlayermoderationApi.md#moderateuser) | **POST** /auth/user/playermoderations | Moderate User +*PlayermoderationApi* | [**UnmoderateUser**](docs/PlayermoderationApi.md#unmoderateuser) | **PUT** /auth/user/unplayermoderate | Unmoderate User +*SystemApi* | [**GetCSS**](docs/SystemApi.md#getcss) | **GET** /css/app.css | Download CSS +*SystemApi* | [**GetConfig**](docs/SystemApi.md#getconfig) | **GET** /config | Fetch API Config +*SystemApi* | [**GetCurrentOnlineUsers**](docs/SystemApi.md#getcurrentonlineusers) | **GET** /visits | Current Online Users +*SystemApi* | [**GetHealth**](docs/SystemApi.md#gethealth) | **GET** /health | Check API Health +*SystemApi* | [**GetInfoPush**](docs/SystemApi.md#getinfopush) | **GET** /infoPush | Show Information Notices +*SystemApi* | [**GetJavaScript**](docs/SystemApi.md#getjavascript) | **GET** /js/app.js | Download JavaScript +*SystemApi* | [**GetSystemTime**](docs/SystemApi.md#getsystemtime) | **GET** /time | Current System Time +*UsersApi* | [**GetUser**](docs/UsersApi.md#getuser) | **GET** /users/{userId} | Get User by ID +*UsersApi* | [**GetUserByName**](docs/UsersApi.md#getuserbyname) | **GET** /users/{username}/name | Get User by Username +*UsersApi* | [**SearchUsers**](docs/UsersApi.md#searchusers) | **GET** /users | Search All Users +*UsersApi* | [**UpdateUser**](docs/UsersApi.md#updateuser) | **PUT** /users/{userId} | Update User Info +*WorldsApi* | [**CreateWorld**](docs/WorldsApi.md#createworld) | **POST** /worlds | Create World +*WorldsApi* | [**DeleteWorld**](docs/WorldsApi.md#deleteworld) | **DELETE** /worlds/{worldId} | Delete World +*WorldsApi* | [**GetActiveWorlds**](docs/WorldsApi.md#getactiveworlds) | **GET** /worlds/active | List Active Worlds +*WorldsApi* | [**GetFavoritedWorlds**](docs/WorldsApi.md#getfavoritedworlds) | **GET** /worlds/favorites | List Favorited Worlds +*WorldsApi* | [**GetRecentWorlds**](docs/WorldsApi.md#getrecentworlds) | **GET** /worlds/recent | List Recent Worlds +*WorldsApi* | [**GetWorld**](docs/WorldsApi.md#getworld) | **GET** /worlds/{worldId} | Get World by ID +*WorldsApi* | [**GetWorldInstance**](docs/WorldsApi.md#getworldinstance) | **GET** /worlds/{worldId}/{instanceId} | Get World Instance +*WorldsApi* | [**GetWorldMetadata**](docs/WorldsApi.md#getworldmetadata) | **GET** /worlds/{worldId}/metadata | Get World Metadata +*WorldsApi* | [**GetWorldPublishStatus**](docs/WorldsApi.md#getworldpublishstatus) | **GET** /worlds/{worldId}/publish | Get World Publish Status +*WorldsApi* | [**PublishWorld**](docs/WorldsApi.md#publishworld) | **PUT** /worlds/{worldId}/publish | Publish World +*WorldsApi* | [**SearchWorlds**](docs/WorldsApi.md#searchworlds) | **GET** /worlds | Search All Worlds +*WorldsApi* | [**UnpublishWorld**](docs/WorldsApi.md#unpublishworld) | **DELETE** /worlds/{worldId}/publish | Unpublish World +*WorldsApi* | [**UpdateWorld**](docs/WorldsApi.md#updateworld) | **PUT** /worlds/{worldId} | Update World + + +## Documentation for Models + + - [Model.APIConfig](docs/APIConfig.md) + - [Model.APIEventConfig](docs/APIEventConfig.md) + - [Model.APIHealth](docs/APIHealth.md) + - [Model.AddFavoriteRequest](docs/AddFavoriteRequest.md) + - [Model.Avatar](docs/Avatar.md) + - [Model.AvatarUnityPackageUrlObject](docs/AvatarUnityPackageUrlObject.md) + - [Model.CreateAvatarRequest](docs/CreateAvatarRequest.md) + - [Model.CreateFileRequest](docs/CreateFileRequest.md) + - [Model.CreateFileVersionRequest](docs/CreateFileVersionRequest.md) + - [Model.CreateWorldRequest](docs/CreateWorldRequest.md) + - [Model.CurrentUser](docs/CurrentUser.md) + - [Model.DeploymentGroup](docs/DeploymentGroup.md) + - [Model.DeveloperType](docs/DeveloperType.md) + - [Model.DownloadURLList](docs/DownloadURLList.md) + - [Model.DynamicContentRow](docs/DynamicContentRow.md) + - [Model.Error](docs/Error.md) + - [Model.Favorite](docs/Favorite.md) + - [Model.FavoriteGroup](docs/FavoriteGroup.md) + - [Model.FavoriteGroupVisibility](docs/FavoriteGroupVisibility.md) + - [Model.FavoriteType](docs/FavoriteType.md) + - [Model.File](docs/File.md) + - [Model.FileData](docs/FileData.md) + - [Model.FileStatus](docs/FileStatus.md) + - [Model.FileUploadURL](docs/FileUploadURL.md) + - [Model.FileVersion](docs/FileVersion.md) + - [Model.FileVersionUploadStatus](docs/FileVersionUploadStatus.md) + - [Model.FinishFileDataUploadRequest](docs/FinishFileDataUploadRequest.md) + - [Model.FriendStatus](docs/FriendStatus.md) + - [Model.InfoPush](docs/InfoPush.md) + - [Model.InfoPushData](docs/InfoPushData.md) + - [Model.InfoPushDataArticle](docs/InfoPushDataArticle.md) + - [Model.InfoPushDataArticleContent](docs/InfoPushDataArticleContent.md) + - [Model.InfoPushDataClickable](docs/InfoPushDataClickable.md) + - [Model.Instance](docs/Instance.md) + - [Model.InstancePlatforms](docs/InstancePlatforms.md) + - [Model.InstanceShortNameResponse](docs/InstanceShortNameResponse.md) + - [Model.InstanceType](docs/InstanceType.md) + - [Model.InviteMessage](docs/InviteMessage.md) + - [Model.InviteMessageType](docs/InviteMessageType.md) + - [Model.InviteRequest](docs/InviteRequest.md) + - [Model.InviteResponse](docs/InviteResponse.md) + - [Model.License](docs/License.md) + - [Model.LicenseAction](docs/LicenseAction.md) + - [Model.LicenseGroup](docs/LicenseGroup.md) + - [Model.LicenseType](docs/LicenseType.md) + - [Model.LimitedUnityPackage](docs/LimitedUnityPackage.md) + - [Model.LimitedUser](docs/LimitedUser.md) + - [Model.LimitedWorld](docs/LimitedWorld.md) + - [Model.MIMEType](docs/MIMEType.md) + - [Model.ModerateUserRequest](docs/ModerateUserRequest.md) + - [Model.Notification](docs/Notification.md) + - [Model.NotificationType](docs/NotificationType.md) + - [Model.PastDisplayName](docs/PastDisplayName.md) + - [Model.Permission](docs/Permission.md) + - [Model.PlayerModeration](docs/PlayerModeration.md) + - [Model.PlayerModerationType](docs/PlayerModerationType.md) + - [Model.PublicAnnouncement](docs/PublicAnnouncement.md) + - [Model.Region](docs/Region.md) + - [Model.ReleaseStatus](docs/ReleaseStatus.md) + - [Model.RequestInviteRequest](docs/RequestInviteRequest.md) + - [Model.Response](docs/Response.md) + - [Model.SentNotification](docs/SentNotification.md) + - [Model.Subscription](docs/Subscription.md) + - [Model.SubscriptionPeriod](docs/SubscriptionPeriod.md) + - [Model.Success](docs/Success.md) + - [Model.Transaction](docs/Transaction.md) + - [Model.TransactionAgreement](docs/TransactionAgreement.md) + - [Model.TransactionStatus](docs/TransactionStatus.md) + - [Model.TransactionSteamInfo](docs/TransactionSteamInfo.md) + - [Model.TransactionSteamWalletInfo](docs/TransactionSteamWalletInfo.md) + - [Model.TwoFactorAuthCode](docs/TwoFactorAuthCode.md) + - [Model.UnityPackage](docs/UnityPackage.md) + - [Model.UpdateAvatarRequest](docs/UpdateAvatarRequest.md) + - [Model.UpdateFavoriteGroupRequest](docs/UpdateFavoriteGroupRequest.md) + - [Model.UpdateInviteMessageRequest](docs/UpdateInviteMessageRequest.md) + - [Model.UpdateUserRequest](docs/UpdateUserRequest.md) + - [Model.UpdateWorldRequest](docs/UpdateWorldRequest.md) + - [Model.User](docs/User.md) + - [Model.UserExists](docs/UserExists.md) + - [Model.UserState](docs/UserState.md) + - [Model.UserStatus](docs/UserStatus.md) + - [Model.UserSubscription](docs/UserSubscription.md) + - [Model.Verify2FAResult](docs/Verify2FAResult.md) + - [Model.VerifyAuthTokenResult](docs/VerifyAuthTokenResult.md) + - [Model.World](docs/World.md) + - [Model.WorldMetadata](docs/WorldMetadata.md) + - [Model.WorldPublishStatus](docs/WorldPublishStatus.md) + + +## Contributing + +Contributions are welcome, but do not add features that should be handled by the OpenAPI specification. + +Join the [Discord server](https://discord.gg/Ge2APMhPfD) to get in touch with us. \ No newline at end of file diff --git a/src/VRChat.API/Api/AuthenticationApi.cs b/src/VRChat.API/Api/AuthenticationApi.cs index e25db093..c4a100a6 100644 --- a/src/VRChat.API/Api/AuthenticationApi.cs +++ b/src/VRChat.API/Api/AuthenticationApi.cs @@ -37,9 +37,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// Filter by displayName. (optional) /// Filter by UserID. (optional) /// Exclude by UserID. (optional) - /// Index associated with the operation. /// UserExists - UserExists CheckUserExists(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), int operationIndex = 0); + UserExists CheckUserExists(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string)); /// /// Check User Exists @@ -52,9 +51,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// Filter by displayName. (optional) /// Filter by UserID. (optional) /// Exclude by UserID. (optional) - /// Index associated with the operation. /// ApiResponse of UserExists - ApiResponse CheckUserExistsWithHttpInfo(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), int operationIndex = 0); + ApiResponse CheckUserExistsWithHttpInfo(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string)); /// /// Delete User /// @@ -62,10 +60,9 @@ public interface IAuthenticationApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// CurrentUser - CurrentUser DeleteUser(string userId, int operationIndex = 0); + CurrentUser DeleteUser(string userId); /// /// Delete User @@ -74,10 +71,9 @@ public interface IAuthenticationApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of CurrentUser - ApiResponse DeleteUserWithHttpInfo(string userId, int operationIndex = 0); + ApiResponse DeleteUserWithHttpInfo(string userId); /// /// Login and/or Get Current User Info /// @@ -85,9 +81,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// CurrentUser - CurrentUser GetCurrentUser(int operationIndex = 0); + CurrentUser GetCurrentUser(); /// /// Login and/or Get Current User Info @@ -96,9 +91,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of CurrentUser - ApiResponse GetCurrentUserWithHttpInfo(int operationIndex = 0); + ApiResponse GetCurrentUserWithHttpInfo(); /// /// Logout /// @@ -106,9 +100,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// Invalidates the login session. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Success - Success Logout(int operationIndex = 0); + Success Logout(); /// /// Logout @@ -117,9 +110,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// Invalidates the login session. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of Success - ApiResponse LogoutWithHttpInfo(int operationIndex = 0); + ApiResponse LogoutWithHttpInfo(); /// /// Verify 2FA code /// @@ -128,9 +120,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Verify2FAResult - Verify2FAResult Verify2FA(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0); + Verify2FAResult Verify2FA(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode)); /// /// Verify 2FA code @@ -140,9 +131,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of Verify2FAResult - ApiResponse Verify2FAWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0); + ApiResponse Verify2FAWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode)); /// /// Verify Auth Token /// @@ -150,9 +140,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// Verify whether the currently provided Auth Token is valid. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// VerifyAuthTokenResult - VerifyAuthTokenResult VerifyAuthToken(int operationIndex = 0); + VerifyAuthTokenResult VerifyAuthToken(); /// /// Verify Auth Token @@ -161,9 +150,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// Verify whether the currently provided Auth Token is valid. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of VerifyAuthTokenResult - ApiResponse VerifyAuthTokenWithHttpInfo(int operationIndex = 0); + ApiResponse VerifyAuthTokenWithHttpInfo(); /// /// Verify 2FA code with Recovery code /// @@ -172,9 +160,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Verify2FAResult - Verify2FAResult VerifyRecoveryCode(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0); + Verify2FAResult VerifyRecoveryCode(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode)); /// /// Verify 2FA code with Recovery code @@ -184,9 +171,8 @@ public interface IAuthenticationApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of Verify2FAResult - ApiResponse VerifyRecoveryCodeWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0); + ApiResponse VerifyRecoveryCodeWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode)); #endregion Synchronous Operations } @@ -207,10 +193,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// Filter by displayName. (optional) /// Filter by UserID. (optional) /// Exclude by UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of UserExists - System.Threading.Tasks.Task CheckUserExistsAsync(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CheckUserExistsAsync(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check User Exists @@ -223,10 +208,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// Filter by displayName. (optional) /// Filter by UserID. (optional) /// Exclude by UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (UserExists) - System.Threading.Tasks.Task> CheckUserExistsWithHttpInfoAsync(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CheckUserExistsWithHttpInfoAsync(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete User /// @@ -234,11 +218,10 @@ public interface IAuthenticationApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of CurrentUser - System.Threading.Tasks.Task DeleteUserAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteUserAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete User @@ -247,11 +230,10 @@ public interface IAuthenticationApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CurrentUser) - System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Login and/or Get Current User Info /// @@ -259,10 +241,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of CurrentUser - System.Threading.Tasks.Task GetCurrentUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetCurrentUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Login and/or Get Current User Info @@ -271,10 +252,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CurrentUser) - System.Threading.Tasks.Task> GetCurrentUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetCurrentUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logout /// @@ -282,10 +262,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// Invalidates the login session. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task LogoutAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LogoutAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Logout @@ -294,10 +273,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// Invalidates the login session. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> LogoutWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> LogoutWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Verify 2FA code /// @@ -306,10 +284,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Verify2FAResult - System.Threading.Tasks.Task Verify2FAAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task Verify2FAAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Verify 2FA code @@ -319,10 +296,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Verify2FAResult) - System.Threading.Tasks.Task> Verify2FAWithHttpInfoAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> Verify2FAWithHttpInfoAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Verify Auth Token /// @@ -330,10 +306,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// Verify whether the currently provided Auth Token is valid. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of VerifyAuthTokenResult - System.Threading.Tasks.Task VerifyAuthTokenAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task VerifyAuthTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Verify Auth Token @@ -342,10 +317,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// Verify whether the currently provided Auth Token is valid. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (VerifyAuthTokenResult) - System.Threading.Tasks.Task> VerifyAuthTokenWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> VerifyAuthTokenWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Verify 2FA code with Recovery code /// @@ -354,10 +328,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Verify2FAResult - System.Threading.Tasks.Task VerifyRecoveryCodeAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task VerifyRecoveryCodeAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Verify 2FA code with Recovery code @@ -367,10 +340,9 @@ public interface IAuthenticationApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Verify2FAResult) - System.Threading.Tasks.Task> VerifyRecoveryCodeWithHttpInfoAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> VerifyRecoveryCodeWithHttpInfoAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -499,9 +471,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Filter by displayName. (optional) /// Filter by UserID. (optional) /// Exclude by UserID. (optional) - /// Index associated with the operation. /// UserExists - public UserExists CheckUserExists(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), int operationIndex = 0) + public UserExists CheckUserExists(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string)) { VRChat.API.Client.ApiResponse localVarResponse = CheckUserExistsWithHttpInfo(email, displayName, userId, excludeUserId); return localVarResponse.Data; @@ -515,9 +486,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Filter by displayName. (optional) /// Filter by UserID. (optional) /// Exclude by UserID. (optional) - /// Index associated with the operation. /// ApiResponse of UserExists - public VRChat.API.Client.ApiResponse CheckUserExistsWithHttpInfo(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse CheckUserExistsWithHttpInfo(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -530,16 +500,10 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (email != null) { @@ -558,9 +522,6 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "excludeUserId", excludeUserId)); } - localVarRequestOptions.Operation = "AuthenticationApi.CheckUserExists"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -570,13 +531,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory // make the HTTP request var localVarResponse = this.Client.Get("/auth/exists", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CheckUserExists", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -590,12 +549,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Filter by displayName. (optional) /// Filter by UserID. (optional) /// Exclude by UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of UserExists - public async System.Threading.Tasks.Task CheckUserExistsAsync(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CheckUserExistsAsync(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await CheckUserExistsWithHttpInfoAsync(email, displayName, userId, excludeUserId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await CheckUserExistsWithHttpInfoAsync(email, displayName, userId, excludeUserId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -607,10 +565,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Filter by displayName. (optional) /// Filter by UserID. (optional) /// Exclude by UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (UserExists) - public async System.Threading.Tasks.Task> CheckUserExistsWithHttpInfoAsync(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CheckUserExistsWithHttpInfoAsync(string email = default(string), string displayName = default(string), string userId = default(string), string excludeUserId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -623,17 +580,12 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (email != null) { @@ -652,9 +604,6 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "excludeUserId", excludeUserId)); } - localVarRequestOptions.Operation = "AuthenticationApi.CheckUserExists"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -663,15 +612,13 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/auth/exists", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CheckUserExists", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -681,10 +628,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// CurrentUser - public CurrentUser DeleteUser(string userId, int operationIndex = 0) + public CurrentUser DeleteUser(string userId) { VRChat.API.Client.ApiResponse localVarResponse = DeleteUserWithHttpInfo(userId); return localVarResponse.Data; @@ -694,16 +640,13 @@ public CurrentUser DeleteUser(string userId, int operationIndex = 0) /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of CurrentUser - public VRChat.API.Client.ApiResponse DeleteUserWithHttpInfo(string userId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse DeleteUserWithHttpInfo(string userId) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling AuthenticationApi->DeleteUser"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -716,22 +659,13 @@ public VRChat.API.Client.ApiResponse DeleteUserWithHttpInfo(string }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "AuthenticationApi.DeleteUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -747,13 +681,11 @@ public VRChat.API.Client.ApiResponse DeleteUserWithHttpInfo(string // make the HTTP request var localVarResponse = this.Client.Put("/user/{userId}/delete", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -763,13 +695,12 @@ public VRChat.API.Client.ApiResponse DeleteUserWithHttpInfo(string /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of CurrentUser - public async System.Threading.Tasks.Task DeleteUserAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteUserAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await DeleteUserWithHttpInfoAsync(userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await DeleteUserWithHttpInfoAsync(userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -777,17 +708,14 @@ public VRChat.API.Client.ApiResponse DeleteUserWithHttpInfo(string /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CurrentUser) - public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling AuthenticationApi->DeleteUser"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -800,23 +728,15 @@ public VRChat.API.Client.ApiResponse DeleteUserWithHttpInfo(string "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "AuthenticationApi.DeleteUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -831,15 +751,13 @@ public VRChat.API.Client.ApiResponse DeleteUserWithHttpInfo(string } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{userId}/delete", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -849,9 +767,8 @@ public VRChat.API.Client.ApiResponse DeleteUserWithHttpInfo(string /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// CurrentUser - public CurrentUser GetCurrentUser(int operationIndex = 0) + public CurrentUser GetCurrentUser() { VRChat.API.Client.ApiResponse localVarResponse = GetCurrentUserWithHttpInfo(); return localVarResponse.Data; @@ -861,9 +778,8 @@ public CurrentUser GetCurrentUser(int operationIndex = 0) /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of CurrentUser - public VRChat.API.Client.ApiResponse GetCurrentUserWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetCurrentUserWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -876,20 +792,11 @@ public VRChat.API.Client.ApiResponse GetCurrentUserWithHttpInfo(int }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "AuthenticationApi.GetCurrentUser"; - localVarRequestOptions.OperationIndex = operationIndex; // authentication (authCookie) required // cookie parameter support @@ -899,7 +806,7 @@ public VRChat.API.Client.ApiResponse GetCurrentUserWithHttpInfo(int } // authentication (authHeader) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + VRChat.API.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -912,13 +819,11 @@ public VRChat.API.Client.ApiResponse GetCurrentUserWithHttpInfo(int // make the HTTP request var localVarResponse = this.Client.Get("/auth/user", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetCurrentUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -928,12 +833,11 @@ public VRChat.API.Client.ApiResponse GetCurrentUserWithHttpInfo(int /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of CurrentUser - public async System.Threading.Tasks.Task GetCurrentUserAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetCurrentUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetCurrentUserWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetCurrentUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -941,10 +845,9 @@ public VRChat.API.Client.ApiResponse GetCurrentUserWithHttpInfo(int /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CurrentUser) - public async System.Threading.Tasks.Task> GetCurrentUserWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetCurrentUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -957,22 +860,14 @@ public VRChat.API.Client.ApiResponse GetCurrentUserWithHttpInfo(int "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "AuthenticationApi.GetCurrentUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (authCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) @@ -981,7 +876,7 @@ public VRChat.API.Client.ApiResponse GetCurrentUserWithHttpInfo(int } // authentication (authHeader) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + VRChat.API.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -993,15 +888,13 @@ public VRChat.API.Client.ApiResponse GetCurrentUserWithHttpInfo(int } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/auth/user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetCurrentUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1011,9 +904,8 @@ public VRChat.API.Client.ApiResponse GetCurrentUserWithHttpInfo(int /// Logout Invalidates the login session. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Success - public Success Logout(int operationIndex = 0) + public Success Logout() { VRChat.API.Client.ApiResponse localVarResponse = LogoutWithHttpInfo(); return localVarResponse.Data; @@ -1023,9 +915,8 @@ public Success Logout(int operationIndex = 0) /// Logout Invalidates the login session. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse LogoutWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1038,21 +929,12 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "AuthenticationApi.Logout"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (authCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) @@ -1062,13 +944,11 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn // make the HTTP request var localVarResponse = this.Client.Put("/logout", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Logout", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1078,12 +958,11 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn /// Logout Invalidates the login session. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task LogoutAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task LogoutAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await LogoutWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await LogoutWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1091,10 +970,9 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn /// Logout Invalidates the login session. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> LogoutWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> LogoutWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1107,22 +985,14 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "AuthenticationApi.Logout"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (authCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) @@ -1131,15 +1001,13 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Logout", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1150,9 +1018,8 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Verify2FAResult - public Verify2FAResult Verify2FA(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0) + public Verify2FAResult Verify2FA(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode)) { VRChat.API.Client.ApiResponse localVarResponse = Verify2FAWithHttpInfo(twoFactorAuthCode); return localVarResponse.Data; @@ -1163,9 +1030,8 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of Verify2FAResult - public VRChat.API.Client.ApiResponse Verify2FAWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0) + public VRChat.API.Client.ApiResponse Verify2FAWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1179,22 +1045,13 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = twoFactorAuthCode; - localVarRequestOptions.Operation = "AuthenticationApi.Verify2FA"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (authCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) @@ -1204,13 +1061,11 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn // make the HTTP request var localVarResponse = this.Client.Post("/auth/twofactorauth/totp/verify", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Verify2FA", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1221,12 +1076,11 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Verify2FAResult - public async System.Threading.Tasks.Task Verify2FAAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task Verify2FAAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await Verify2FAWithHttpInfoAsync(twoFactorAuthCode, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await Verify2FAWithHttpInfoAsync(twoFactorAuthCode, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1235,10 +1089,9 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Verify2FAResult) - public async System.Threading.Tasks.Task> Verify2FAWithHttpInfoAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> Verify2FAWithHttpInfoAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1252,23 +1105,15 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = twoFactorAuthCode; - localVarRequestOptions.Operation = "AuthenticationApi.Verify2FA"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (authCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) @@ -1277,15 +1122,13 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/auth/twofactorauth/totp/verify", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Verify2FA", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1295,9 +1138,8 @@ public VRChat.API.Client.ApiResponse LogoutWithHttpInfo(int operationIn /// Verify Auth Token Verify whether the currently provided Auth Token is valid. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// VerifyAuthTokenResult - public VerifyAuthTokenResult VerifyAuthToken(int operationIndex = 0) + public VerifyAuthTokenResult VerifyAuthToken() { VRChat.API.Client.ApiResponse localVarResponse = VerifyAuthTokenWithHttpInfo(); return localVarResponse.Data; @@ -1307,9 +1149,8 @@ public VerifyAuthTokenResult VerifyAuthToken(int operationIndex = 0) /// Verify Auth Token Verify whether the currently provided Auth Token is valid. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of VerifyAuthTokenResult - public VRChat.API.Client.ApiResponse VerifyAuthTokenWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse VerifyAuthTokenWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1322,21 +1163,12 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "AuthenticationApi.VerifyAuthToken"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (authCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) @@ -1346,13 +1178,11 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH // make the HTTP request var localVarResponse = this.Client.Get("/auth", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("VerifyAuthToken", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1362,12 +1192,11 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH /// Verify Auth Token Verify whether the currently provided Auth Token is valid. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of VerifyAuthTokenResult - public async System.Threading.Tasks.Task VerifyAuthTokenAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task VerifyAuthTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await VerifyAuthTokenWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await VerifyAuthTokenWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1375,10 +1204,9 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH /// Verify Auth Token Verify whether the currently provided Auth Token is valid. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (VerifyAuthTokenResult) - public async System.Threading.Tasks.Task> VerifyAuthTokenWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> VerifyAuthTokenWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1391,21 +1219,13 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "AuthenticationApi.VerifyAuthToken"; - localVarRequestOptions.OperationIndex = operationIndex; // authentication (authCookie) required // cookie parameter support @@ -1415,15 +1235,13 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/auth", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("VerifyAuthToken", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1434,9 +1252,8 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Verify2FAResult - public Verify2FAResult VerifyRecoveryCode(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0) + public Verify2FAResult VerifyRecoveryCode(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode)) { VRChat.API.Client.ApiResponse localVarResponse = VerifyRecoveryCodeWithHttpInfo(twoFactorAuthCode); return localVarResponse.Data; @@ -1447,9 +1264,8 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of Verify2FAResult - public VRChat.API.Client.ApiResponse VerifyRecoveryCodeWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0) + public VRChat.API.Client.ApiResponse VerifyRecoveryCodeWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1463,22 +1279,13 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = twoFactorAuthCode; - localVarRequestOptions.Operation = "AuthenticationApi.VerifyRecoveryCode"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (authCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) @@ -1488,13 +1295,11 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH // make the HTTP request var localVarResponse = this.Client.Post("/auth/twofactorauth/otp/verify", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("VerifyRecoveryCode", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1505,12 +1310,11 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Verify2FAResult - public async System.Threading.Tasks.Task VerifyRecoveryCodeAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task VerifyRecoveryCodeAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await VerifyRecoveryCodeWithHttpInfoAsync(twoFactorAuthCode, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await VerifyRecoveryCodeWithHttpInfoAsync(twoFactorAuthCode, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1519,10 +1323,9 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Verify2FAResult) - public async System.Threading.Tasks.Task> VerifyRecoveryCodeWithHttpInfoAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> VerifyRecoveryCodeWithHttpInfoAsync(TwoFactorAuthCode twoFactorAuthCode = default(TwoFactorAuthCode), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1536,23 +1339,15 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = twoFactorAuthCode; - localVarRequestOptions.Operation = "AuthenticationApi.VerifyRecoveryCode"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (authCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) @@ -1561,15 +1356,13 @@ public VRChat.API.Client.ApiResponse VerifyAuthTokenWithH } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/auth/twofactorauth/otp/verify", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("VerifyRecoveryCode", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/AvatarsApi.cs b/src/VRChat.API/Api/AvatarsApi.cs index 245f4404..c15f44b0 100644 --- a/src/VRChat.API/Api/AvatarsApi.cs +++ b/src/VRChat.API/Api/AvatarsApi.cs @@ -34,9 +34,8 @@ public interface IAvatarsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Avatar - Avatar CreateAvatar(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), int operationIndex = 0); + Avatar CreateAvatar(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest)); /// /// Create Avatar @@ -46,9 +45,8 @@ public interface IAvatarsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of Avatar - ApiResponse CreateAvatarWithHttpInfo(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), int operationIndex = 0); + ApiResponse CreateAvatarWithHttpInfo(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest)); /// /// Delete Avatar /// @@ -56,10 +54,9 @@ public interface IAvatarsApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Avatar - Avatar DeleteAvatar(string avatarId, int operationIndex = 0); + Avatar DeleteAvatar(string avatarId); /// /// Delete Avatar @@ -68,10 +65,9 @@ public interface IAvatarsApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// ApiResponse of Avatar - ApiResponse DeleteAvatarWithHttpInfo(string avatarId, int operationIndex = 0); + ApiResponse DeleteAvatarWithHttpInfo(string avatarId); /// /// Get Avatar /// @@ -79,10 +75,9 @@ public interface IAvatarsApiSync : IApiAccessor /// Get information about a specific Avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Avatar - Avatar GetAvatar(string avatarId, int operationIndex = 0); + Avatar GetAvatar(string avatarId); /// /// Get Avatar @@ -91,10 +86,9 @@ public interface IAvatarsApiSync : IApiAccessor /// Get information about a specific Avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// ApiResponse of Avatar - ApiResponse GetAvatarWithHttpInfo(string avatarId, int operationIndex = 0); + ApiResponse GetAvatarWithHttpInfo(string avatarId); /// /// List Favorited Avatars /// @@ -103,21 +97,20 @@ public interface IAvatarsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// List<Avatar> - List GetFavoritedAvatars(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0); + List GetFavoritedAvatars(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)); /// /// List Favorited Avatars @@ -127,21 +120,20 @@ public interface IAvatarsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// ApiResponse of List<Avatar> - ApiResponse> GetFavoritedAvatarsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0); + ApiResponse> GetFavoritedAvatarsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)); /// /// Get Own Avatar /// @@ -149,10 +141,9 @@ public interface IAvatarsApiSync : IApiAccessor /// Get the current avatar for the user. This will return an error for any other user than the one logged in. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Avatar - Avatar GetOwnAvatar(string userId, int operationIndex = 0); + Avatar GetOwnAvatar(string userId); /// /// Get Own Avatar @@ -161,10 +152,9 @@ public interface IAvatarsApiSync : IApiAccessor /// Get the current avatar for the user. This will return an error for any other user than the one logged in. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of Avatar - ApiResponse GetOwnAvatarWithHttpInfo(string userId, int operationIndex = 0); + ApiResponse GetOwnAvatarWithHttpInfo(string userId); /// /// Search Avatars /// @@ -173,21 +163,20 @@ public interface IAvatarsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own avatars. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// List<Avatar> - List SearchAvatars(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0); + List SearchAvatars(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)); /// /// Search Avatars @@ -197,21 +186,20 @@ public interface IAvatarsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own avatars. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// ApiResponse of List<Avatar> - ApiResponse> SearchAvatarsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0); + ApiResponse> SearchAvatarsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)); /// /// Select Avatar /// @@ -219,10 +207,9 @@ public interface IAvatarsApiSync : IApiAccessor /// Switches into that avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// CurrentUser - CurrentUser SelectAvatar(string avatarId, int operationIndex = 0); + CurrentUser SelectAvatar(string avatarId); /// /// Select Avatar @@ -231,10 +218,9 @@ public interface IAvatarsApiSync : IApiAccessor /// Switches into that avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// ApiResponse of CurrentUser - ApiResponse SelectAvatarWithHttpInfo(string avatarId, int operationIndex = 0); + ApiResponse SelectAvatarWithHttpInfo(string avatarId); /// /// Select Fallback Avatar /// @@ -242,10 +228,9 @@ public interface IAvatarsApiSync : IApiAccessor /// Switches into that avatar as your fallback avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// CurrentUser - CurrentUser SelectFallbackAvatar(string avatarId, int operationIndex = 0); + CurrentUser SelectFallbackAvatar(string avatarId); /// /// Select Fallback Avatar @@ -254,10 +239,9 @@ public interface IAvatarsApiSync : IApiAccessor /// Switches into that avatar as your fallback avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// ApiResponse of CurrentUser - ApiResponse SelectFallbackAvatarWithHttpInfo(string avatarId, int operationIndex = 0); + ApiResponse SelectFallbackAvatarWithHttpInfo(string avatarId); /// /// Update Avatar /// @@ -265,11 +249,10 @@ public interface IAvatarsApiSync : IApiAccessor /// Update information about a specific avatar. /// /// Thrown when fails to make API call - /// + /// Must be a valid avatar ID. /// (optional) - /// Index associated with the operation. /// Avatar - Avatar UpdateAvatar(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), int operationIndex = 0); + Avatar UpdateAvatar(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest)); /// /// Update Avatar @@ -278,11 +261,10 @@ public interface IAvatarsApiSync : IApiAccessor /// Update information about a specific avatar. /// /// Thrown when fails to make API call - /// + /// Must be a valid avatar ID. /// (optional) - /// Index associated with the operation. /// ApiResponse of Avatar - ApiResponse UpdateAvatarWithHttpInfo(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), int operationIndex = 0); + ApiResponse UpdateAvatarWithHttpInfo(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest)); #endregion Synchronous Operations } @@ -300,10 +282,9 @@ public interface IAvatarsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Avatar - System.Threading.Tasks.Task CreateAvatarAsync(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateAvatarAsync(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Avatar @@ -313,10 +294,9 @@ public interface IAvatarsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Avatar) - System.Threading.Tasks.Task> CreateAvatarWithHttpInfoAsync(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateAvatarWithHttpInfoAsync(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete Avatar /// @@ -324,11 +304,10 @@ public interface IAvatarsApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of Avatar - System.Threading.Tasks.Task DeleteAvatarAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteAvatarAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete Avatar @@ -337,11 +316,10 @@ public interface IAvatarsApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Avatar) - System.Threading.Tasks.Task> DeleteAvatarWithHttpInfoAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteAvatarWithHttpInfoAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Avatar /// @@ -349,11 +327,10 @@ public interface IAvatarsApiAsync : IApiAccessor /// Get information about a specific Avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of Avatar - System.Threading.Tasks.Task GetAvatarAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetAvatarAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Avatar @@ -362,11 +339,10 @@ public interface IAvatarsApiAsync : IApiAccessor /// Get information about a specific Avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Avatar) - System.Threading.Tasks.Task> GetAvatarWithHttpInfoAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetAvatarWithHttpInfoAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Favorited Avatars /// @@ -375,22 +351,21 @@ public interface IAvatarsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Avatar> - System.Threading.Tasks.Task> GetFavoritedAvatarsAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFavoritedAvatarsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Favorited Avatars @@ -400,22 +375,21 @@ public interface IAvatarsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Avatar>) - System.Threading.Tasks.Task>> GetFavoritedAvatarsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetFavoritedAvatarsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Own Avatar /// @@ -423,11 +397,10 @@ public interface IAvatarsApiAsync : IApiAccessor /// Get the current avatar for the user. This will return an error for any other user than the one logged in. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of Avatar - System.Threading.Tasks.Task GetOwnAvatarAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetOwnAvatarAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Own Avatar @@ -436,11 +409,10 @@ public interface IAvatarsApiAsync : IApiAccessor /// Get the current avatar for the user. This will return an error for any other user than the one logged in. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Avatar) - System.Threading.Tasks.Task> GetOwnAvatarWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetOwnAvatarWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Search Avatars /// @@ -449,22 +421,21 @@ public interface IAvatarsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own avatars. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Avatar> - System.Threading.Tasks.Task> SearchAvatarsAsync(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SearchAvatarsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Search Avatars @@ -474,22 +445,21 @@ public interface IAvatarsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own avatars. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Avatar>) - System.Threading.Tasks.Task>> SearchAvatarsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> SearchAvatarsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Select Avatar /// @@ -497,11 +467,10 @@ public interface IAvatarsApiAsync : IApiAccessor /// Switches into that avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of CurrentUser - System.Threading.Tasks.Task SelectAvatarAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SelectAvatarAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Select Avatar @@ -510,11 +479,10 @@ public interface IAvatarsApiAsync : IApiAccessor /// Switches into that avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CurrentUser) - System.Threading.Tasks.Task> SelectAvatarWithHttpInfoAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SelectAvatarWithHttpInfoAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Select Fallback Avatar /// @@ -522,11 +490,10 @@ public interface IAvatarsApiAsync : IApiAccessor /// Switches into that avatar as your fallback avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of CurrentUser - System.Threading.Tasks.Task SelectFallbackAvatarAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SelectFallbackAvatarAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Select Fallback Avatar @@ -535,11 +502,10 @@ public interface IAvatarsApiAsync : IApiAccessor /// Switches into that avatar as your fallback avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CurrentUser) - System.Threading.Tasks.Task> SelectFallbackAvatarWithHttpInfoAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SelectFallbackAvatarWithHttpInfoAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Avatar /// @@ -547,12 +513,11 @@ public interface IAvatarsApiAsync : IApiAccessor /// Update information about a specific avatar. /// /// Thrown when fails to make API call - /// + /// Must be a valid avatar ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Avatar - System.Threading.Tasks.Task UpdateAvatarAsync(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateAvatarAsync(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Avatar @@ -561,12 +526,11 @@ public interface IAvatarsApiAsync : IApiAccessor /// Update information about a specific avatar. /// /// Thrown when fails to make API call - /// + /// Must be a valid avatar ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Avatar) - System.Threading.Tasks.Task> UpdateAvatarWithHttpInfoAsync(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateAvatarWithHttpInfoAsync(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -692,9 +656,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Avatar - public Avatar CreateAvatar(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), int operationIndex = 0) + public Avatar CreateAvatar(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest)) { VRChat.API.Client.ApiResponse localVarResponse = CreateAvatarWithHttpInfo(createAvatarRequest); return localVarResponse.Data; @@ -705,9 +668,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of Avatar - public VRChat.API.Client.ApiResponse CreateAvatarWithHttpInfo(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse CreateAvatarWithHttpInfo(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -721,22 +683,13 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = createAvatarRequest; - localVarRequestOptions.Operation = "AvatarsApi.CreateAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -752,13 +705,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory // make the HTTP request var localVarResponse = this.Client.Post("/avatars", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -769,12 +720,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Avatar - public async System.Threading.Tasks.Task CreateAvatarAsync(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateAvatarAsync(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await CreateAvatarWithHttpInfoAsync(createAvatarRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await CreateAvatarWithHttpInfoAsync(createAvatarRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -783,10 +733,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Avatar) - public async System.Threading.Tasks.Task> CreateAvatarWithHttpInfoAsync(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateAvatarWithHttpInfoAsync(CreateAvatarRequest createAvatarRequest = default(CreateAvatarRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -800,23 +749,15 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = createAvatarRequest; - localVarRequestOptions.Operation = "AvatarsApi.CreateAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -831,15 +772,13 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/avatars", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -849,10 +788,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Avatar - public Avatar DeleteAvatar(string avatarId, int operationIndex = 0) + public Avatar DeleteAvatar(string avatarId) { VRChat.API.Client.ApiResponse localVarResponse = DeleteAvatarWithHttpInfo(avatarId); return localVarResponse.Data; @@ -862,16 +800,13 @@ public Avatar DeleteAvatar(string avatarId, int operationIndex = 0) /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// ApiResponse of Avatar - public VRChat.API.Client.ApiResponse DeleteAvatarWithHttpInfo(string avatarId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse DeleteAvatarWithHttpInfo(string avatarId) { // verify the required parameter 'avatarId' is set if (avatarId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'avatarId' when calling AvatarsApi->DeleteAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -884,22 +819,13 @@ public VRChat.API.Client.ApiResponse DeleteAvatarWithHttpInfo(string ava }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("avatarId", VRChat.API.Client.ClientUtils.ParameterToString(avatarId)); // path parameter - localVarRequestOptions.Operation = "AvatarsApi.DeleteAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -915,13 +841,11 @@ public VRChat.API.Client.ApiResponse DeleteAvatarWithHttpInfo(string ava // make the HTTP request var localVarResponse = this.Client.Delete("/avatars/{avatarId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -931,13 +855,12 @@ public VRChat.API.Client.ApiResponse DeleteAvatarWithHttpInfo(string ava /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of Avatar - public async System.Threading.Tasks.Task DeleteAvatarAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteAvatarAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await DeleteAvatarWithHttpInfoAsync(avatarId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await DeleteAvatarWithHttpInfoAsync(avatarId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -945,17 +868,14 @@ public VRChat.API.Client.ApiResponse DeleteAvatarWithHttpInfo(string ava /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Avatar) - public async System.Threading.Tasks.Task> DeleteAvatarWithHttpInfoAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteAvatarWithHttpInfoAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'avatarId' is set if (avatarId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'avatarId' when calling AvatarsApi->DeleteAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -968,23 +888,15 @@ public VRChat.API.Client.ApiResponse DeleteAvatarWithHttpInfo(string ava "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("avatarId", VRChat.API.Client.ClientUtils.ParameterToString(avatarId)); // path parameter - localVarRequestOptions.Operation = "AvatarsApi.DeleteAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -999,15 +911,13 @@ public VRChat.API.Client.ApiResponse DeleteAvatarWithHttpInfo(string ava } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/avatars/{avatarId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1017,10 +927,9 @@ public VRChat.API.Client.ApiResponse DeleteAvatarWithHttpInfo(string ava /// Get Avatar Get information about a specific Avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Avatar - public Avatar GetAvatar(string avatarId, int operationIndex = 0) + public Avatar GetAvatar(string avatarId) { VRChat.API.Client.ApiResponse localVarResponse = GetAvatarWithHttpInfo(avatarId); return localVarResponse.Data; @@ -1030,16 +939,13 @@ public Avatar GetAvatar(string avatarId, int operationIndex = 0) /// Get Avatar Get information about a specific Avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// ApiResponse of Avatar - public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatarId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatarId) { // verify the required parameter 'avatarId' is set if (avatarId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'avatarId' when calling AvatarsApi->GetAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1052,22 +958,13 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("avatarId", VRChat.API.Client.ClientUtils.ParameterToString(avatarId)); // path parameter - localVarRequestOptions.Operation = "AvatarsApi.GetAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1083,13 +980,11 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar // make the HTTP request var localVarResponse = this.Client.Get("/avatars/{avatarId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1099,13 +994,12 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar /// Get Avatar Get information about a specific Avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of Avatar - public async System.Threading.Tasks.Task GetAvatarAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetAvatarAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetAvatarWithHttpInfoAsync(avatarId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetAvatarWithHttpInfoAsync(avatarId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1113,17 +1007,14 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar /// Get Avatar Get information about a specific Avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Avatar) - public async System.Threading.Tasks.Task> GetAvatarWithHttpInfoAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetAvatarWithHttpInfoAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'avatarId' is set if (avatarId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'avatarId' when calling AvatarsApi->GetAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1136,23 +1027,15 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("avatarId", VRChat.API.Client.ClientUtils.ParameterToString(avatarId)); // path parameter - localVarRequestOptions.Operation = "AvatarsApi.GetAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1167,15 +1050,13 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/avatars/{avatarId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1186,21 +1067,20 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// List<Avatar> - public List GetFavoritedAvatars(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0) + public List GetFavoritedAvatars(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)) { VRChat.API.Client.ApiResponse> localVarResponse = GetFavoritedAvatarsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); return localVarResponse.Data; @@ -1211,21 +1091,20 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// ApiResponse of List<Avatar> - public VRChat.API.Client.ApiResponse> GetFavoritedAvatarsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetFavoritedAvatarsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1238,16 +1117,10 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -1302,9 +1175,6 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "userId", userId)); } - localVarRequestOptions.Operation = "AvatarsApi.GetFavoritedAvatars"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1320,13 +1190,11 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar // make the HTTP request var localVarResponse = this.Client.Get>("/avatars/favorites", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavoritedAvatars", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1337,24 +1205,23 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Avatar> - public async System.Threading.Tasks.Task> GetFavoritedAvatarsAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFavoritedAvatarsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetFavoritedAvatarsWithHttpInfoAsync(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetFavoritedAvatarsWithHttpInfoAsync(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1363,22 +1230,21 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Avatar>) - public async System.Threading.Tasks.Task>> GetFavoritedAvatarsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetFavoritedAvatarsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1391,17 +1257,12 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -1456,9 +1317,6 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "userId", userId)); } - localVarRequestOptions.Operation = "AvatarsApi.GetFavoritedAvatars"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1473,15 +1331,13 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/avatars/favorites", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavoritedAvatars", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1491,10 +1347,9 @@ public VRChat.API.Client.ApiResponse GetAvatarWithHttpInfo(string avatar /// Get Own Avatar Get the current avatar for the user. This will return an error for any other user than the one logged in. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Avatar - public Avatar GetOwnAvatar(string userId, int operationIndex = 0) + public Avatar GetOwnAvatar(string userId) { VRChat.API.Client.ApiResponse localVarResponse = GetOwnAvatarWithHttpInfo(userId); return localVarResponse.Data; @@ -1504,16 +1359,13 @@ public Avatar GetOwnAvatar(string userId, int operationIndex = 0) /// Get Own Avatar Get the current avatar for the user. This will return an error for any other user than the one logged in. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of Avatar - public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string userId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string userId) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling AvatarsApi->GetOwnAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1526,22 +1378,13 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "AvatarsApi.GetOwnAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1557,13 +1400,11 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use // make the HTTP request var localVarResponse = this.Client.Get("/users/{userId}/avatar", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetOwnAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1573,13 +1414,12 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use /// Get Own Avatar Get the current avatar for the user. This will return an error for any other user than the one logged in. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of Avatar - public async System.Threading.Tasks.Task GetOwnAvatarAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetOwnAvatarAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetOwnAvatarWithHttpInfoAsync(userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetOwnAvatarWithHttpInfoAsync(userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1587,17 +1427,14 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use /// Get Own Avatar Get the current avatar for the user. This will return an error for any other user than the one logged in. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Avatar) - public async System.Threading.Tasks.Task> GetOwnAvatarWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetOwnAvatarWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling AvatarsApi->GetOwnAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1610,23 +1447,15 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "AvatarsApi.GetOwnAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1641,15 +1470,13 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/users/{userId}/avatar", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetOwnAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1660,21 +1487,20 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own avatars. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// List<Avatar> - public List SearchAvatars(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0) + public List SearchAvatars(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)) { VRChat.API.Client.ApiResponse> localVarResponse = SearchAvatarsWithHttpInfo(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); return localVarResponse.Data; @@ -1685,21 +1511,20 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own avatars. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// ApiResponse of List<Avatar> - public VRChat.API.Client.ApiResponse> SearchAvatarsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> SearchAvatarsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1712,16 +1537,10 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -1776,9 +1595,6 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "platform", platform)); } - localVarRequestOptions.Operation = "AvatarsApi.SearchAvatars"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1794,13 +1610,11 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use // make the HTTP request var localVarResponse = this.Client.Get>("/avatars", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SearchAvatars", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1811,24 +1625,23 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own avatars. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Avatar> - public async System.Threading.Tasks.Task> SearchAvatarsAsync(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SearchAvatarsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await SearchAvatarsWithHttpInfoAsync(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await SearchAvatarsWithHttpInfoAsync(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1837,22 +1650,21 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own avatars. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Avatar>) - public async System.Threading.Tasks.Task>> SearchAvatarsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> SearchAvatarsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1865,17 +1677,12 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -1930,9 +1737,6 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "platform", platform)); } - localVarRequestOptions.Operation = "AvatarsApi.SearchAvatars"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1947,15 +1751,13 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/avatars", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SearchAvatars", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1965,10 +1767,9 @@ public VRChat.API.Client.ApiResponse GetOwnAvatarWithHttpInfo(string use /// Select Avatar Switches into that avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// CurrentUser - public CurrentUser SelectAvatar(string avatarId, int operationIndex = 0) + public CurrentUser SelectAvatar(string avatarId) { VRChat.API.Client.ApiResponse localVarResponse = SelectAvatarWithHttpInfo(avatarId); return localVarResponse.Data; @@ -1978,16 +1779,13 @@ public CurrentUser SelectAvatar(string avatarId, int operationIndex = 0) /// Select Avatar Switches into that avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// ApiResponse of CurrentUser - public VRChat.API.Client.ApiResponse SelectAvatarWithHttpInfo(string avatarId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse SelectAvatarWithHttpInfo(string avatarId) { // verify the required parameter 'avatarId' is set if (avatarId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'avatarId' when calling AvatarsApi->SelectAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2000,22 +1798,13 @@ public VRChat.API.Client.ApiResponse SelectAvatarWithHttpInfo(strin }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("avatarId", VRChat.API.Client.ClientUtils.ParameterToString(avatarId)); // path parameter - localVarRequestOptions.Operation = "AvatarsApi.SelectAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2031,13 +1820,11 @@ public VRChat.API.Client.ApiResponse SelectAvatarWithHttpInfo(strin // make the HTTP request var localVarResponse = this.Client.Put("/avatars/{avatarId}/select", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SelectAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2047,13 +1834,12 @@ public VRChat.API.Client.ApiResponse SelectAvatarWithHttpInfo(strin /// Select Avatar Switches into that avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of CurrentUser - public async System.Threading.Tasks.Task SelectAvatarAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SelectAvatarAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await SelectAvatarWithHttpInfoAsync(avatarId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await SelectAvatarWithHttpInfoAsync(avatarId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2061,17 +1847,14 @@ public VRChat.API.Client.ApiResponse SelectAvatarWithHttpInfo(strin /// Select Avatar Switches into that avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CurrentUser) - public async System.Threading.Tasks.Task> SelectAvatarWithHttpInfoAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SelectAvatarWithHttpInfoAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'avatarId' is set if (avatarId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'avatarId' when calling AvatarsApi->SelectAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2084,23 +1867,15 @@ public VRChat.API.Client.ApiResponse SelectAvatarWithHttpInfo(strin "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("avatarId", VRChat.API.Client.ClientUtils.ParameterToString(avatarId)); // path parameter - localVarRequestOptions.Operation = "AvatarsApi.SelectAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2115,15 +1890,13 @@ public VRChat.API.Client.ApiResponse SelectAvatarWithHttpInfo(strin } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/avatars/{avatarId}/select", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SelectAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2133,10 +1906,9 @@ public VRChat.API.Client.ApiResponse SelectAvatarWithHttpInfo(strin /// Select Fallback Avatar Switches into that avatar as your fallback avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// CurrentUser - public CurrentUser SelectFallbackAvatar(string avatarId, int operationIndex = 0) + public CurrentUser SelectFallbackAvatar(string avatarId) { VRChat.API.Client.ApiResponse localVarResponse = SelectFallbackAvatarWithHttpInfo(avatarId); return localVarResponse.Data; @@ -2146,16 +1918,13 @@ public CurrentUser SelectFallbackAvatar(string avatarId, int operationIndex = 0) /// Select Fallback Avatar Switches into that avatar as your fallback avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// ApiResponse of CurrentUser - public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpInfo(string avatarId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpInfo(string avatarId) { // verify the required parameter 'avatarId' is set if (avatarId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'avatarId' when calling AvatarsApi->SelectFallbackAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2168,22 +1937,13 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("avatarId", VRChat.API.Client.ClientUtils.ParameterToString(avatarId)); // path parameter - localVarRequestOptions.Operation = "AvatarsApi.SelectFallbackAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2199,13 +1959,11 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn // make the HTTP request var localVarResponse = this.Client.Put("/avatars/{avatarId}/selectFallback", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SelectFallbackAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2215,13 +1973,12 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn /// Select Fallback Avatar Switches into that avatar as your fallback avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of CurrentUser - public async System.Threading.Tasks.Task SelectFallbackAvatarAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SelectFallbackAvatarAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await SelectFallbackAvatarWithHttpInfoAsync(avatarId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await SelectFallbackAvatarWithHttpInfoAsync(avatarId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2229,17 +1986,14 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn /// Select Fallback Avatar Switches into that avatar as your fallback avatar. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid avatar ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CurrentUser) - public async System.Threading.Tasks.Task> SelectFallbackAvatarWithHttpInfoAsync(string avatarId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SelectFallbackAvatarWithHttpInfoAsync(string avatarId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'avatarId' is set if (avatarId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'avatarId' when calling AvatarsApi->SelectFallbackAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2252,23 +2006,15 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("avatarId", VRChat.API.Client.ClientUtils.ParameterToString(avatarId)); // path parameter - localVarRequestOptions.Operation = "AvatarsApi.SelectFallbackAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2283,15 +2029,13 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/avatars/{avatarId}/selectFallback", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SelectFallbackAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2301,11 +2045,10 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn /// Update Avatar Update information about a specific avatar. /// /// Thrown when fails to make API call - /// + /// Must be a valid avatar ID. /// (optional) - /// Index associated with the operation. /// Avatar - public Avatar UpdateAvatar(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), int operationIndex = 0) + public Avatar UpdateAvatar(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest)) { VRChat.API.Client.ApiResponse localVarResponse = UpdateAvatarWithHttpInfo(avatarId, updateAvatarRequest); return localVarResponse.Data; @@ -2315,17 +2058,14 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn /// Update Avatar Update information about a specific avatar. /// /// Thrown when fails to make API call - /// + /// Must be a valid avatar ID. /// (optional) - /// Index associated with the operation. /// ApiResponse of Avatar - public VRChat.API.Client.ApiResponse UpdateAvatarWithHttpInfo(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse UpdateAvatarWithHttpInfo(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest)) { // verify the required parameter 'avatarId' is set if (avatarId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'avatarId' when calling AvatarsApi->UpdateAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2339,23 +2079,14 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("avatarId", VRChat.API.Client.ClientUtils.ParameterToString(avatarId)); // path parameter localVarRequestOptions.Data = updateAvatarRequest; - localVarRequestOptions.Operation = "AvatarsApi.UpdateAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2371,13 +2102,11 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn // make the HTTP request var localVarResponse = this.Client.Put("/avatars/{avatarId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2387,14 +2116,13 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn /// Update Avatar Update information about a specific avatar. /// /// Thrown when fails to make API call - /// + /// Must be a valid avatar ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Avatar - public async System.Threading.Tasks.Task UpdateAvatarAsync(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateAvatarAsync(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await UpdateAvatarWithHttpInfoAsync(avatarId, updateAvatarRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await UpdateAvatarWithHttpInfoAsync(avatarId, updateAvatarRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2402,18 +2130,15 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn /// Update Avatar Update information about a specific avatar. /// /// Thrown when fails to make API call - /// + /// Must be a valid avatar ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Avatar) - public async System.Threading.Tasks.Task> UpdateAvatarWithHttpInfoAsync(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateAvatarWithHttpInfoAsync(string avatarId, UpdateAvatarRequest updateAvatarRequest = default(UpdateAvatarRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'avatarId' is set if (avatarId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'avatarId' when calling AvatarsApi->UpdateAvatar"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2427,24 +2152,16 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("avatarId", VRChat.API.Client.ClientUtils.ParameterToString(avatarId)); // path parameter localVarRequestOptions.Data = updateAvatarRequest; - localVarRequestOptions.Operation = "AvatarsApi.UpdateAvatar"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2459,15 +2176,13 @@ public VRChat.API.Client.ApiResponse SelectFallbackAvatarWithHttpIn } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/avatars/{avatarId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateAvatar", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/EconomyApi.cs b/src/VRChat.API/Api/EconomyApi.cs index 4142dfac..b3481010 100644 --- a/src/VRChat.API/Api/EconomyApi.cs +++ b/src/VRChat.API/Api/EconomyApi.cs @@ -33,9 +33,8 @@ public interface IEconomyApiSync : IApiAccessor /// Get a list of all current user subscriptions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// List<UserSubscription> - List GetCurrentSubscriptions(int operationIndex = 0); + List GetCurrentSubscriptions(); /// /// Get Current Subscriptions @@ -44,9 +43,8 @@ public interface IEconomyApiSync : IApiAccessor /// Get a list of all current user subscriptions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of List<UserSubscription> - ApiResponse> GetCurrentSubscriptionsWithHttpInfo(int operationIndex = 0); + ApiResponse> GetCurrentSubscriptionsWithHttpInfo(); /// /// Get License Group /// @@ -54,10 +52,9 @@ public interface IEconomyApiSync : IApiAccessor /// Get a single License Group by given ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid license group ID. /// LicenseGroup - LicenseGroup GetLicenseGroup(string licenseGroupId, int operationIndex = 0); + LicenseGroup GetLicenseGroup(string licenseGroupId); /// /// Get License Group @@ -66,10 +63,9 @@ public interface IEconomyApiSync : IApiAccessor /// Get a single License Group by given ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid license group ID. /// ApiResponse of LicenseGroup - ApiResponse GetLicenseGroupWithHttpInfo(string licenseGroupId, int operationIndex = 0); + ApiResponse GetLicenseGroupWithHttpInfo(string licenseGroupId); /// /// Get Steam Transaction /// @@ -77,11 +73,10 @@ public interface IEconomyApiSync : IApiAccessor /// Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid transaction ID. /// Transaction [Obsolete] - Transaction GetSteamTransaction(string transactionId, int operationIndex = 0); + Transaction GetSteamTransaction(string transactionId); /// /// Get Steam Transaction @@ -90,11 +85,10 @@ public interface IEconomyApiSync : IApiAccessor /// Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid transaction ID. /// ApiResponse of Transaction [Obsolete] - ApiResponse GetSteamTransactionWithHttpInfo(string transactionId, int operationIndex = 0); + ApiResponse GetSteamTransactionWithHttpInfo(string transactionId); /// /// List Steam Transactions /// @@ -102,9 +96,8 @@ public interface IEconomyApiSync : IApiAccessor /// Get all own Steam transactions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// List<Transaction> - List GetSteamTransactions(int operationIndex = 0); + List GetSteamTransactions(); /// /// List Steam Transactions @@ -113,9 +106,8 @@ public interface IEconomyApiSync : IApiAccessor /// Get all own Steam transactions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of List<Transaction> - ApiResponse> GetSteamTransactionsWithHttpInfo(int operationIndex = 0); + ApiResponse> GetSteamTransactionsWithHttpInfo(); /// /// List Subscriptions /// @@ -123,9 +115,8 @@ public interface IEconomyApiSync : IApiAccessor /// List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". /// /// Thrown when fails to make API call - /// Index associated with the operation. /// List<Subscription> - List GetSubscriptions(int operationIndex = 0); + List GetSubscriptions(); /// /// List Subscriptions @@ -134,9 +125,8 @@ public interface IEconomyApiSync : IApiAccessor /// List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of List<Subscription> - ApiResponse> GetSubscriptionsWithHttpInfo(int operationIndex = 0); + ApiResponse> GetSubscriptionsWithHttpInfo(); #endregion Synchronous Operations } @@ -153,10 +143,9 @@ public interface IEconomyApiAsync : IApiAccessor /// Get a list of all current user subscriptions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<UserSubscription> - System.Threading.Tasks.Task> GetCurrentSubscriptionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetCurrentSubscriptionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Current Subscriptions @@ -165,10 +154,9 @@ public interface IEconomyApiAsync : IApiAccessor /// Get a list of all current user subscriptions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<UserSubscription>) - System.Threading.Tasks.Task>> GetCurrentSubscriptionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetCurrentSubscriptionsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get License Group /// @@ -176,11 +164,10 @@ public interface IEconomyApiAsync : IApiAccessor /// Get a single License Group by given ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid license group ID. /// Cancellation Token to cancel the request. /// Task of LicenseGroup - System.Threading.Tasks.Task GetLicenseGroupAsync(string licenseGroupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetLicenseGroupAsync(string licenseGroupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get License Group @@ -189,11 +176,10 @@ public interface IEconomyApiAsync : IApiAccessor /// Get a single License Group by given ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid license group ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (LicenseGroup) - System.Threading.Tasks.Task> GetLicenseGroupWithHttpInfoAsync(string licenseGroupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetLicenseGroupWithHttpInfoAsync(string licenseGroupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Steam Transaction /// @@ -201,12 +187,11 @@ public interface IEconomyApiAsync : IApiAccessor /// Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid transaction ID. /// Cancellation Token to cancel the request. /// Task of Transaction [Obsolete] - System.Threading.Tasks.Task GetSteamTransactionAsync(string transactionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetSteamTransactionAsync(string transactionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Steam Transaction @@ -215,12 +200,11 @@ public interface IEconomyApiAsync : IApiAccessor /// Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid transaction ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Transaction) [Obsolete] - System.Threading.Tasks.Task> GetSteamTransactionWithHttpInfoAsync(string transactionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetSteamTransactionWithHttpInfoAsync(string transactionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Steam Transactions /// @@ -228,10 +212,9 @@ public interface IEconomyApiAsync : IApiAccessor /// Get all own Steam transactions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Transaction> - System.Threading.Tasks.Task> GetSteamTransactionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetSteamTransactionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Steam Transactions @@ -240,10 +223,9 @@ public interface IEconomyApiAsync : IApiAccessor /// Get all own Steam transactions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Transaction>) - System.Threading.Tasks.Task>> GetSteamTransactionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetSteamTransactionsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Subscriptions /// @@ -251,10 +233,9 @@ public interface IEconomyApiAsync : IApiAccessor /// List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Subscription> - System.Threading.Tasks.Task> GetSubscriptionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetSubscriptionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Subscriptions @@ -263,10 +244,9 @@ public interface IEconomyApiAsync : IApiAccessor /// List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Subscription>) - System.Threading.Tasks.Task>> GetSubscriptionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetSubscriptionsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -391,9 +371,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Get Current Subscriptions Get a list of all current user subscriptions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// List<UserSubscription> - public List GetCurrentSubscriptions(int operationIndex = 0) + public List GetCurrentSubscriptions() { VRChat.API.Client.ApiResponse> localVarResponse = GetCurrentSubscriptionsWithHttpInfo(); return localVarResponse.Data; @@ -403,9 +382,8 @@ public List GetCurrentSubscriptions(int operationIndex = 0) /// Get Current Subscriptions Get a list of all current user subscriptions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of List<UserSubscription> - public VRChat.API.Client.ApiResponse> GetCurrentSubscriptionsWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetCurrentSubscriptionsWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -418,20 +396,11 @@ public VRChat.API.Client.ApiResponse> GetCurrentSubscript }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "EconomyApi.GetCurrentSubscriptions"; - localVarRequestOptions.OperationIndex = operationIndex; // authentication (apiKeyCookie) required // cookie parameter support @@ -448,13 +417,11 @@ public VRChat.API.Client.ApiResponse> GetCurrentSubscript // make the HTTP request var localVarResponse = this.Client.Get>("/auth/user/subscription", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetCurrentSubscriptions", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -464,12 +431,11 @@ public VRChat.API.Client.ApiResponse> GetCurrentSubscript /// Get Current Subscriptions Get a list of all current user subscriptions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<UserSubscription> - public async System.Threading.Tasks.Task> GetCurrentSubscriptionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetCurrentSubscriptionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetCurrentSubscriptionsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetCurrentSubscriptionsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -477,10 +443,9 @@ public VRChat.API.Client.ApiResponse> GetCurrentSubscript /// Get Current Subscriptions Get a list of all current user subscriptions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<UserSubscription>) - public async System.Threading.Tasks.Task>> GetCurrentSubscriptionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetCurrentSubscriptionsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -493,21 +458,13 @@ public VRChat.API.Client.ApiResponse> GetCurrentSubscript "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "EconomyApi.GetCurrentSubscriptions"; - localVarRequestOptions.OperationIndex = operationIndex; // authentication (apiKeyCookie) required // cookie parameter support @@ -523,15 +480,13 @@ public VRChat.API.Client.ApiResponse> GetCurrentSubscript } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/auth/user/subscription", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetCurrentSubscriptions", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -541,10 +496,9 @@ public VRChat.API.Client.ApiResponse> GetCurrentSubscript /// Get License Group Get a single License Group by given ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid license group ID. /// LicenseGroup - public LicenseGroup GetLicenseGroup(string licenseGroupId, int operationIndex = 0) + public LicenseGroup GetLicenseGroup(string licenseGroupId) { VRChat.API.Client.ApiResponse localVarResponse = GetLicenseGroupWithHttpInfo(licenseGroupId); return localVarResponse.Data; @@ -554,16 +508,13 @@ public LicenseGroup GetLicenseGroup(string licenseGroupId, int operationIndex = /// Get License Group Get a single License Group by given ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid license group ID. /// ApiResponse of LicenseGroup - public VRChat.API.Client.ApiResponse GetLicenseGroupWithHttpInfo(string licenseGroupId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetLicenseGroupWithHttpInfo(string licenseGroupId) { // verify the required parameter 'licenseGroupId' is set if (licenseGroupId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'licenseGroupId' when calling EconomyApi->GetLicenseGroup"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -576,22 +527,13 @@ public VRChat.API.Client.ApiResponse GetLicenseGroupWithHttpInfo(s }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("licenseGroupId", VRChat.API.Client.ClientUtils.ParameterToString(licenseGroupId)); // path parameter - localVarRequestOptions.Operation = "EconomyApi.GetLicenseGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -607,13 +549,11 @@ public VRChat.API.Client.ApiResponse GetLicenseGroupWithHttpInfo(s // make the HTTP request var localVarResponse = this.Client.Get("/licenseGroups/{licenseGroupId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetLicenseGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -623,13 +563,12 @@ public VRChat.API.Client.ApiResponse GetLicenseGroupWithHttpInfo(s /// Get License Group Get a single License Group by given ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid license group ID. /// Cancellation Token to cancel the request. /// Task of LicenseGroup - public async System.Threading.Tasks.Task GetLicenseGroupAsync(string licenseGroupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetLicenseGroupAsync(string licenseGroupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetLicenseGroupWithHttpInfoAsync(licenseGroupId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetLicenseGroupWithHttpInfoAsync(licenseGroupId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -637,17 +576,14 @@ public VRChat.API.Client.ApiResponse GetLicenseGroupWithHttpInfo(s /// Get License Group Get a single License Group by given ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid license group ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (LicenseGroup) - public async System.Threading.Tasks.Task> GetLicenseGroupWithHttpInfoAsync(string licenseGroupId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetLicenseGroupWithHttpInfoAsync(string licenseGroupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'licenseGroupId' is set if (licenseGroupId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'licenseGroupId' when calling EconomyApi->GetLicenseGroup"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -660,23 +596,15 @@ public VRChat.API.Client.ApiResponse GetLicenseGroupWithHttpInfo(s "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("licenseGroupId", VRChat.API.Client.ClientUtils.ParameterToString(licenseGroupId)); // path parameter - localVarRequestOptions.Operation = "EconomyApi.GetLicenseGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -691,15 +619,13 @@ public VRChat.API.Client.ApiResponse GetLicenseGroupWithHttpInfo(s } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/licenseGroups/{licenseGroupId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetLicenseGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -709,11 +635,10 @@ public VRChat.API.Client.ApiResponse GetLicenseGroupWithHttpInfo(s /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid transaction ID. /// Transaction [Obsolete] - public Transaction GetSteamTransaction(string transactionId, int operationIndex = 0) + public Transaction GetSteamTransaction(string transactionId) { VRChat.API.Client.ApiResponse localVarResponse = GetSteamTransactionWithHttpInfo(transactionId); return localVarResponse.Data; @@ -723,17 +648,14 @@ public Transaction GetSteamTransaction(string transactionId, int operationIndex /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid transaction ID. /// ApiResponse of Transaction [Obsolete] - public VRChat.API.Client.ApiResponse GetSteamTransactionWithHttpInfo(string transactionId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetSteamTransactionWithHttpInfo(string transactionId) { // verify the required parameter 'transactionId' is set if (transactionId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'transactionId' when calling EconomyApi->GetSteamTransaction"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -746,22 +668,13 @@ public VRChat.API.Client.ApiResponse GetSteamTransactionWithHttpInf }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("transactionId", VRChat.API.Client.ClientUtils.ParameterToString(transactionId)); // path parameter - localVarRequestOptions.Operation = "EconomyApi.GetSteamTransaction"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -777,13 +690,11 @@ public VRChat.API.Client.ApiResponse GetSteamTransactionWithHttpInf // make the HTTP request var localVarResponse = this.Client.Get("/Steam/transactions/{transactionId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetSteamTransaction", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -793,14 +704,13 @@ public VRChat.API.Client.ApiResponse GetSteamTransactionWithHttpInf /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid transaction ID. /// Cancellation Token to cancel the request. /// Task of Transaction [Obsolete] - public async System.Threading.Tasks.Task GetSteamTransactionAsync(string transactionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetSteamTransactionAsync(string transactionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetSteamTransactionWithHttpInfoAsync(transactionId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetSteamTransactionWithHttpInfoAsync(transactionId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -808,18 +718,15 @@ public VRChat.API.Client.ApiResponse GetSteamTransactionWithHttpInf /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid transaction ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Transaction) [Obsolete] - public async System.Threading.Tasks.Task> GetSteamTransactionWithHttpInfoAsync(string transactionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetSteamTransactionWithHttpInfoAsync(string transactionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'transactionId' is set if (transactionId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'transactionId' when calling EconomyApi->GetSteamTransaction"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -832,23 +739,15 @@ public VRChat.API.Client.ApiResponse GetSteamTransactionWithHttpInf "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("transactionId", VRChat.API.Client.ClientUtils.ParameterToString(transactionId)); // path parameter - localVarRequestOptions.Operation = "EconomyApi.GetSteamTransaction"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -863,15 +762,13 @@ public VRChat.API.Client.ApiResponse GetSteamTransactionWithHttpInf } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/Steam/transactions/{transactionId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetSteamTransaction", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -881,9 +778,8 @@ public VRChat.API.Client.ApiResponse GetSteamTransactionWithHttpInf /// List Steam Transactions Get all own Steam transactions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// List<Transaction> - public List GetSteamTransactions(int operationIndex = 0) + public List GetSteamTransactions() { VRChat.API.Client.ApiResponse> localVarResponse = GetSteamTransactionsWithHttpInfo(); return localVarResponse.Data; @@ -893,9 +789,8 @@ public List GetSteamTransactions(int operationIndex = 0) /// List Steam Transactions Get all own Steam transactions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of List<Transaction> - public VRChat.API.Client.ApiResponse> GetSteamTransactionsWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetSteamTransactionsWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -908,20 +803,11 @@ public VRChat.API.Client.ApiResponse> GetSteamTransactionsWith }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "EconomyApi.GetSteamTransactions"; - localVarRequestOptions.OperationIndex = operationIndex; // authentication (apiKeyCookie) required // cookie parameter support @@ -938,13 +824,11 @@ public VRChat.API.Client.ApiResponse> GetSteamTransactionsWith // make the HTTP request var localVarResponse = this.Client.Get>("/Steam/transactions", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetSteamTransactions", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -954,12 +838,11 @@ public VRChat.API.Client.ApiResponse> GetSteamTransactionsWith /// List Steam Transactions Get all own Steam transactions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Transaction> - public async System.Threading.Tasks.Task> GetSteamTransactionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetSteamTransactionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetSteamTransactionsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetSteamTransactionsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -967,10 +850,9 @@ public VRChat.API.Client.ApiResponse> GetSteamTransactionsWith /// List Steam Transactions Get all own Steam transactions. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Transaction>) - public async System.Threading.Tasks.Task>> GetSteamTransactionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetSteamTransactionsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -983,21 +865,13 @@ public VRChat.API.Client.ApiResponse> GetSteamTransactionsWith "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "EconomyApi.GetSteamTransactions"; - localVarRequestOptions.OperationIndex = operationIndex; // authentication (apiKeyCookie) required // cookie parameter support @@ -1013,15 +887,13 @@ public VRChat.API.Client.ApiResponse> GetSteamTransactionsWith } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/Steam/transactions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetSteamTransactions", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1031,9 +903,8 @@ public VRChat.API.Client.ApiResponse> GetSteamTransactionsWith /// List Subscriptions List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". /// /// Thrown when fails to make API call - /// Index associated with the operation. /// List<Subscription> - public List GetSubscriptions(int operationIndex = 0) + public List GetSubscriptions() { VRChat.API.Client.ApiResponse> localVarResponse = GetSubscriptionsWithHttpInfo(); return localVarResponse.Data; @@ -1043,9 +914,8 @@ public List GetSubscriptions(int operationIndex = 0) /// List Subscriptions List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of List<Subscription> - public VRChat.API.Client.ApiResponse> GetSubscriptionsWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetSubscriptionsWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1058,20 +928,11 @@ public VRChat.API.Client.ApiResponse> GetSubscriptionsWithHtt }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "EconomyApi.GetSubscriptions"; - localVarRequestOptions.OperationIndex = operationIndex; // authentication (apiKeyCookie) required // cookie parameter support @@ -1088,13 +949,11 @@ public VRChat.API.Client.ApiResponse> GetSubscriptionsWithHtt // make the HTTP request var localVarResponse = this.Client.Get>("/subscriptions", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetSubscriptions", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1104,12 +963,11 @@ public VRChat.API.Client.ApiResponse> GetSubscriptionsWithHtt /// List Subscriptions List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Subscription> - public async System.Threading.Tasks.Task> GetSubscriptionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetSubscriptionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetSubscriptionsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetSubscriptionsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1117,10 +975,9 @@ public VRChat.API.Client.ApiResponse> GetSubscriptionsWithHtt /// List Subscriptions List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Subscription>) - public async System.Threading.Tasks.Task>> GetSubscriptionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetSubscriptionsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1133,21 +990,13 @@ public VRChat.API.Client.ApiResponse> GetSubscriptionsWithHtt "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "EconomyApi.GetSubscriptions"; - localVarRequestOptions.OperationIndex = operationIndex; // authentication (apiKeyCookie) required // cookie parameter support @@ -1163,15 +1012,13 @@ public VRChat.API.Client.ApiResponse> GetSubscriptionsWithHtt } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/subscriptions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetSubscriptions", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/FavoritesApi.cs b/src/VRChat.API/Api/FavoritesApi.cs index ee6913ea..bd055f1c 100644 --- a/src/VRChat.API/Api/FavoritesApi.cs +++ b/src/VRChat.API/Api/FavoritesApi.cs @@ -34,9 +34,8 @@ public interface IFavoritesApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Favorite - Favorite AddFavorite(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), int operationIndex = 0); + Favorite AddFavorite(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest)); /// /// Add Favorite @@ -46,9 +45,8 @@ public interface IFavoritesApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of Favorite - ApiResponse AddFavoriteWithHttpInfo(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), int operationIndex = 0); + ApiResponse AddFavoriteWithHttpInfo(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest)); /// /// Clear Favorite Group /// @@ -57,11 +55,10 @@ public interface IFavoritesApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// Success - Success ClearFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0); + Success ClearFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId); /// /// Clear Favorite Group @@ -71,11 +68,10 @@ public interface IFavoritesApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// ApiResponse of Success - ApiResponse ClearFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0); + ApiResponse ClearFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId); /// /// Show Favorite /// @@ -83,10 +79,9 @@ public interface IFavoritesApiSync : IApiAccessor /// Return information about a specific Favorite. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Favorite - Favorite GetFavorite(string favoriteId, int operationIndex = 0); + Favorite GetFavorite(string favoriteId); /// /// Show Favorite @@ -95,10 +90,9 @@ public interface IFavoritesApiSync : IApiAccessor /// Return information about a specific Favorite. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// ApiResponse of Favorite - ApiResponse GetFavoriteWithHttpInfo(string favoriteId, int operationIndex = 0); + ApiResponse GetFavoriteWithHttpInfo(string favoriteId); /// /// Show Favorite Group /// @@ -107,11 +101,10 @@ public interface IFavoritesApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// FavoriteGroup - FavoriteGroup GetFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0); + FavoriteGroup GetFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId); /// /// Show Favorite Group @@ -121,11 +114,10 @@ public interface IFavoritesApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// ApiResponse of FavoriteGroup - ApiResponse GetFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0); + ApiResponse GetFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId); /// /// List Favorite Groups /// @@ -136,9 +128,8 @@ public interface IFavoritesApiSync : IApiAccessor /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) /// The owner of whoms favorite groups to return. Must be a UserID. (optional) - /// Index associated with the operation. /// List<FavoriteGroup> - List GetFavoriteGroups(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), int operationIndex = 0); + List GetFavoriteGroups(int? n = default(int?), int? offset = default(int?), string ownerId = default(string)); /// /// List Favorite Groups @@ -150,9 +141,8 @@ public interface IFavoritesApiSync : IApiAccessor /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) /// The owner of whoms favorite groups to return. Must be a UserID. (optional) - /// Index associated with the operation. /// ApiResponse of List<FavoriteGroup> - ApiResponse> GetFavoriteGroupsWithHttpInfo(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), int operationIndex = 0); + ApiResponse> GetFavoriteGroupsWithHttpInfo(int? n = default(int?), int? offset = default(int?), string ownerId = default(string)); /// /// List Favorites /// @@ -164,9 +154,8 @@ public interface IFavoritesApiSync : IApiAccessor /// A zero-based offset from the default object sorting from where search results start. (optional) /// The type of favorites to return, FavoriteType. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// List<Favorite> - List GetFavorites(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), int operationIndex = 0); + List GetFavorites(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string)); /// /// List Favorites @@ -179,9 +168,8 @@ public interface IFavoritesApiSync : IApiAccessor /// A zero-based offset from the default object sorting from where search results start. (optional) /// The type of favorites to return, FavoriteType. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// ApiResponse of List<Favorite> - ApiResponse> GetFavoritesWithHttpInfo(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), int operationIndex = 0); + ApiResponse> GetFavoritesWithHttpInfo(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string)); /// /// Remove Favorite /// @@ -189,10 +177,9 @@ public interface IFavoritesApiSync : IApiAccessor /// Remove a favorite from your favorites list. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Success - Success RemoveFavorite(string favoriteId, int operationIndex = 0); + Success RemoveFavorite(string favoriteId); /// /// Remove Favorite @@ -201,10 +188,9 @@ public interface IFavoritesApiSync : IApiAccessor /// Remove a favorite from your favorites list. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// ApiResponse of Success - ApiResponse RemoveFavoriteWithHttpInfo(string favoriteId, int operationIndex = 0); + ApiResponse RemoveFavoriteWithHttpInfo(string favoriteId); /// /// Update Favorite Group /// @@ -213,12 +199,11 @@ public interface IFavoritesApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// - void UpdateFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), int operationIndex = 0); + void UpdateFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest)); /// /// Update Favorite Group @@ -228,12 +213,11 @@ public interface IFavoritesApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdateFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), int operationIndex = 0); + ApiResponse UpdateFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest)); #endregion Synchronous Operations } @@ -251,10 +235,9 @@ public interface IFavoritesApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Favorite - System.Threading.Tasks.Task AddFavoriteAsync(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AddFavoriteAsync(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Add Favorite @@ -264,10 +247,9 @@ public interface IFavoritesApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Favorite) - System.Threading.Tasks.Task> AddFavoriteWithHttpInfoAsync(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AddFavoriteWithHttpInfoAsync(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Clear Favorite Group /// @@ -276,12 +258,11 @@ public interface IFavoritesApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task ClearFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ClearFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Clear Favorite Group @@ -291,12 +272,11 @@ public interface IFavoritesApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> ClearFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ClearFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Show Favorite /// @@ -304,11 +284,10 @@ public interface IFavoritesApiAsync : IApiAccessor /// Return information about a specific Favorite. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Cancellation Token to cancel the request. /// Task of Favorite - System.Threading.Tasks.Task GetFavoriteAsync(string favoriteId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetFavoriteAsync(string favoriteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Show Favorite @@ -317,11 +296,10 @@ public interface IFavoritesApiAsync : IApiAccessor /// Return information about a specific Favorite. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Favorite) - System.Threading.Tasks.Task> GetFavoriteWithHttpInfoAsync(string favoriteId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFavoriteWithHttpInfoAsync(string favoriteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Show Favorite Group /// @@ -330,12 +308,11 @@ public interface IFavoritesApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of FavoriteGroup - System.Threading.Tasks.Task GetFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Show Favorite Group @@ -345,12 +322,11 @@ public interface IFavoritesApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FavoriteGroup) - System.Threading.Tasks.Task> GetFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Favorite Groups /// @@ -361,10 +337,9 @@ public interface IFavoritesApiAsync : IApiAccessor /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) /// The owner of whoms favorite groups to return. Must be a UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<FavoriteGroup> - System.Threading.Tasks.Task> GetFavoriteGroupsAsync(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFavoriteGroupsAsync(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Favorite Groups @@ -376,10 +351,9 @@ public interface IFavoritesApiAsync : IApiAccessor /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) /// The owner of whoms favorite groups to return. Must be a UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<FavoriteGroup>) - System.Threading.Tasks.Task>> GetFavoriteGroupsWithHttpInfoAsync(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetFavoriteGroupsWithHttpInfoAsync(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Favorites /// @@ -391,10 +365,9 @@ public interface IFavoritesApiAsync : IApiAccessor /// A zero-based offset from the default object sorting from where search results start. (optional) /// The type of favorites to return, FavoriteType. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Favorite> - System.Threading.Tasks.Task> GetFavoritesAsync(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFavoritesAsync(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Favorites @@ -407,10 +380,9 @@ public interface IFavoritesApiAsync : IApiAccessor /// A zero-based offset from the default object sorting from where search results start. (optional) /// The type of favorites to return, FavoriteType. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Favorite>) - System.Threading.Tasks.Task>> GetFavoritesWithHttpInfoAsync(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetFavoritesWithHttpInfoAsync(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Remove Favorite /// @@ -418,11 +390,10 @@ public interface IFavoritesApiAsync : IApiAccessor /// Remove a favorite from your favorites list. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task RemoveFavoriteAsync(string favoriteId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RemoveFavoriteAsync(string favoriteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Remove Favorite @@ -431,11 +402,10 @@ public interface IFavoritesApiAsync : IApiAccessor /// Remove a favorite from your favorites list. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> RemoveFavoriteWithHttpInfoAsync(string favoriteId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RemoveFavoriteWithHttpInfoAsync(string favoriteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Favorite Group /// @@ -444,13 +414,12 @@ public interface IFavoritesApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdateFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Favorite Group @@ -460,13 +429,12 @@ public interface IFavoritesApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -592,9 +560,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Favorite - public Favorite AddFavorite(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), int operationIndex = 0) + public Favorite AddFavorite(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest)) { VRChat.API.Client.ApiResponse localVarResponse = AddFavoriteWithHttpInfo(addFavoriteRequest); return localVarResponse.Data; @@ -605,9 +572,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of Favorite - public VRChat.API.Client.ApiResponse AddFavoriteWithHttpInfo(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse AddFavoriteWithHttpInfo(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -621,22 +587,13 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = addFavoriteRequest; - localVarRequestOptions.Operation = "FavoritesApi.AddFavorite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -652,13 +609,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory // make the HTTP request var localVarResponse = this.Client.Post("/favorites", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("AddFavorite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -669,12 +624,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Favorite - public async System.Threading.Tasks.Task AddFavoriteAsync(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AddFavoriteAsync(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await AddFavoriteWithHttpInfoAsync(addFavoriteRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await AddFavoriteWithHttpInfoAsync(addFavoriteRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -683,10 +637,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Favorite) - public async System.Threading.Tasks.Task> AddFavoriteWithHttpInfoAsync(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AddFavoriteWithHttpInfoAsync(AddFavoriteRequest addFavoriteRequest = default(AddFavoriteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -700,23 +653,15 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = addFavoriteRequest; - localVarRequestOptions.Operation = "FavoritesApi.AddFavorite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -731,15 +676,13 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/favorites", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("AddFavorite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -750,11 +693,10 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// Success - public Success ClearFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0) + public Success ClearFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId) { VRChat.API.Client.ApiResponse localVarResponse = ClearFavoriteGroupWithHttpInfo(favoriteGroupType, favoriteGroupName, userId); return localVarResponse.Data; @@ -765,29 +707,22 @@ public Success ClearFavoriteGroup(string favoriteGroupType, string favoriteGroup /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse ClearFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse ClearFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId) { // verify the required parameter 'favoriteGroupType' is set if (favoriteGroupType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupType' when calling FavoritesApi->ClearFavoriteGroup"); - } // verify the required parameter 'favoriteGroupName' is set if (favoriteGroupName == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupName' when calling FavoritesApi->ClearFavoriteGroup"); - } // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FavoritesApi->ClearFavoriteGroup"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -800,24 +735,15 @@ public VRChat.API.Client.ApiResponse ClearFavoriteGroupWithHttpInfo(str }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("favoriteGroupType", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupType)); // path parameter localVarRequestOptions.PathParameters.Add("favoriteGroupName", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupName)); // path parameter localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FavoritesApi.ClearFavoriteGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -833,13 +759,11 @@ public VRChat.API.Client.ApiResponse ClearFavoriteGroupWithHttpInfo(str // make the HTTP request var localVarResponse = this.Client.Delete("/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ClearFavoriteGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -850,14 +774,13 @@ public VRChat.API.Client.ApiResponse ClearFavoriteGroupWithHttpInfo(str /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task ClearFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ClearFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await ClearFavoriteGroupWithHttpInfoAsync(favoriteGroupType, favoriteGroupName, userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await ClearFavoriteGroupWithHttpInfoAsync(favoriteGroupType, favoriteGroupName, userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -866,30 +789,23 @@ public VRChat.API.Client.ApiResponse ClearFavoriteGroupWithHttpInfo(str /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> ClearFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ClearFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'favoriteGroupType' is set if (favoriteGroupType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupType' when calling FavoritesApi->ClearFavoriteGroup"); - } // verify the required parameter 'favoriteGroupName' is set if (favoriteGroupName == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupName' when calling FavoritesApi->ClearFavoriteGroup"); - } // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FavoritesApi->ClearFavoriteGroup"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -902,25 +818,17 @@ public VRChat.API.Client.ApiResponse ClearFavoriteGroupWithHttpInfo(str "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("favoriteGroupType", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupType)); // path parameter localVarRequestOptions.PathParameters.Add("favoriteGroupName", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupName)); // path parameter localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FavoritesApi.ClearFavoriteGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -935,15 +843,13 @@ public VRChat.API.Client.ApiResponse ClearFavoriteGroupWithHttpInfo(str } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ClearFavoriteGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -953,10 +859,9 @@ public VRChat.API.Client.ApiResponse ClearFavoriteGroupWithHttpInfo(str /// Show Favorite Return information about a specific Favorite. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Favorite - public Favorite GetFavorite(string favoriteId, int operationIndex = 0) + public Favorite GetFavorite(string favoriteId) { VRChat.API.Client.ApiResponse localVarResponse = GetFavoriteWithHttpInfo(favoriteId); return localVarResponse.Data; @@ -966,16 +871,13 @@ public Favorite GetFavorite(string favoriteId, int operationIndex = 0) /// Show Favorite Return information about a specific Favorite. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// ApiResponse of Favorite - public VRChat.API.Client.ApiResponse GetFavoriteWithHttpInfo(string favoriteId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetFavoriteWithHttpInfo(string favoriteId) { // verify the required parameter 'favoriteId' is set if (favoriteId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteId' when calling FavoritesApi->GetFavorite"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -988,22 +890,13 @@ public VRChat.API.Client.ApiResponse GetFavoriteWithHttpInfo(string fa }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("favoriteId", VRChat.API.Client.ClientUtils.ParameterToString(favoriteId)); // path parameter - localVarRequestOptions.Operation = "FavoritesApi.GetFavorite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1019,13 +912,11 @@ public VRChat.API.Client.ApiResponse GetFavoriteWithHttpInfo(string fa // make the HTTP request var localVarResponse = this.Client.Get("/favorites/{favoriteId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavorite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1035,13 +926,12 @@ public VRChat.API.Client.ApiResponse GetFavoriteWithHttpInfo(string fa /// Show Favorite Return information about a specific Favorite. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Cancellation Token to cancel the request. /// Task of Favorite - public async System.Threading.Tasks.Task GetFavoriteAsync(string favoriteId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetFavoriteAsync(string favoriteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetFavoriteWithHttpInfoAsync(favoriteId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetFavoriteWithHttpInfoAsync(favoriteId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1049,17 +939,14 @@ public VRChat.API.Client.ApiResponse GetFavoriteWithHttpInfo(string fa /// Show Favorite Return information about a specific Favorite. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Favorite) - public async System.Threading.Tasks.Task> GetFavoriteWithHttpInfoAsync(string favoriteId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFavoriteWithHttpInfoAsync(string favoriteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'favoriteId' is set if (favoriteId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteId' when calling FavoritesApi->GetFavorite"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1072,23 +959,15 @@ public VRChat.API.Client.ApiResponse GetFavoriteWithHttpInfo(string fa "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("favoriteId", VRChat.API.Client.ClientUtils.ParameterToString(favoriteId)); // path parameter - localVarRequestOptions.Operation = "FavoritesApi.GetFavorite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1103,15 +982,13 @@ public VRChat.API.Client.ApiResponse GetFavoriteWithHttpInfo(string fa } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/favorites/{favoriteId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavorite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1122,11 +999,10 @@ public VRChat.API.Client.ApiResponse GetFavoriteWithHttpInfo(string fa /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// FavoriteGroup - public FavoriteGroup GetFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0) + public FavoriteGroup GetFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId) { VRChat.API.Client.ApiResponse localVarResponse = GetFavoriteGroupWithHttpInfo(favoriteGroupType, favoriteGroupName, userId); return localVarResponse.Data; @@ -1137,29 +1013,22 @@ public FavoriteGroup GetFavoriteGroup(string favoriteGroupType, string favoriteG /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// ApiResponse of FavoriteGroup - public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId) { // verify the required parameter 'favoriteGroupType' is set if (favoriteGroupType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupType' when calling FavoritesApi->GetFavoriteGroup"); - } // verify the required parameter 'favoriteGroupName' is set if (favoriteGroupName == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupName' when calling FavoritesApi->GetFavoriteGroup"); - } // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FavoritesApi->GetFavoriteGroup"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1172,24 +1041,15 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("favoriteGroupType", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupType)); // path parameter localVarRequestOptions.PathParameters.Add("favoriteGroupName", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupName)); // path parameter localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FavoritesApi.GetFavoriteGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1205,13 +1065,11 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo // make the HTTP request var localVarResponse = this.Client.Get("/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavoriteGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1222,14 +1080,13 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of FavoriteGroup - public async System.Threading.Tasks.Task GetFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetFavoriteGroupWithHttpInfoAsync(favoriteGroupType, favoriteGroupName, userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetFavoriteGroupWithHttpInfoAsync(favoriteGroupType, favoriteGroupName, userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1238,30 +1095,23 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// - /// Index associated with the operation. + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FavoriteGroup) - public async System.Threading.Tasks.Task> GetFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'favoriteGroupType' is set if (favoriteGroupType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupType' when calling FavoritesApi->GetFavoriteGroup"); - } // verify the required parameter 'favoriteGroupName' is set if (favoriteGroupName == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupName' when calling FavoritesApi->GetFavoriteGroup"); - } // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FavoritesApi->GetFavoriteGroup"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1274,25 +1124,17 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("favoriteGroupType", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupType)); // path parameter localVarRequestOptions.PathParameters.Add("favoriteGroupName", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupName)); // path parameter localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FavoritesApi.GetFavoriteGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1307,15 +1149,13 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavoriteGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1328,9 +1168,8 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) /// The owner of whoms favorite groups to return. Must be a UserID. (optional) - /// Index associated with the operation. /// List<FavoriteGroup> - public List GetFavoriteGroups(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), int operationIndex = 0) + public List GetFavoriteGroups(int? n = default(int?), int? offset = default(int?), string ownerId = default(string)) { VRChat.API.Client.ApiResponse> localVarResponse = GetFavoriteGroupsWithHttpInfo(n, offset, ownerId); return localVarResponse.Data; @@ -1343,9 +1182,8 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) /// The owner of whoms favorite groups to return. Must be a UserID. (optional) - /// Index associated with the operation. /// ApiResponse of List<FavoriteGroup> - public VRChat.API.Client.ApiResponse> GetFavoriteGroupsWithHttpInfo(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetFavoriteGroupsWithHttpInfo(int? n = default(int?), int? offset = default(int?), string ownerId = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1358,16 +1196,10 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (n != null) { @@ -1382,9 +1214,6 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "ownerId", ownerId)); } - localVarRequestOptions.Operation = "FavoritesApi.GetFavoriteGroups"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1400,13 +1229,11 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo // make the HTTP request var localVarResponse = this.Client.Get>("/favorite/groups", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavoriteGroups", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1419,12 +1246,11 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) /// The owner of whoms favorite groups to return. Must be a UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<FavoriteGroup> - public async System.Threading.Tasks.Task> GetFavoriteGroupsAsync(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFavoriteGroupsAsync(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetFavoriteGroupsWithHttpInfoAsync(n, offset, ownerId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetFavoriteGroupsWithHttpInfoAsync(n, offset, ownerId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1435,10 +1261,9 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) /// The owner of whoms favorite groups to return. Must be a UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<FavoriteGroup>) - public async System.Threading.Tasks.Task>> GetFavoriteGroupsWithHttpInfoAsync(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetFavoriteGroupsWithHttpInfoAsync(int? n = default(int?), int? offset = default(int?), string ownerId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1451,17 +1276,12 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (n != null) { @@ -1476,9 +1296,6 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "ownerId", ownerId)); } - localVarRequestOptions.Operation = "FavoritesApi.GetFavoriteGroups"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1493,15 +1310,13 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/favorite/groups", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavoriteGroups", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1515,9 +1330,8 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo /// A zero-based offset from the default object sorting from where search results start. (optional) /// The type of favorites to return, FavoriteType. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// List<Favorite> - public List GetFavorites(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), int operationIndex = 0) + public List GetFavorites(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string)) { VRChat.API.Client.ApiResponse> localVarResponse = GetFavoritesWithHttpInfo(n, offset, type, tag); return localVarResponse.Data; @@ -1531,9 +1345,8 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo /// A zero-based offset from the default object sorting from where search results start. (optional) /// The type of favorites to return, FavoriteType. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// ApiResponse of List<Favorite> - public VRChat.API.Client.ApiResponse> GetFavoritesWithHttpInfo(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetFavoritesWithHttpInfo(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1546,16 +1359,10 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (n != null) { @@ -1574,9 +1381,6 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "tag", tag)); } - localVarRequestOptions.Operation = "FavoritesApi.GetFavorites"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1592,13 +1396,11 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo // make the HTTP request var localVarResponse = this.Client.Get>("/favorites", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavorites", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1612,12 +1414,11 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo /// A zero-based offset from the default object sorting from where search results start. (optional) /// The type of favorites to return, FavoriteType. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Favorite> - public async System.Threading.Tasks.Task> GetFavoritesAsync(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFavoritesAsync(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetFavoritesWithHttpInfoAsync(n, offset, type, tag, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetFavoritesWithHttpInfoAsync(n, offset, type, tag, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1629,10 +1430,9 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo /// A zero-based offset from the default object sorting from where search results start. (optional) /// The type of favorites to return, FavoriteType. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Favorite>) - public async System.Threading.Tasks.Task>> GetFavoritesWithHttpInfoAsync(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetFavoritesWithHttpInfoAsync(int? n = default(int?), int? offset = default(int?), string type = default(string), string tag = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1645,17 +1445,12 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (n != null) { @@ -1674,9 +1469,6 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "tag", tag)); } - localVarRequestOptions.Operation = "FavoritesApi.GetFavorites"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1691,15 +1483,13 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/favorites", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavorites", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1709,10 +1499,9 @@ public VRChat.API.Client.ApiResponse GetFavoriteGroupWithHttpInfo /// Remove Favorite Remove a favorite from your favorites list. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Success - public Success RemoveFavorite(string favoriteId, int operationIndex = 0) + public Success RemoveFavorite(string favoriteId) { VRChat.API.Client.ApiResponse localVarResponse = RemoveFavoriteWithHttpInfo(favoriteId); return localVarResponse.Data; @@ -1722,16 +1511,13 @@ public Success RemoveFavorite(string favoriteId, int operationIndex = 0) /// Remove Favorite Remove a favorite from your favorites list. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string favoriteId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string favoriteId) { // verify the required parameter 'favoriteId' is set if (favoriteId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteId' when calling FavoritesApi->RemoveFavorite"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1744,22 +1530,13 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("favoriteId", VRChat.API.Client.ClientUtils.ParameterToString(favoriteId)); // path parameter - localVarRequestOptions.Operation = "FavoritesApi.RemoveFavorite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1775,13 +1552,11 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string // make the HTTP request var localVarResponse = this.Client.Delete("/favorites/{favoriteId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("RemoveFavorite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1791,13 +1566,12 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string /// Remove Favorite Remove a favorite from your favorites list. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task RemoveFavoriteAsync(string favoriteId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task RemoveFavoriteAsync(string favoriteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await RemoveFavoriteWithHttpInfoAsync(favoriteId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await RemoveFavoriteWithHttpInfoAsync(favoriteId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1805,17 +1579,14 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string /// Remove Favorite Remove a favorite from your favorites list. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid favorite ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> RemoveFavoriteWithHttpInfoAsync(string favoriteId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> RemoveFavoriteWithHttpInfoAsync(string favoriteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'favoriteId' is set if (favoriteId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteId' when calling FavoritesApi->RemoveFavorite"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1828,23 +1599,15 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("favoriteId", VRChat.API.Client.ClientUtils.ParameterToString(favoriteId)); // path parameter - localVarRequestOptions.Operation = "FavoritesApi.RemoveFavorite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1859,15 +1622,13 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/favorites/{favoriteId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("RemoveFavorite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1878,12 +1639,11 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// - public void UpdateFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), int operationIndex = 0) + public void UpdateFavoriteGroup(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest)) { UpdateFavoriteGroupWithHttpInfo(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest); } @@ -1893,30 +1653,23 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// ApiResponse of Object(void) - public VRChat.API.Client.ApiResponse UpdateFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse UpdateFavoriteGroupWithHttpInfo(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest)) { // verify the required parameter 'favoriteGroupType' is set if (favoriteGroupType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupType' when calling FavoritesApi->UpdateFavoriteGroup"); - } // verify the required parameter 'favoriteGroupName' is set if (favoriteGroupName == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupName' when calling FavoritesApi->UpdateFavoriteGroup"); - } // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FavoritesApi->UpdateFavoriteGroup"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1929,25 +1682,16 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("favoriteGroupType", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupType)); // path parameter localVarRequestOptions.PathParameters.Add("favoriteGroupName", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupName)); // path parameter localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.Data = updateFavoriteGroupRequest; - localVarRequestOptions.Operation = "FavoritesApi.UpdateFavoriteGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1963,13 +1707,11 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string // make the HTTP request var localVarResponse = this.Client.Put("/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateFavoriteGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1980,15 +1722,14 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdateFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateFavoriteGroupAsync(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdateFavoriteGroupWithHttpInfoAsync(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest, operationIndex, cancellationToken).ConfigureAwait(false); + await UpdateFavoriteGroupWithHttpInfoAsync(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest, cancellationToken).ConfigureAwait(false); } /// @@ -1996,31 +1737,24 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string /// /// Thrown when fails to make API call /// The type of group to fetch, must be a valid FavoriteType. - /// - /// + /// The name of the group to fetch, must be a name of a FavoriteGroup. + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateFavoriteGroupWithHttpInfoAsync(string favoriteGroupType, string favoriteGroupName, string userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest = default(UpdateFavoriteGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'favoriteGroupType' is set if (favoriteGroupType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupType' when calling FavoritesApi->UpdateFavoriteGroup"); - } // verify the required parameter 'favoriteGroupName' is set if (favoriteGroupName == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'favoriteGroupName' when calling FavoritesApi->UpdateFavoriteGroup"); - } // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FavoritesApi->UpdateFavoriteGroup"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2033,26 +1767,18 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string string[] _accepts = new string[] { }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("favoriteGroupType", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupType)); // path parameter localVarRequestOptions.PathParameters.Add("favoriteGroupName", VRChat.API.Client.ClientUtils.ParameterToString(favoriteGroupName)); // path parameter localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.Data = updateFavoriteGroupRequest; - localVarRequestOptions.Operation = "FavoritesApi.UpdateFavoriteGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2067,15 +1793,13 @@ public VRChat.API.Client.ApiResponse RemoveFavoriteWithHttpInfo(string } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateFavoriteGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/FilesApi.cs b/src/VRChat.API/Api/FilesApi.cs index e2a9c0d2..74af9cee 100644 --- a/src/VRChat.API/Api/FilesApi.cs +++ b/src/VRChat.API/Api/FilesApi.cs @@ -34,9 +34,8 @@ public interface IFilesApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// File - File CreateFile(CreateFileRequest createFileRequest = default(CreateFileRequest), int operationIndex = 0); + File CreateFile(CreateFileRequest createFileRequest = default(CreateFileRequest)); /// /// Create File @@ -46,9 +45,8 @@ public interface IFilesApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of File - ApiResponse CreateFileWithHttpInfo(CreateFileRequest createFileRequest = default(CreateFileRequest), int operationIndex = 0); + ApiResponse CreateFileWithHttpInfo(CreateFileRequest createFileRequest = default(CreateFileRequest)); /// /// Create File Version /// @@ -56,11 +54,10 @@ public interface IFilesApiSync : IApiAccessor /// Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload. /// /// Thrown when fails to make API call - /// + /// Must be a valid file ID. /// (optional) - /// Index associated with the operation. /// File - File CreateFileVersion(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), int operationIndex = 0); + File CreateFileVersion(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest)); /// /// Create File Version @@ -69,11 +66,10 @@ public interface IFilesApiSync : IApiAccessor /// Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload. /// /// Thrown when fails to make API call - /// + /// Must be a valid file ID. /// (optional) - /// Index associated with the operation. /// ApiResponse of File - ApiResponse CreateFileVersionWithHttpInfo(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), int operationIndex = 0); + ApiResponse CreateFileVersionWithHttpInfo(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest)); /// /// Delete File /// @@ -81,10 +77,9 @@ public interface IFilesApiSync : IApiAccessor /// Deletes a File object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// Success - Success DeleteFile(string fileId, int operationIndex = 0); + Success DeleteFile(string fileId); /// /// Delete File @@ -93,10 +88,9 @@ public interface IFilesApiSync : IApiAccessor /// Deletes a File object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// ApiResponse of Success - ApiResponse DeleteFileWithHttpInfo(string fileId, int operationIndex = 0); + ApiResponse DeleteFileWithHttpInfo(string fileId); /// /// Delete File Version /// @@ -104,11 +98,10 @@ public interface IFilesApiSync : IApiAccessor /// Delete a specific version of a file. You can only delete the latest version. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// File - File DeleteFileVersion(string fileId, int versionId, int operationIndex = 0); + File DeleteFileVersion(string fileId, int versionId); /// /// Delete File Version @@ -117,11 +110,10 @@ public interface IFilesApiSync : IApiAccessor /// Delete a specific version of a file. You can only delete the latest version. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// ApiResponse of File - ApiResponse DeleteFileVersionWithHttpInfo(string fileId, int versionId, int operationIndex = 0); + ApiResponse DeleteFileVersionWithHttpInfo(string fileId, int versionId); /// /// Download File Version /// @@ -129,11 +121,10 @@ public interface IFilesApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// - void DownloadFileVersion(string fileId, int versionId, int operationIndex = 0); + void DownloadFileVersion(string fileId, int versionId); /// /// Download File Version @@ -142,11 +133,10 @@ public interface IFilesApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// ApiResponse of Object(void) - ApiResponse DownloadFileVersionWithHttpInfo(string fileId, int versionId, int operationIndex = 0); + ApiResponse DownloadFileVersionWithHttpInfo(string fileId, int versionId); /// /// Finish FileData Upload /// @@ -154,13 +144,12 @@ public interface IFilesApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// 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) - /// Index associated with the operation. /// File - File FinishFileDataUpload(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), int operationIndex = 0); + File FinishFileDataUpload(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest)); /// /// Finish FileData Upload @@ -169,13 +158,12 @@ public interface IFilesApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// 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) - /// Index associated with the operation. /// ApiResponse of File - ApiResponse FinishFileDataUploadWithHttpInfo(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), int operationIndex = 0); + ApiResponse FinishFileDataUploadWithHttpInfo(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest)); /// /// Show File /// @@ -183,10 +171,9 @@ public interface IFilesApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// File - File GetFile(string fileId, int operationIndex = 0); + File GetFile(string fileId); /// /// Show File @@ -195,10 +182,9 @@ public interface IFilesApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// ApiResponse of File - ApiResponse GetFileWithHttpInfo(string fileId, int operationIndex = 0); + ApiResponse GetFileWithHttpInfo(string fileId); /// /// Check FileData Upload Status /// @@ -206,12 +192,11 @@ public interface IFilesApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// FileVersionUploadStatus - FileVersionUploadStatus GetFileDataUploadStatus(string fileId, int versionId, string fileType, int operationIndex = 0); + FileVersionUploadStatus GetFileDataUploadStatus(string fileId, int versionId, string fileType); /// /// Check FileData Upload Status @@ -220,12 +205,11 @@ public interface IFilesApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// ApiResponse of FileVersionUploadStatus - ApiResponse GetFileDataUploadStatusWithHttpInfo(string fileId, int versionId, string fileType, int operationIndex = 0); + ApiResponse GetFileDataUploadStatusWithHttpInfo(string fileId, int versionId, string fileType); /// /// List Files /// @@ -237,9 +221,8 @@ public interface IFilesApiSync : IApiAccessor /// UserID, will always generate a 500 permission error. (optional) (deprecated) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// List<File> - List GetFiles(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0); + List GetFiles(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?)); /// /// List Files @@ -252,9 +235,8 @@ public interface IFilesApiSync : IApiAccessor /// UserID, will always generate a 500 permission error. (optional) (deprecated) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// ApiResponse of List<File> - ApiResponse> GetFilesWithHttpInfo(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0); + ApiResponse> GetFilesWithHttpInfo(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?)); /// /// Start FileData Upload /// @@ -262,13 +244,12 @@ public interface IFilesApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. + /// The part number to start uploading. If not provided, the first part will be started. (optional) (deprecated) /// FileUploadURL - FileUploadURL StartFileDataUpload(string fileId, int versionId, string fileType, int? partNumber = default(int?), int operationIndex = 0); + FileUploadURL StartFileDataUpload(string fileId, int versionId, string fileType, int? partNumber = default(int?)); /// /// Start FileData Upload @@ -277,13 +258,12 @@ public interface IFilesApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. + /// The part number to start uploading. If not provided, the first part will be started. (optional) (deprecated) /// ApiResponse of FileUploadURL - ApiResponse StartFileDataUploadWithHttpInfo(string fileId, int versionId, string fileType, int? partNumber = default(int?), int operationIndex = 0); + ApiResponse StartFileDataUploadWithHttpInfo(string fileId, int versionId, string fileType, int? partNumber = default(int?)); #endregion Synchronous Operations } @@ -301,10 +281,9 @@ public interface IFilesApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of File - System.Threading.Tasks.Task CreateFileAsync(CreateFileRequest createFileRequest = default(CreateFileRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateFileAsync(CreateFileRequest createFileRequest = default(CreateFileRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create File @@ -314,10 +293,9 @@ public interface IFilesApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (File) - System.Threading.Tasks.Task> CreateFileWithHttpInfoAsync(CreateFileRequest createFileRequest = default(CreateFileRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateFileWithHttpInfoAsync(CreateFileRequest createFileRequest = default(CreateFileRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create File Version /// @@ -325,12 +303,11 @@ public interface IFilesApiAsync : IApiAccessor /// Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload. /// /// Thrown when fails to make API call - /// + /// Must be a valid file ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of File - System.Threading.Tasks.Task CreateFileVersionAsync(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateFileVersionAsync(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create File Version @@ -339,12 +316,11 @@ public interface IFilesApiAsync : IApiAccessor /// Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload. /// /// Thrown when fails to make API call - /// + /// Must be a valid file ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (File) - System.Threading.Tasks.Task> CreateFileVersionWithHttpInfoAsync(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateFileVersionWithHttpInfoAsync(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete File /// @@ -352,11 +328,10 @@ public interface IFilesApiAsync : IApiAccessor /// Deletes a File object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task DeleteFileAsync(string fileId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteFileAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete File @@ -365,11 +340,10 @@ public interface IFilesApiAsync : IApiAccessor /// Deletes a File object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> DeleteFileWithHttpInfoAsync(string fileId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteFileWithHttpInfoAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete File Version /// @@ -377,12 +351,11 @@ public interface IFilesApiAsync : IApiAccessor /// Delete a specific version of a file. You can only delete the latest version. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// Cancellation Token to cancel the request. /// Task of File - System.Threading.Tasks.Task DeleteFileVersionAsync(string fileId, int versionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteFileVersionAsync(string fileId, int versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete File Version @@ -391,12 +364,11 @@ public interface IFilesApiAsync : IApiAccessor /// Delete a specific version of a file. You can only delete the latest version. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// Cancellation Token to cancel the request. /// Task of ApiResponse (File) - System.Threading.Tasks.Task> DeleteFileVersionWithHttpInfoAsync(string fileId, int versionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteFileVersionWithHttpInfoAsync(string fileId, int versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Download File Version /// @@ -404,12 +376,11 @@ public interface IFilesApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DownloadFileVersionAsync(string fileId, int versionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DownloadFileVersionAsync(string fileId, int versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Download File Version @@ -418,12 +389,11 @@ public interface IFilesApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DownloadFileVersionWithHttpInfoAsync(string fileId, int versionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DownloadFileVersionWithHttpInfoAsync(string fileId, int versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finish FileData Upload /// @@ -431,14 +401,13 @@ public interface IFilesApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// 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) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of File - System.Threading.Tasks.Task FinishFileDataUploadAsync(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FinishFileDataUploadAsync(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finish FileData Upload @@ -447,14 +416,13 @@ public interface IFilesApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// 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) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (File) - System.Threading.Tasks.Task> FinishFileDataUploadWithHttpInfoAsync(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FinishFileDataUploadWithHttpInfoAsync(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Show File /// @@ -462,11 +430,10 @@ public interface IFilesApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// Cancellation Token to cancel the request. /// Task of File - System.Threading.Tasks.Task GetFileAsync(string fileId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetFileAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Show File @@ -475,11 +442,10 @@ public interface IFilesApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (File) - System.Threading.Tasks.Task> GetFileWithHttpInfoAsync(string fileId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFileWithHttpInfoAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check FileData Upload Status /// @@ -487,13 +453,12 @@ public interface IFilesApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// Cancellation Token to cancel the request. /// Task of FileVersionUploadStatus - System.Threading.Tasks.Task GetFileDataUploadStatusAsync(string fileId, int versionId, string fileType, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetFileDataUploadStatusAsync(string fileId, int versionId, string fileType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check FileData Upload Status @@ -502,13 +467,12 @@ public interface IFilesApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileVersionUploadStatus) - System.Threading.Tasks.Task> GetFileDataUploadStatusWithHttpInfoAsync(string fileId, int versionId, string fileType, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFileDataUploadStatusWithHttpInfoAsync(string fileId, int versionId, string fileType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Files /// @@ -520,10 +484,9 @@ public interface IFilesApiAsync : IApiAccessor /// UserID, will always generate a 500 permission error. (optional) (deprecated) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<File> - System.Threading.Tasks.Task> GetFilesAsync(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFilesAsync(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Files @@ -536,10 +499,9 @@ public interface IFilesApiAsync : IApiAccessor /// UserID, will always generate a 500 permission error. (optional) (deprecated) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<File>) - System.Threading.Tasks.Task>> GetFilesWithHttpInfoAsync(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetFilesWithHttpInfoAsync(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Start FileData Upload /// @@ -547,14 +509,13 @@ public interface IFilesApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. + /// The part number to start uploading. If not provided, the first part will be started. (optional) (deprecated) /// Cancellation Token to cancel the request. /// Task of FileUploadURL - System.Threading.Tasks.Task StartFileDataUploadAsync(string fileId, int versionId, string fileType, int? partNumber = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task StartFileDataUploadAsync(string fileId, int versionId, string fileType, int? partNumber = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Start FileData Upload @@ -563,14 +524,13 @@ public interface IFilesApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. + /// The part number to start uploading. If not provided, the first part will be started. (optional) (deprecated) /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileUploadURL) - System.Threading.Tasks.Task> StartFileDataUploadWithHttpInfoAsync(string fileId, int versionId, string fileType, int? partNumber = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> StartFileDataUploadWithHttpInfoAsync(string fileId, int versionId, string fileType, int? partNumber = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -696,9 +656,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// File - public File CreateFile(CreateFileRequest createFileRequest = default(CreateFileRequest), int operationIndex = 0) + public File CreateFile(CreateFileRequest createFileRequest = default(CreateFileRequest)) { VRChat.API.Client.ApiResponse localVarResponse = CreateFileWithHttpInfo(createFileRequest); return localVarResponse.Data; @@ -709,9 +668,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of File - public VRChat.API.Client.ApiResponse CreateFileWithHttpInfo(CreateFileRequest createFileRequest = default(CreateFileRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse CreateFileWithHttpInfo(CreateFileRequest createFileRequest = default(CreateFileRequest)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -725,22 +683,13 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = createFileRequest; - localVarRequestOptions.Operation = "FilesApi.CreateFile"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -756,13 +705,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory // make the HTTP request var localVarResponse = this.Client.Post("/file", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateFile", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -773,12 +720,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of File - public async System.Threading.Tasks.Task CreateFileAsync(CreateFileRequest createFileRequest = default(CreateFileRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateFileAsync(CreateFileRequest createFileRequest = default(CreateFileRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await CreateFileWithHttpInfoAsync(createFileRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await CreateFileWithHttpInfoAsync(createFileRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -787,10 +733,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (File) - public async System.Threading.Tasks.Task> CreateFileWithHttpInfoAsync(CreateFileRequest createFileRequest = default(CreateFileRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateFileWithHttpInfoAsync(CreateFileRequest createFileRequest = default(CreateFileRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -804,23 +749,15 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = createFileRequest; - localVarRequestOptions.Operation = "FilesApi.CreateFile"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -835,15 +772,13 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/file", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateFile", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -853,11 +788,10 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// 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. /// /// Thrown when fails to make API call - /// + /// Must be a valid file ID. /// (optional) - /// Index associated with the operation. /// File - public File CreateFileVersion(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), int operationIndex = 0) + public File CreateFileVersion(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest)) { VRChat.API.Client.ApiResponse localVarResponse = CreateFileVersionWithHttpInfo(fileId, createFileVersionRequest); return localVarResponse.Data; @@ -867,17 +801,14 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// 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. /// /// Thrown when fails to make API call - /// + /// Must be a valid file ID. /// (optional) - /// Index associated with the operation. /// ApiResponse of File - public VRChat.API.Client.ApiResponse CreateFileVersionWithHttpInfo(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse CreateFileVersionWithHttpInfo(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest)) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->CreateFileVersion"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -891,23 +822,14 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.Data = createFileVersionRequest; - localVarRequestOptions.Operation = "FilesApi.CreateFileVersion"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -923,13 +845,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory // make the HTTP request var localVarResponse = this.Client.Post("/file/{fileId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateFileVersion", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -939,14 +859,13 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// 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. /// /// Thrown when fails to make API call - /// + /// Must be a valid file ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of File - public async System.Threading.Tasks.Task CreateFileVersionAsync(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateFileVersionAsync(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await CreateFileVersionWithHttpInfoAsync(fileId, createFileVersionRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await CreateFileVersionWithHttpInfoAsync(fileId, createFileVersionRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -954,18 +873,15 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// 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. /// /// Thrown when fails to make API call - /// + /// Must be a valid file ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (File) - public async System.Threading.Tasks.Task> CreateFileVersionWithHttpInfoAsync(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateFileVersionWithHttpInfoAsync(string fileId, CreateFileVersionRequest createFileVersionRequest = default(CreateFileVersionRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->CreateFileVersion"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -979,24 +895,16 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.Data = createFileVersionRequest; - localVarRequestOptions.Operation = "FilesApi.CreateFileVersion"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1011,15 +919,13 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/file/{fileId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateFileVersion", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1029,10 +935,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Delete File Deletes a File object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// Success - public Success DeleteFile(string fileId, int operationIndex = 0) + public Success DeleteFile(string fileId) { VRChat.API.Client.ApiResponse localVarResponse = DeleteFileWithHttpInfo(fileId); return localVarResponse.Data; @@ -1042,16 +947,13 @@ public Success DeleteFile(string fileId, int operationIndex = 0) /// Delete File Deletes a File object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse DeleteFileWithHttpInfo(string fileId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse DeleteFileWithHttpInfo(string fileId) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->DeleteFile"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1064,22 +966,13 @@ public VRChat.API.Client.ApiResponse DeleteFileWithHttpInfo(string file }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter - localVarRequestOptions.Operation = "FilesApi.DeleteFile"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1095,13 +988,11 @@ public VRChat.API.Client.ApiResponse DeleteFileWithHttpInfo(string file // make the HTTP request var localVarResponse = this.Client.Delete("/file/{fileId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteFile", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1111,13 +1002,12 @@ public VRChat.API.Client.ApiResponse DeleteFileWithHttpInfo(string file /// Delete File Deletes a File object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task DeleteFileAsync(string fileId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteFileAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await DeleteFileWithHttpInfoAsync(fileId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await DeleteFileWithHttpInfoAsync(fileId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1125,17 +1015,14 @@ public VRChat.API.Client.ApiResponse DeleteFileWithHttpInfo(string file /// Delete File Deletes a File object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> DeleteFileWithHttpInfoAsync(string fileId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteFileWithHttpInfoAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->DeleteFile"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1148,23 +1035,15 @@ public VRChat.API.Client.ApiResponse DeleteFileWithHttpInfo(string file "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter - localVarRequestOptions.Operation = "FilesApi.DeleteFile"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1179,15 +1058,13 @@ public VRChat.API.Client.ApiResponse DeleteFileWithHttpInfo(string file } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/file/{fileId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteFile", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1197,11 +1074,10 @@ public VRChat.API.Client.ApiResponse DeleteFileWithHttpInfo(string file /// Delete File Version Delete a specific version of a file. You can only delete the latest version. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// File - public File DeleteFileVersion(string fileId, int versionId, int operationIndex = 0) + public File DeleteFileVersion(string fileId, int versionId) { VRChat.API.Client.ApiResponse localVarResponse = DeleteFileVersionWithHttpInfo(fileId, versionId); return localVarResponse.Data; @@ -1211,17 +1087,14 @@ public File DeleteFileVersion(string fileId, int versionId, int operationIndex = /// Delete File Version Delete a specific version of a file. You can only delete the latest version. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// ApiResponse of File - public VRChat.API.Client.ApiResponse DeleteFileVersionWithHttpInfo(string fileId, int versionId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse DeleteFileVersionWithHttpInfo(string fileId, int versionId) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->DeleteFileVersion"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1234,23 +1107,14 @@ public VRChat.API.Client.ApiResponse DeleteFileVersionWithHttpInfo(string }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.PathParameters.Add("versionId", VRChat.API.Client.ClientUtils.ParameterToString(versionId)); // path parameter - localVarRequestOptions.Operation = "FilesApi.DeleteFileVersion"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1266,13 +1130,11 @@ public VRChat.API.Client.ApiResponse DeleteFileVersionWithHttpInfo(string // make the HTTP request var localVarResponse = this.Client.Delete("/file/{fileId}/{versionId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteFileVersion", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1282,14 +1144,13 @@ public VRChat.API.Client.ApiResponse DeleteFileVersionWithHttpInfo(string /// Delete File Version Delete a specific version of a file. You can only delete the latest version. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// Cancellation Token to cancel the request. /// Task of File - public async System.Threading.Tasks.Task DeleteFileVersionAsync(string fileId, int versionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteFileVersionAsync(string fileId, int versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await DeleteFileVersionWithHttpInfoAsync(fileId, versionId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await DeleteFileVersionWithHttpInfoAsync(fileId, versionId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1297,18 +1158,15 @@ public VRChat.API.Client.ApiResponse DeleteFileVersionWithHttpInfo(string /// Delete File Version Delete a specific version of a file. You can only delete the latest version. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// Cancellation Token to cancel the request. /// Task of ApiResponse (File) - public async System.Threading.Tasks.Task> DeleteFileVersionWithHttpInfoAsync(string fileId, int versionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteFileVersionWithHttpInfoAsync(string fileId, int versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->DeleteFileVersion"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1321,24 +1179,16 @@ public VRChat.API.Client.ApiResponse DeleteFileVersionWithHttpInfo(string "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.PathParameters.Add("versionId", VRChat.API.Client.ClientUtils.ParameterToString(versionId)); // path parameter - localVarRequestOptions.Operation = "FilesApi.DeleteFileVersion"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1353,15 +1203,13 @@ public VRChat.API.Client.ApiResponse DeleteFileVersionWithHttpInfo(string } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/file/{fileId}/{versionId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteFileVersion", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1371,11 +1219,10 @@ public VRChat.API.Client.ApiResponse DeleteFileVersionWithHttpInfo(string /// 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. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// - public void DownloadFileVersion(string fileId, int versionId, int operationIndex = 0) + public void DownloadFileVersion(string fileId, int versionId) { DownloadFileVersionWithHttpInfo(fileId, versionId); } @@ -1384,17 +1231,14 @@ public void DownloadFileVersion(string fileId, int versionId, int operationIndex /// 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. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// ApiResponse of Object(void) - public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(string fileId, int versionId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(string fileId, int versionId) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->DownloadFileVersion"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1406,23 +1250,14 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.PathParameters.Add("versionId", VRChat.API.Client.ClientUtils.ParameterToString(versionId)); // path parameter - localVarRequestOptions.Operation = "FilesApi.DownloadFileVersion"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1438,13 +1273,11 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str // make the HTTP request var localVarResponse = this.Client.Get("/file/{fileId}/{versionId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DownloadFileVersion", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1454,32 +1287,28 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str /// 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. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DownloadFileVersionAsync(string fileId, int versionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DownloadFileVersionAsync(string fileId, int versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DownloadFileVersionWithHttpInfoAsync(fileId, versionId, operationIndex, cancellationToken).ConfigureAwait(false); + await DownloadFileVersionWithHttpInfoAsync(fileId, versionId, cancellationToken).ConfigureAwait(false); } /// /// 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. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DownloadFileVersionWithHttpInfoAsync(string fileId, int versionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DownloadFileVersionWithHttpInfoAsync(string fileId, int versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->DownloadFileVersion"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1491,24 +1320,16 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str string[] _accepts = new string[] { }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.PathParameters.Add("versionId", VRChat.API.Client.ClientUtils.ParameterToString(versionId)); // path parameter - localVarRequestOptions.Operation = "FilesApi.DownloadFileVersion"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1523,15 +1344,13 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/file/{fileId}/{versionId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DownloadFileVersion", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1541,13 +1360,12 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str /// 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. /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// 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) - /// Index associated with the operation. /// File - public File FinishFileDataUpload(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), int operationIndex = 0) + public File FinishFileDataUpload(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest)) { VRChat.API.Client.ApiResponse localVarResponse = FinishFileDataUploadWithHttpInfo(fileId, versionId, fileType, finishFileDataUploadRequest); return localVarResponse.Data; @@ -1557,25 +1375,20 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str /// 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. /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// 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) - /// Index associated with the operation. /// ApiResponse of File - public VRChat.API.Client.ApiResponse FinishFileDataUploadWithHttpInfo(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse FinishFileDataUploadWithHttpInfo(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest)) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->FinishFileDataUpload"); - } // verify the required parameter 'fileType' is set if (fileType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileType' when calling FilesApi->FinishFileDataUpload"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1589,25 +1402,16 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.PathParameters.Add("versionId", VRChat.API.Client.ClientUtils.ParameterToString(versionId)); // path parameter localVarRequestOptions.PathParameters.Add("fileType", VRChat.API.Client.ClientUtils.ParameterToString(fileType)); // path parameter localVarRequestOptions.Data = finishFileDataUploadRequest; - localVarRequestOptions.Operation = "FilesApi.FinishFileDataUpload"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1623,13 +1427,11 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str // make the HTTP request var localVarResponse = this.Client.Put("/file/{fileId}/{versionId}/{fileType}/finish", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("FinishFileDataUpload", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1639,16 +1441,15 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str /// 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. /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// 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) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of File - public async System.Threading.Tasks.Task FinishFileDataUploadAsync(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FinishFileDataUploadAsync(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await FinishFileDataUploadWithHttpInfoAsync(fileId, versionId, fileType, finishFileDataUploadRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await FinishFileDataUploadWithHttpInfoAsync(fileId, versionId, fileType, finishFileDataUploadRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1656,26 +1457,21 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str /// 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. /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// 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) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (File) - public async System.Threading.Tasks.Task> FinishFileDataUploadWithHttpInfoAsync(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FinishFileDataUploadWithHttpInfoAsync(string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = default(FinishFileDataUploadRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->FinishFileDataUpload"); - } // verify the required parameter 'fileType' is set if (fileType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileType' when calling FilesApi->FinishFileDataUpload"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1689,26 +1485,18 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.PathParameters.Add("versionId", VRChat.API.Client.ClientUtils.ParameterToString(versionId)); // path parameter localVarRequestOptions.PathParameters.Add("fileType", VRChat.API.Client.ClientUtils.ParameterToString(fileType)); // path parameter localVarRequestOptions.Data = finishFileDataUploadRequest; - localVarRequestOptions.Operation = "FilesApi.FinishFileDataUpload"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1723,15 +1511,13 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/file/{fileId}/{versionId}/{fileType}/finish", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("FinishFileDataUpload", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1741,10 +1527,9 @@ public VRChat.API.Client.ApiResponse DownloadFileVersionWithHttpInfo(str /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// File - public File GetFile(string fileId, int operationIndex = 0) + public File GetFile(string fileId) { VRChat.API.Client.ApiResponse localVarResponse = GetFileWithHttpInfo(fileId); return localVarResponse.Data; @@ -1754,16 +1539,13 @@ public File GetFile(string fileId, int operationIndex = 0) /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// ApiResponse of File - public VRChat.API.Client.ApiResponse GetFileWithHttpInfo(string fileId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetFileWithHttpInfo(string fileId) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->GetFile"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1776,22 +1558,13 @@ public VRChat.API.Client.ApiResponse GetFileWithHttpInfo(string fileId, in }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter - localVarRequestOptions.Operation = "FilesApi.GetFile"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1807,13 +1580,11 @@ public VRChat.API.Client.ApiResponse GetFileWithHttpInfo(string fileId, in // make the HTTP request var localVarResponse = this.Client.Get("/file/{fileId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFile", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1823,13 +1594,12 @@ public VRChat.API.Client.ApiResponse GetFileWithHttpInfo(string fileId, in /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// Cancellation Token to cancel the request. /// Task of File - public async System.Threading.Tasks.Task GetFileAsync(string fileId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetFileAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetFileWithHttpInfoAsync(fileId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetFileWithHttpInfoAsync(fileId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1837,17 +1607,14 @@ public VRChat.API.Client.ApiResponse GetFileWithHttpInfo(string fileId, in /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid file ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (File) - public async System.Threading.Tasks.Task> GetFileWithHttpInfoAsync(string fileId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFileWithHttpInfoAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->GetFile"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1860,23 +1627,15 @@ public VRChat.API.Client.ApiResponse GetFileWithHttpInfo(string fileId, in "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter - localVarRequestOptions.Operation = "FilesApi.GetFile"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1891,15 +1650,13 @@ public VRChat.API.Client.ApiResponse GetFileWithHttpInfo(string fileId, in } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/file/{fileId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFile", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1909,12 +1666,11 @@ public VRChat.API.Client.ApiResponse GetFileWithHttpInfo(string fileId, in /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// FileVersionUploadStatus - public FileVersionUploadStatus GetFileDataUploadStatus(string fileId, int versionId, string fileType, int operationIndex = 0) + public FileVersionUploadStatus GetFileDataUploadStatus(string fileId, int versionId, string fileType) { VRChat.API.Client.ApiResponse localVarResponse = GetFileDataUploadStatusWithHttpInfo(fileId, versionId, fileType); return localVarResponse.Data; @@ -1924,24 +1680,19 @@ public FileVersionUploadStatus GetFileDataUploadStatus(string fileId, int versio /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// ApiResponse of FileVersionUploadStatus - public VRChat.API.Client.ApiResponse GetFileDataUploadStatusWithHttpInfo(string fileId, int versionId, string fileType, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetFileDataUploadStatusWithHttpInfo(string fileId, int versionId, string fileType) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->GetFileDataUploadStatus"); - } // verify the required parameter 'fileType' is set if (fileType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileType' when calling FilesApi->GetFileDataUploadStatus"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1954,24 +1705,15 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.PathParameters.Add("versionId", VRChat.API.Client.ClientUtils.ParameterToString(versionId)); // path parameter localVarRequestOptions.PathParameters.Add("fileType", VRChat.API.Client.ClientUtils.ParameterToString(fileType)); // path parameter - localVarRequestOptions.Operation = "FilesApi.GetFileDataUploadStatus"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1987,13 +1729,11 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS // make the HTTP request var localVarResponse = this.Client.Get("/file/{fileId}/{versionId}/{fileType}/status", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFileDataUploadStatus", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2003,15 +1743,14 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// Cancellation Token to cancel the request. /// Task of FileVersionUploadStatus - public async System.Threading.Tasks.Task GetFileDataUploadStatusAsync(string fileId, int versionId, string fileType, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetFileDataUploadStatusAsync(string fileId, int versionId, string fileType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetFileDataUploadStatusWithHttpInfoAsync(fileId, versionId, fileType, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetFileDataUploadStatusWithHttpInfoAsync(fileId, versionId, fileType, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2019,25 +1758,20 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileVersionUploadStatus) - public async System.Threading.Tasks.Task> GetFileDataUploadStatusWithHttpInfoAsync(string fileId, int versionId, string fileType, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFileDataUploadStatusWithHttpInfoAsync(string fileId, int versionId, string fileType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->GetFileDataUploadStatus"); - } // verify the required parameter 'fileType' is set if (fileType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileType' when calling FilesApi->GetFileDataUploadStatus"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2050,25 +1784,17 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.PathParameters.Add("versionId", VRChat.API.Client.ClientUtils.ParameterToString(versionId)); // path parameter localVarRequestOptions.PathParameters.Add("fileType", VRChat.API.Client.ClientUtils.ParameterToString(fileType)); // path parameter - localVarRequestOptions.Operation = "FilesApi.GetFileDataUploadStatus"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2083,15 +1809,13 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/file/{fileId}/{versionId}/{fileType}/status", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFileDataUploadStatus", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2105,9 +1829,8 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS /// UserID, will always generate a 500 permission error. (optional) (deprecated) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// List<File> - public List GetFiles(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0) + public List GetFiles(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?)) { VRChat.API.Client.ApiResponse> localVarResponse = GetFilesWithHttpInfo(tag, userId, n, offset); return localVarResponse.Data; @@ -2121,9 +1844,8 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS /// UserID, will always generate a 500 permission error. (optional) (deprecated) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// ApiResponse of List<File> - public VRChat.API.Client.ApiResponse> GetFilesWithHttpInfo(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetFilesWithHttpInfo(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2136,16 +1858,10 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (tag != null) { @@ -2164,9 +1880,6 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); } - localVarRequestOptions.Operation = "FilesApi.GetFiles"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2182,13 +1895,11 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS // make the HTTP request var localVarResponse = this.Client.Get>("/files", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFiles", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2202,12 +1913,11 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS /// UserID, will always generate a 500 permission error. (optional) (deprecated) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<File> - public async System.Threading.Tasks.Task> GetFilesAsync(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFilesAsync(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetFilesWithHttpInfoAsync(tag, userId, n, offset, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetFilesWithHttpInfoAsync(tag, userId, n, offset, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2219,10 +1929,9 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS /// UserID, will always generate a 500 permission error. (optional) (deprecated) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<File>) - public async System.Threading.Tasks.Task>> GetFilesWithHttpInfoAsync(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetFilesWithHttpInfoAsync(string tag = default(string), string userId = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2235,17 +1944,12 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (tag != null) { @@ -2264,9 +1968,6 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); } - localVarRequestOptions.Operation = "FilesApi.GetFiles"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2281,15 +1982,13 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/files", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFiles", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2299,13 +1998,12 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. + /// The part number to start uploading. If not provided, the first part will be started. (optional) (deprecated) /// FileUploadURL - public FileUploadURL StartFileDataUpload(string fileId, int versionId, string fileType, int? partNumber = default(int?), int operationIndex = 0) + public FileUploadURL StartFileDataUpload(string fileId, int versionId, string fileType, int? partNumber = default(int?)) { VRChat.API.Client.ApiResponse localVarResponse = StartFileDataUploadWithHttpInfo(fileId, versionId, fileType, partNumber); return localVarResponse.Data; @@ -2315,25 +2013,20 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. + /// The part number to start uploading. If not provided, the first part will be started. (optional) (deprecated) /// ApiResponse of FileUploadURL - public VRChat.API.Client.ApiResponse StartFileDataUploadWithHttpInfo(string fileId, int versionId, string fileType, int? partNumber = default(int?), int operationIndex = 0) + public VRChat.API.Client.ApiResponse StartFileDataUploadWithHttpInfo(string fileId, int versionId, string fileType, int? partNumber = default(int?)) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->StartFileDataUpload"); - } // verify the required parameter 'fileType' is set if (fileType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileType' when calling FilesApi->StartFileDataUpload"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2346,16 +2039,10 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.PathParameters.Add("versionId", VRChat.API.Client.ClientUtils.ParameterToString(versionId)); // path parameter @@ -2365,9 +2052,6 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "partNumber", partNumber)); } - localVarRequestOptions.Operation = "FilesApi.StartFileDataUpload"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2383,13 +2067,11 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS // make the HTTP request var localVarResponse = this.Client.Put("/file/{fileId}/{versionId}/{fileType}/start", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("StartFileDataUpload", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2399,16 +2081,15 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. + /// The part number to start uploading. If not provided, the first part will be started. (optional) (deprecated) /// Cancellation Token to cancel the request. /// Task of FileUploadURL - public async System.Threading.Tasks.Task StartFileDataUploadAsync(string fileId, int versionId, string fileType, int? partNumber = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task StartFileDataUploadAsync(string fileId, int versionId, string fileType, int? partNumber = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await StartFileDataUploadWithHttpInfoAsync(fileId, versionId, fileType, partNumber, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await StartFileDataUploadWithHttpInfoAsync(fileId, versionId, fileType, partNumber, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2416,26 +2097,21 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// (optional) - /// Index associated with the operation. + /// Must be a valid file ID. + /// Version ID of the asset. + /// Type of file. + /// The part number to start uploading. If not provided, the first part will be started. (optional) (deprecated) /// Cancellation Token to cancel the request. /// Task of ApiResponse (FileUploadURL) - public async System.Threading.Tasks.Task> StartFileDataUploadWithHttpInfoAsync(string fileId, int versionId, string fileType, int? partNumber = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> StartFileDataUploadWithHttpInfoAsync(string fileId, int versionId, string fileType, int? partNumber = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'fileId' is set if (fileId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileId' when calling FilesApi->StartFileDataUpload"); - } // verify the required parameter 'fileType' is set if (fileType == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'fileType' when calling FilesApi->StartFileDataUpload"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2448,17 +2124,12 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("fileId", VRChat.API.Client.ClientUtils.ParameterToString(fileId)); // path parameter localVarRequestOptions.PathParameters.Add("versionId", VRChat.API.Client.ClientUtils.ParameterToString(versionId)); // path parameter @@ -2468,9 +2139,6 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "partNumber", partNumber)); } - localVarRequestOptions.Operation = "FilesApi.StartFileDataUpload"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2485,15 +2153,13 @@ public VRChat.API.Client.ApiResponse GetFileDataUploadS } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/file/{fileId}/{versionId}/{fileType}/start", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("StartFileDataUpload", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/FriendsApi.cs b/src/VRChat.API/Api/FriendsApi.cs index de22c14c..3011e8eb 100644 --- a/src/VRChat.API/Api/FriendsApi.cs +++ b/src/VRChat.API/Api/FriendsApi.cs @@ -33,10 +33,9 @@ public interface IFriendsApiSync : IApiAccessor /// Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Success - Success DeleteFriendRequest(string userId, int operationIndex = 0); + Success DeleteFriendRequest(string userId); /// /// Delete Friend Request @@ -45,10 +44,9 @@ public interface IFriendsApiSync : IApiAccessor /// Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of Success - ApiResponse DeleteFriendRequestWithHttpInfo(string userId, int operationIndex = 0); + ApiResponse DeleteFriendRequestWithHttpInfo(string userId); /// /// Send Friend Request /// @@ -56,10 +54,9 @@ public interface IFriendsApiSync : IApiAccessor /// Send a friend request to another user. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Notification - Notification Friend(string userId, int operationIndex = 0); + Notification Friend(string userId); /// /// Send Friend Request @@ -68,10 +65,9 @@ public interface IFriendsApiSync : IApiAccessor /// Send a friend request to another user. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of Notification - ApiResponse FriendWithHttpInfo(string userId, int operationIndex = 0); + ApiResponse FriendWithHttpInfo(string userId); /// /// Check Friend Status /// @@ -79,10 +75,9 @@ public interface IFriendsApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// FriendStatus - FriendStatus GetFriendStatus(string userId, int operationIndex = 0); + FriendStatus GetFriendStatus(string userId); /// /// Check Friend Status @@ -91,10 +86,9 @@ public interface IFriendsApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of FriendStatus - ApiResponse GetFriendStatusWithHttpInfo(string userId, int operationIndex = 0); + ApiResponse GetFriendStatusWithHttpInfo(string userId); /// /// List Friends /// @@ -105,9 +99,8 @@ public interface IFriendsApiSync : IApiAccessor /// A zero-based offset from the default object sorting from where search results start. (optional) /// The number of objects to return. (optional, default to 60) /// Returns *only* offline users if true, returns only online and active users if false (optional) - /// Index associated with the operation. /// List<LimitedUser> - List GetFriends(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), int operationIndex = 0); + List GetFriends(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?)); /// /// List Friends @@ -119,9 +112,8 @@ public interface IFriendsApiSync : IApiAccessor /// A zero-based offset from the default object sorting from where search results start. (optional) /// The number of objects to return. (optional, default to 60) /// Returns *only* offline users if true, returns only online and active users if false (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedUser> - ApiResponse> GetFriendsWithHttpInfo(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), int operationIndex = 0); + ApiResponse> GetFriendsWithHttpInfo(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?)); /// /// Unfriend /// @@ -129,10 +121,9 @@ public interface IFriendsApiSync : IApiAccessor /// Unfriend a user by ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Success - Success Unfriend(string userId, int operationIndex = 0); + Success Unfriend(string userId); /// /// Unfriend @@ -141,10 +132,9 @@ public interface IFriendsApiSync : IApiAccessor /// Unfriend a user by ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of Success - ApiResponse UnfriendWithHttpInfo(string userId, int operationIndex = 0); + ApiResponse UnfriendWithHttpInfo(string userId); #endregion Synchronous Operations } @@ -161,11 +151,10 @@ public interface IFriendsApiAsync : IApiAccessor /// Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task DeleteFriendRequestAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteFriendRequestAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete Friend Request @@ -174,11 +163,10 @@ public interface IFriendsApiAsync : IApiAccessor /// Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> DeleteFriendRequestWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteFriendRequestWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Send Friend Request /// @@ -186,11 +174,10 @@ public interface IFriendsApiAsync : IApiAccessor /// Send a friend request to another user. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of Notification - System.Threading.Tasks.Task FriendAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FriendAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Send Friend Request @@ -199,11 +186,10 @@ public interface IFriendsApiAsync : IApiAccessor /// Send a friend request to another user. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Notification) - System.Threading.Tasks.Task> FriendWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FriendWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check Friend Status /// @@ -211,11 +197,10 @@ public interface IFriendsApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of FriendStatus - System.Threading.Tasks.Task GetFriendStatusAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetFriendStatusAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check Friend Status @@ -224,11 +209,10 @@ public interface IFriendsApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FriendStatus) - System.Threading.Tasks.Task> GetFriendStatusWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFriendStatusWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Friends /// @@ -239,10 +223,9 @@ public interface IFriendsApiAsync : IApiAccessor /// A zero-based offset from the default object sorting from where search results start. (optional) /// The number of objects to return. (optional, default to 60) /// Returns *only* offline users if true, returns only online and active users if false (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedUser> - System.Threading.Tasks.Task> GetFriendsAsync(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFriendsAsync(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Friends @@ -254,10 +237,9 @@ public interface IFriendsApiAsync : IApiAccessor /// A zero-based offset from the default object sorting from where search results start. (optional) /// The number of objects to return. (optional, default to 60) /// Returns *only* offline users if true, returns only online and active users if false (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedUser>) - System.Threading.Tasks.Task>> GetFriendsWithHttpInfoAsync(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetFriendsWithHttpInfoAsync(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Unfriend /// @@ -265,11 +247,10 @@ public interface IFriendsApiAsync : IApiAccessor /// Unfriend a user by ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task UnfriendAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UnfriendAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Unfriend @@ -278,11 +259,10 @@ public interface IFriendsApiAsync : IApiAccessor /// Unfriend a user by ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> UnfriendWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UnfriendWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -407,10 +387,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Delete Friend Request Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Success - public Success DeleteFriendRequest(string userId, int operationIndex = 0) + public Success DeleteFriendRequest(string userId) { VRChat.API.Client.ApiResponse localVarResponse = DeleteFriendRequestWithHttpInfo(userId); return localVarResponse.Data; @@ -420,16 +399,13 @@ public Success DeleteFriendRequest(string userId, int operationIndex = 0) /// Delete Friend Request Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse DeleteFriendRequestWithHttpInfo(string userId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse DeleteFriendRequestWithHttpInfo(string userId) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FriendsApi->DeleteFriendRequest"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -442,22 +418,13 @@ public VRChat.API.Client.ApiResponse DeleteFriendRequestWithHttpInfo(st }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FriendsApi.DeleteFriendRequest"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -473,13 +440,11 @@ public VRChat.API.Client.ApiResponse DeleteFriendRequestWithHttpInfo(st // make the HTTP request var localVarResponse = this.Client.Delete("/user/{userId}/friendRequest", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteFriendRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -489,13 +454,12 @@ public VRChat.API.Client.ApiResponse DeleteFriendRequestWithHttpInfo(st /// Delete Friend Request Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task DeleteFriendRequestAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteFriendRequestAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await DeleteFriendRequestWithHttpInfoAsync(userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await DeleteFriendRequestWithHttpInfoAsync(userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -503,17 +467,14 @@ public VRChat.API.Client.ApiResponse DeleteFriendRequestWithHttpInfo(st /// Delete Friend Request Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> DeleteFriendRequestWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteFriendRequestWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FriendsApi->DeleteFriendRequest"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -526,23 +487,15 @@ public VRChat.API.Client.ApiResponse DeleteFriendRequestWithHttpInfo(st "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FriendsApi.DeleteFriendRequest"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -557,15 +510,13 @@ public VRChat.API.Client.ApiResponse DeleteFriendRequestWithHttpInfo(st } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{userId}/friendRequest", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteFriendRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -575,10 +526,9 @@ public VRChat.API.Client.ApiResponse DeleteFriendRequestWithHttpInfo(st /// Send Friend Request Send a friend request to another user. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Notification - public Notification Friend(string userId, int operationIndex = 0) + public Notification Friend(string userId) { VRChat.API.Client.ApiResponse localVarResponse = FriendWithHttpInfo(userId); return localVarResponse.Data; @@ -588,16 +538,13 @@ public Notification Friend(string userId, int operationIndex = 0) /// Send Friend Request Send a friend request to another user. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of Notification - public VRChat.API.Client.ApiResponse FriendWithHttpInfo(string userId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse FriendWithHttpInfo(string userId) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FriendsApi->Friend"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -610,22 +557,13 @@ public VRChat.API.Client.ApiResponse FriendWithHttpInfo(string use }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FriendsApi.Friend"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -641,13 +579,11 @@ public VRChat.API.Client.ApiResponse FriendWithHttpInfo(string use // make the HTTP request var localVarResponse = this.Client.Post("/user/{userId}/friendRequest", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Friend", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -657,13 +593,12 @@ public VRChat.API.Client.ApiResponse FriendWithHttpInfo(string use /// Send Friend Request Send a friend request to another user. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of Notification - public async System.Threading.Tasks.Task FriendAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FriendAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await FriendWithHttpInfoAsync(userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await FriendWithHttpInfoAsync(userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -671,17 +606,14 @@ public VRChat.API.Client.ApiResponse FriendWithHttpInfo(string use /// Send Friend Request Send a friend request to another user. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Notification) - public async System.Threading.Tasks.Task> FriendWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FriendWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FriendsApi->Friend"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -694,23 +626,15 @@ public VRChat.API.Client.ApiResponse FriendWithHttpInfo(string use "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FriendsApi.Friend"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -725,15 +649,13 @@ public VRChat.API.Client.ApiResponse FriendWithHttpInfo(string use } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/user/{userId}/friendRequest", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Friend", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -743,10 +665,9 @@ public VRChat.API.Client.ApiResponse FriendWithHttpInfo(string use /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// FriendStatus - public FriendStatus GetFriendStatus(string userId, int operationIndex = 0) + public FriendStatus GetFriendStatus(string userId) { VRChat.API.Client.ApiResponse localVarResponse = GetFriendStatusWithHttpInfo(userId); return localVarResponse.Data; @@ -756,16 +677,13 @@ public FriendStatus GetFriendStatus(string userId, int operationIndex = 0) /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of FriendStatus - public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(string userId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(string userId) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FriendsApi->GetFriendStatus"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -778,22 +696,13 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FriendsApi.GetFriendStatus"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -809,13 +718,11 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s // make the HTTP request var localVarResponse = this.Client.Get("/user/{userId}/friendStatus", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFriendStatus", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -825,13 +732,12 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of FriendStatus - public async System.Threading.Tasks.Task GetFriendStatusAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetFriendStatusAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetFriendStatusWithHttpInfoAsync(userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetFriendStatusWithHttpInfoAsync(userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -839,17 +745,14 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FriendStatus) - public async System.Threading.Tasks.Task> GetFriendStatusWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFriendStatusWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FriendsApi->GetFriendStatus"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -862,23 +765,15 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FriendsApi.GetFriendStatus"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -893,15 +788,13 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{userId}/friendStatus", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFriendStatus", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -914,9 +807,8 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s /// A zero-based offset from the default object sorting from where search results start. (optional) /// The number of objects to return. (optional, default to 60) /// Returns *only* offline users if true, returns only online and active users if false (optional) - /// Index associated with the operation. /// List<LimitedUser> - public List GetFriends(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), int operationIndex = 0) + public List GetFriends(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?)) { VRChat.API.Client.ApiResponse> localVarResponse = GetFriendsWithHttpInfo(offset, n, offline); return localVarResponse.Data; @@ -929,9 +821,8 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s /// A zero-based offset from the default object sorting from where search results start. (optional) /// The number of objects to return. (optional, default to 60) /// Returns *only* offline users if true, returns only online and active users if false (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedUser> - public VRChat.API.Client.ApiResponse> GetFriendsWithHttpInfo(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetFriendsWithHttpInfo(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -944,16 +835,10 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (offset != null) { @@ -968,9 +853,6 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offline", offline)); } - localVarRequestOptions.Operation = "FriendsApi.GetFriends"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -986,13 +868,11 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s // make the HTTP request var localVarResponse = this.Client.Get>("/auth/user/friends", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFriends", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1005,12 +885,11 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s /// A zero-based offset from the default object sorting from where search results start. (optional) /// The number of objects to return. (optional, default to 60) /// Returns *only* offline users if true, returns only online and active users if false (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedUser> - public async System.Threading.Tasks.Task> GetFriendsAsync(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFriendsAsync(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetFriendsWithHttpInfoAsync(offset, n, offline, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetFriendsWithHttpInfoAsync(offset, n, offline, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1021,10 +900,9 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s /// A zero-based offset from the default object sorting from where search results start. (optional) /// The number of objects to return. (optional, default to 60) /// Returns *only* offline users if true, returns only online and active users if false (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedUser>) - public async System.Threading.Tasks.Task>> GetFriendsWithHttpInfoAsync(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetFriendsWithHttpInfoAsync(int? offset = default(int?), int? n = default(int?), bool? offline = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1037,17 +915,12 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (offset != null) { @@ -1062,9 +935,6 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offline", offline)); } - localVarRequestOptions.Operation = "FriendsApi.GetFriends"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1079,15 +949,13 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/auth/user/friends", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFriends", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1097,10 +965,9 @@ public VRChat.API.Client.ApiResponse GetFriendStatusWithHttpInfo(s /// Unfriend Unfriend a user by ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Success - public Success Unfriend(string userId, int operationIndex = 0) + public Success Unfriend(string userId) { VRChat.API.Client.ApiResponse localVarResponse = UnfriendWithHttpInfo(userId); return localVarResponse.Data; @@ -1110,16 +977,13 @@ public Success Unfriend(string userId, int operationIndex = 0) /// Unfriend Unfriend a user by ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse UnfriendWithHttpInfo(string userId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse UnfriendWithHttpInfo(string userId) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FriendsApi->Unfriend"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1132,22 +996,13 @@ public VRChat.API.Client.ApiResponse UnfriendWithHttpInfo(string userId }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FriendsApi.Unfriend"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1163,13 +1018,11 @@ public VRChat.API.Client.ApiResponse UnfriendWithHttpInfo(string userId // make the HTTP request var localVarResponse = this.Client.Delete("/auth/user/friends/{userId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Unfriend", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1179,13 +1032,12 @@ public VRChat.API.Client.ApiResponse UnfriendWithHttpInfo(string userId /// Unfriend Unfriend a user by ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task UnfriendAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UnfriendAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await UnfriendWithHttpInfoAsync(userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await UnfriendWithHttpInfoAsync(userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1193,17 +1045,14 @@ public VRChat.API.Client.ApiResponse UnfriendWithHttpInfo(string userId /// Unfriend Unfriend a user by ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> UnfriendWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UnfriendWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling FriendsApi->Unfriend"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1216,23 +1065,15 @@ public VRChat.API.Client.ApiResponse UnfriendWithHttpInfo(string userId "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "FriendsApi.Unfriend"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1247,15 +1088,13 @@ public VRChat.API.Client.ApiResponse UnfriendWithHttpInfo(string userId } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/auth/user/friends/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Unfriend", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/GroupsApi.cs b/src/VRChat.API/Api/GroupsApi.cs new file mode 100644 index 00000000..eb9e87a4 --- /dev/null +++ b/src/VRChat.API/Api/GroupsApi.cs @@ -0,0 +1,7377 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using VRChat.API.Client; +using VRChat.API.Model; + +namespace VRChat.API.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IGroupsApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Add Group Gallery Image + /// + /// + /// Adds an image to a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// GroupGalleryImage + GroupGalleryImage AddGroupGalleryImage(string groupId, string groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest = default(AddGroupGalleryImageRequest)); + + /// + /// Add Group Gallery Image + /// + /// + /// Adds an image to a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// ApiResponse of GroupGalleryImage + ApiResponse AddGroupGalleryImageWithHttpInfo(string groupId, string groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest = default(AddGroupGalleryImageRequest)); + /// + /// Add Role to GroupMember + /// + /// + /// Adds a Role to a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// List<string> + List AddGroupMemberRole(string groupId, string userId, string groupRoleId); + + /// + /// Add Role to GroupMember + /// + /// + /// Adds a Role to a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// ApiResponse of List<string> + ApiResponse> AddGroupMemberRoleWithHttpInfo(string groupId, string userId, string groupRoleId); + /// + /// Ban Group Member + /// + /// + /// Bans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// GroupMember + GroupMember BanGroupMember(string groupId, BanGroupMemberRequest banGroupMemberRequest = default(BanGroupMemberRequest)); + + /// + /// Ban Group Member + /// + /// + /// Bans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of GroupMember + ApiResponse BanGroupMemberWithHttpInfo(string groupId, BanGroupMemberRequest banGroupMemberRequest = default(BanGroupMemberRequest)); + /// + /// Cancel Group Join Request + /// + /// + /// Cancels a request sent to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// + void CancelGroupRequest(string groupId); + + /// + /// Cancel Group Join Request + /// + /// + /// Cancels a request sent to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of Object(void) + ApiResponse CancelGroupRequestWithHttpInfo(string groupId); + /// + /// Create Group + /// + /// + /// Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + /// + /// Thrown when fails to make API call + /// (optional) + /// Group + Group CreateGroup(CreateGroupRequest createGroupRequest = default(CreateGroupRequest)); + + /// + /// Create Group + /// + /// + /// Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Group + ApiResponse CreateGroupWithHttpInfo(CreateGroupRequest createGroupRequest = default(CreateGroupRequest)); + /// + /// Create Group Announcement + /// + /// + /// Creates an Announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// GroupAnnouncement + GroupAnnouncement CreateGroupAnnouncement(string groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest = default(CreateGroupAnnouncementRequest)); + + /// + /// Create Group Announcement + /// + /// + /// Creates an Announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of GroupAnnouncement + ApiResponse CreateGroupAnnouncementWithHttpInfo(string groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest = default(CreateGroupAnnouncementRequest)); + /// + /// Create Group Gallery + /// + /// + /// Creates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// GroupGallery + GroupGallery CreateGroupGallery(string groupId, CreateGroupGalleryRequest createGroupGalleryRequest = default(CreateGroupGalleryRequest)); + + /// + /// Create Group Gallery + /// + /// + /// Creates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of GroupGallery + ApiResponse CreateGroupGalleryWithHttpInfo(string groupId, CreateGroupGalleryRequest createGroupGalleryRequest = default(CreateGroupGalleryRequest)); + /// + /// Invite User to Group + /// + /// + /// Sends an invite to a user to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// + void CreateGroupInvite(string groupId, CreateGroupInviteRequest createGroupInviteRequest = default(CreateGroupInviteRequest)); + + /// + /// Invite User to Group + /// + /// + /// Sends an invite to a user to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of Object(void) + ApiResponse CreateGroupInviteWithHttpInfo(string groupId, CreateGroupInviteRequest createGroupInviteRequest = default(CreateGroupInviteRequest)); + /// + /// Create GroupRole + /// + /// + /// Create a Group role. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// GroupRole + GroupRole CreateGroupRole(string groupId, CreateGroupRoleRequest createGroupRoleRequest = default(CreateGroupRoleRequest)); + + /// + /// Create GroupRole + /// + /// + /// Create a Group role. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of GroupRole + ApiResponse CreateGroupRoleWithHttpInfo(string groupId, CreateGroupRoleRequest createGroupRoleRequest = default(CreateGroupRoleRequest)); + /// + /// Delete Group + /// + /// + /// Deletes a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Success + Success DeleteGroup(string groupId); + + /// + /// Delete Group + /// + /// + /// Deletes a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of Success + ApiResponse DeleteGroupWithHttpInfo(string groupId); + /// + /// Delete Group Announcement + /// + /// + /// Deletes the announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Success + Success DeleteGroupAnnouncement(string groupId); + + /// + /// Delete Group Announcement + /// + /// + /// Deletes the announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of Success + ApiResponse DeleteGroupAnnouncementWithHttpInfo(string groupId); + /// + /// Delete Group Gallery + /// + /// + /// Deletes a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Success + Success DeleteGroupGallery(string groupId, string groupGalleryId); + + /// + /// Delete Group Gallery + /// + /// + /// Deletes a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// ApiResponse of Success + ApiResponse DeleteGroupGalleryWithHttpInfo(string groupId, string groupGalleryId); + /// + /// Delete Group Gallery Image + /// + /// + /// Deletes an image from a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Must be a valid group gallery image ID. + /// Success + Success DeleteGroupGalleryImage(string groupId, string groupGalleryId, string groupGalleryImageId); + + /// + /// Delete Group Gallery Image + /// + /// + /// Deletes an image from a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Must be a valid group gallery image ID. + /// ApiResponse of Success + ApiResponse DeleteGroupGalleryImageWithHttpInfo(string groupId, string groupGalleryId, string groupGalleryImageId); + /// + /// Delete User Invite + /// + /// + /// Deletes an Group invite sent to a User + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// + void DeleteGroupInvite(string groupId, string userId); + + /// + /// Delete User Invite + /// + /// + /// Deletes an Group invite sent to a User + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// ApiResponse of Object(void) + ApiResponse DeleteGroupInviteWithHttpInfo(string groupId, string userId); + /// + /// Delete Group Role + /// + /// + /// Deletes a Group Role by ID and returns the remaining roles. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// List<GroupRole> + List DeleteGroupRole(string groupId, string groupRoleId); + + /// + /// Delete Group Role + /// + /// + /// Deletes a Group Role by ID and returns the remaining roles. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// ApiResponse of List<GroupRole> + ApiResponse> DeleteGroupRoleWithHttpInfo(string groupId, string groupRoleId); + /// + /// Get Group by ID + /// + /// + /// Returns a single Group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Include roles for the Group object. Defaults to false. (optional) + /// Group + Group GetGroup(string groupId, bool? includeRoles = default(bool?)); + + /// + /// Get Group by ID + /// + /// + /// Returns a single Group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Include roles for the Group object. Defaults to false. (optional) + /// ApiResponse of Group + ApiResponse GetGroupWithHttpInfo(string groupId, bool? includeRoles = default(bool?)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// GroupAnnouncement + GroupAnnouncement GetGroupAnnouncements(string 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of GroupAnnouncement + ApiResponse GetGroupAnnouncementsWithHttpInfo(string groupId); + /// + /// Get Group Audit Logs + /// + /// + /// Returns a list of audit logs for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// The start date of the search range. (optional) + /// The end date of the search range. (optional) + /// PaginatedGroupAuditLogEntryList + PaginatedGroupAuditLogEntryList GetGroupAuditLogs(string groupId, int? n = default(int?), int? offset = default(int?), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?)); + + /// + /// Get Group Audit Logs + /// + /// + /// Returns a list of audit logs for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// The start date of the search range. (optional) + /// The end date of the search range. (optional) + /// ApiResponse of PaginatedGroupAuditLogEntryList + ApiResponse GetGroupAuditLogsWithHttpInfo(string groupId, int? n = default(int?), int? offset = default(int?), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?)); + /// + /// Get Group Bans + /// + /// + /// Returns a list of banned users for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// List<GroupMember> + List GetGroupBans(string groupId, int? n = default(int?), int? offset = default(int?)); + + /// + /// Get Group Bans + /// + /// + /// Returns a list of banned users for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// ApiResponse of List<GroupMember> + ApiResponse> GetGroupBansWithHttpInfo(string groupId, int? n = default(int?), int? offset = default(int?)); + /// + /// Get Group Gallery Images + /// + /// + /// Returns a list of images for a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// If specified, only returns images that have been approved or not approved. (optional) + /// List<GroupGalleryImage> + List GetGroupGalleryImages(string groupId, string groupGalleryId, int? n = default(int?), int? offset = default(int?), bool? approved = default(bool?)); + + /// + /// Get Group Gallery Images + /// + /// + /// Returns a list of images for a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// If specified, only returns images that have been approved or not approved. (optional) + /// ApiResponse of List<GroupGalleryImage> + ApiResponse> GetGroupGalleryImagesWithHttpInfo(string groupId, string groupGalleryId, int? n = default(int?), int? offset = default(int?), bool? approved = default(bool?)); + /// + /// Get Group Invites Sent + /// + /// + /// Returns a list of members that have been invited to the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// List<GroupMember> + List GetGroupInvites(string groupId); + + /// + /// Get Group Invites Sent + /// + /// + /// Returns a list of members that have been invited to the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of List<GroupMember> + ApiResponse> GetGroupInvitesWithHttpInfo(string groupId); + /// + /// Get Group Member + /// + /// + /// Returns a LimitedGroup Member. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// GroupLimitedMember + GroupLimitedMember GetGroupMember(string groupId, string userId); + + /// + /// Get Group Member + /// + /// + /// Returns a LimitedGroup Member. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// ApiResponse of GroupLimitedMember + ApiResponse GetGroupMemberWithHttpInfo(string groupId, string userId); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// List<GroupMember> + List GetGroupMembers(string groupId, int? n = default(int?), int? offset = default(int?)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// ApiResponse of List<GroupMember> + ApiResponse> GetGroupMembersWithHttpInfo(string groupId, int? n = default(int?), int? offset = default(int?)); + /// + /// List Group Permissions + /// + /// + /// Returns a List of all possible/available permissions for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// List<GroupPermission> + List GetGroupPermissions(string groupId); + + /// + /// List Group Permissions + /// + /// + /// Returns a List of all possible/available permissions for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of List<GroupPermission> + ApiResponse> GetGroupPermissionsWithHttpInfo(string groupId); + /// + /// Get Group Join Requests + /// + /// + /// Returns a list of members that have requested to join the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// List<GroupMember> + List GetGroupRequests(string groupId); + + /// + /// Get Group Join Requests + /// + /// + /// Returns a list of members that have requested to join the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of List<GroupMember> + ApiResponse> GetGroupRequestsWithHttpInfo(string groupId); + /// + /// Get Group Roles + /// + /// + /// Returns a Group Role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// List<GroupRole> + List GetGroupRoles(string groupId); + + /// + /// Get Group Roles + /// + /// + /// Returns a Group Role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of List<GroupRole> + ApiResponse> GetGroupRolesWithHttpInfo(string groupId); + /// + /// Join Group + /// + /// + /// Join a Group by ID and returns the joined Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Group + Group JoinGroup(string groupId); + + /// + /// Join Group + /// + /// + /// Join a Group by ID and returns the joined Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of Group + ApiResponse JoinGroupWithHttpInfo(string groupId); + /// + /// Kick Group Member + /// + /// + /// Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// + void KickGroupMember(string groupId, string userId); + + /// + /// Kick Group Member + /// + /// + /// Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// ApiResponse of Object(void) + ApiResponse KickGroupMemberWithHttpInfo(string groupId, string userId); + /// + /// Leave Group + /// + /// + /// Leave a group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// + void LeaveGroup(string groupId); + + /// + /// Leave Group + /// + /// + /// Leave a group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of Object(void) + ApiResponse LeaveGroupWithHttpInfo(string groupId); + /// + /// Remove Role from GroupMember + /// + /// + /// Removes a Role from a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// List<string> + List RemoveGroupMemberRole(string groupId, string userId, string groupRoleId); + + /// + /// Remove Role from GroupMember + /// + /// + /// Removes a Role from a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// ApiResponse of List<string> + ApiResponse> RemoveGroupMemberRoleWithHttpInfo(string groupId, string userId, string groupRoleId); + /// + /// Respond Group Join request + /// + /// + /// Responds to a Group Join Request with Accept/Deny + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// + void RespondGroupJoinRequest(string groupId, string userId, RespondGroupJoinRequest respondGroupJoinRequest = default(RespondGroupJoinRequest)); + + /// + /// Respond Group Join request + /// + /// + /// Responds to a Group Join Request with Accept/Deny + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// ApiResponse of Object(void) + ApiResponse RespondGroupJoinRequestWithHttpInfo(string groupId, string userId, RespondGroupJoinRequest respondGroupJoinRequest = default(RespondGroupJoinRequest)); + /// + /// Unban Group Member + /// + /// + /// Unbans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// GroupMember + GroupMember UnbanGroupMember(string groupId, string userId); + + /// + /// Unban Group Member + /// + /// + /// Unbans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// ApiResponse of GroupMember + ApiResponse UnbanGroupMemberWithHttpInfo(string groupId, string userId); + /// + /// Update Group + /// + /// + /// Updates a Group and returns it. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Group + Group UpdateGroup(string groupId, UpdateGroupRequest updateGroupRequest = default(UpdateGroupRequest)); + + /// + /// Update Group + /// + /// + /// Updates a Group and returns it. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of Group + ApiResponse UpdateGroupWithHttpInfo(string groupId, UpdateGroupRequest updateGroupRequest = default(UpdateGroupRequest)); + /// + /// Update Group Gallery + /// + /// + /// Updates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// GroupGallery + GroupGallery UpdateGroupGallery(string groupId, string groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest = default(UpdateGroupGalleryRequest)); + + /// + /// Update Group Gallery + /// + /// + /// Updates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// ApiResponse of GroupGallery + ApiResponse UpdateGroupGalleryWithHttpInfo(string groupId, string groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest = default(UpdateGroupGalleryRequest)); + /// + /// Update Group Member + /// + /// + /// Updates a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// GroupLimitedMember + GroupLimitedMember UpdateGroupMember(string groupId, string userId, UpdateGroupMemberRequest updateGroupMemberRequest = default(UpdateGroupMemberRequest)); + + /// + /// Update Group Member + /// + /// + /// Updates a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// ApiResponse of GroupLimitedMember + ApiResponse UpdateGroupMemberWithHttpInfo(string groupId, string userId, UpdateGroupMemberRequest updateGroupMemberRequest = default(UpdateGroupMemberRequest)); + /// + /// Update Group Role + /// + /// + /// Updates a group role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// (optional) + /// List<GroupRole> + List UpdateGroupRole(string groupId, string groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest = default(UpdateGroupRoleRequest)); + + /// + /// Update Group Role + /// + /// + /// Updates a group role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// (optional) + /// ApiResponse of List<GroupRole> + ApiResponse> UpdateGroupRoleWithHttpInfo(string groupId, string groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest = default(UpdateGroupRoleRequest)); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IGroupsApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Add Group Gallery Image + /// + /// + /// Adds an image to a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupGalleryImage + System.Threading.Tasks.Task AddGroupGalleryImageAsync(string groupId, string groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest = default(AddGroupGalleryImageRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Add Group Gallery Image + /// + /// + /// Adds an image to a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupGalleryImage) + System.Threading.Tasks.Task> AddGroupGalleryImageWithHttpInfoAsync(string groupId, string groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest = default(AddGroupGalleryImageRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Add Role to GroupMember + /// + /// + /// Adds a Role to a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of List<string> + System.Threading.Tasks.Task> AddGroupMemberRoleAsync(string groupId, string userId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Add Role to GroupMember + /// + /// + /// Adds a Role to a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + System.Threading.Tasks.Task>> AddGroupMemberRoleWithHttpInfoAsync(string groupId, string userId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Ban Group Member + /// + /// + /// Bans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupMember + System.Threading.Tasks.Task BanGroupMemberAsync(string groupId, BanGroupMemberRequest banGroupMemberRequest = default(BanGroupMemberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Ban Group Member + /// + /// + /// Bans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupMember) + System.Threading.Tasks.Task> BanGroupMemberWithHttpInfoAsync(string groupId, BanGroupMemberRequest banGroupMemberRequest = default(BanGroupMemberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Cancel Group Join Request + /// + /// + /// Cancels a request sent to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task CancelGroupRequestAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Cancel Group Join Request + /// + /// + /// Cancels a request sent to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> CancelGroupRequestWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create Group + /// + /// + /// Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of Group + System.Threading.Tasks.Task CreateGroupAsync(CreateGroupRequest createGroupRequest = default(CreateGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create Group + /// + /// + /// Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Group) + System.Threading.Tasks.Task> CreateGroupWithHttpInfoAsync(CreateGroupRequest createGroupRequest = default(CreateGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create Group Announcement + /// + /// + /// Creates an Announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupAnnouncement + System.Threading.Tasks.Task CreateGroupAnnouncementAsync(string groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest = default(CreateGroupAnnouncementRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create Group Announcement + /// + /// + /// Creates an Announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupAnnouncement) + System.Threading.Tasks.Task> CreateGroupAnnouncementWithHttpInfoAsync(string groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest = default(CreateGroupAnnouncementRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create Group Gallery + /// + /// + /// Creates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupGallery + System.Threading.Tasks.Task CreateGroupGalleryAsync(string groupId, CreateGroupGalleryRequest createGroupGalleryRequest = default(CreateGroupGalleryRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create Group Gallery + /// + /// + /// Creates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupGallery) + System.Threading.Tasks.Task> CreateGroupGalleryWithHttpInfoAsync(string groupId, CreateGroupGalleryRequest createGroupGalleryRequest = default(CreateGroupGalleryRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Invite User to Group + /// + /// + /// Sends an invite to a user to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task CreateGroupInviteAsync(string groupId, CreateGroupInviteRequest createGroupInviteRequest = default(CreateGroupInviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Invite User to Group + /// + /// + /// Sends an invite to a user to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> CreateGroupInviteWithHttpInfoAsync(string groupId, CreateGroupInviteRequest createGroupInviteRequest = default(CreateGroupInviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create GroupRole + /// + /// + /// Create a Group role. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupRole + System.Threading.Tasks.Task CreateGroupRoleAsync(string groupId, CreateGroupRoleRequest createGroupRoleRequest = default(CreateGroupRoleRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create GroupRole + /// + /// + /// Create a Group role. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupRole) + System.Threading.Tasks.Task> CreateGroupRoleWithHttpInfoAsync(string groupId, CreateGroupRoleRequest createGroupRoleRequest = default(CreateGroupRoleRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete Group + /// + /// + /// Deletes a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of Success + System.Threading.Tasks.Task DeleteGroupAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete Group + /// + /// + /// Deletes a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Success) + System.Threading.Tasks.Task> DeleteGroupWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete Group Announcement + /// + /// + /// Deletes the announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of Success + System.Threading.Tasks.Task DeleteGroupAnnouncementAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete Group Announcement + /// + /// + /// Deletes the announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Success) + System.Threading.Tasks.Task> DeleteGroupAnnouncementWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete Group Gallery + /// + /// + /// Deletes a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Cancellation Token to cancel the request. + /// Task of Success + System.Threading.Tasks.Task DeleteGroupGalleryAsync(string groupId, string groupGalleryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete Group Gallery + /// + /// + /// Deletes a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Success) + System.Threading.Tasks.Task> DeleteGroupGalleryWithHttpInfoAsync(string groupId, string groupGalleryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete Group Gallery Image + /// + /// + /// Deletes an image from a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Must be a valid group gallery image ID. + /// Cancellation Token to cancel the request. + /// Task of Success + System.Threading.Tasks.Task DeleteGroupGalleryImageAsync(string groupId, string groupGalleryId, string groupGalleryImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete Group Gallery Image + /// + /// + /// Deletes an image from a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Must be a valid group gallery image ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Success) + System.Threading.Tasks.Task> DeleteGroupGalleryImageWithHttpInfoAsync(string groupId, string groupGalleryId, string groupGalleryImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete User Invite + /// + /// + /// Deletes an Group invite sent to a User + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteGroupInviteAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete User Invite + /// + /// + /// Deletes an Group invite sent to a User + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteGroupInviteWithHttpInfoAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete Group Role + /// + /// + /// Deletes a Group Role by ID and returns the remaining roles. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of List<GroupRole> + System.Threading.Tasks.Task> DeleteGroupRoleAsync(string groupId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete Group Role + /// + /// + /// Deletes a Group Role by ID and returns the remaining roles. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupRole>) + System.Threading.Tasks.Task>> DeleteGroupRoleWithHttpInfoAsync(string groupId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Group by ID + /// + /// + /// Returns a single Group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Include roles for the Group object. Defaults to false. (optional) + /// Cancellation Token to cancel the request. + /// Task of Group + System.Threading.Tasks.Task GetGroupAsync(string groupId, bool? includeRoles = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Group by ID + /// + /// + /// Returns a single Group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Include roles for the Group object. Defaults to false. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Group) + System.Threading.Tasks.Task> GetGroupWithHttpInfoAsync(string groupId, bool? includeRoles = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of GroupAnnouncement + System.Threading.Tasks.Task GetGroupAnnouncementsAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupAnnouncement) + System.Threading.Tasks.Task> GetGroupAnnouncementsWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Group Audit Logs + /// + /// + /// Returns a list of audit logs for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// The start date of the search range. (optional) + /// The end date of the search range. (optional) + /// Cancellation Token to cancel the request. + /// Task of PaginatedGroupAuditLogEntryList + System.Threading.Tasks.Task GetGroupAuditLogsAsync(string groupId, int? n = default(int?), int? offset = default(int?), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Group Audit Logs + /// + /// + /// Returns a list of audit logs for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// The start date of the search range. (optional) + /// The end date of the search range. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PaginatedGroupAuditLogEntryList) + System.Threading.Tasks.Task> GetGroupAuditLogsWithHttpInfoAsync(string groupId, int? n = default(int?), int? offset = default(int?), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Group Bans + /// + /// + /// Returns a list of banned users for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// Cancellation Token to cancel the request. + /// Task of List<GroupMember> + System.Threading.Tasks.Task> GetGroupBansAsync(string groupId, int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Group Bans + /// + /// + /// Returns a list of banned users for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupMember>) + System.Threading.Tasks.Task>> GetGroupBansWithHttpInfoAsync(string groupId, int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Group Gallery Images + /// + /// + /// Returns a list of images for a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// If specified, only returns images that have been approved or not approved. (optional) + /// Cancellation Token to cancel the request. + /// Task of List<GroupGalleryImage> + System.Threading.Tasks.Task> GetGroupGalleryImagesAsync(string groupId, string groupGalleryId, int? n = default(int?), int? offset = default(int?), bool? approved = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Group Gallery Images + /// + /// + /// Returns a list of images for a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// If specified, only returns images that have been approved or not approved. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupGalleryImage>) + System.Threading.Tasks.Task>> GetGroupGalleryImagesWithHttpInfoAsync(string groupId, string groupGalleryId, int? n = default(int?), int? offset = default(int?), bool? approved = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Group Invites Sent + /// + /// + /// Returns a list of members that have been invited to the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of List<GroupMember> + System.Threading.Tasks.Task> GetGroupInvitesAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Group Invites Sent + /// + /// + /// Returns a list of members that have been invited to the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupMember>) + System.Threading.Tasks.Task>> GetGroupInvitesWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Group Member + /// + /// + /// Returns a LimitedGroup Member. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of GroupLimitedMember + System.Threading.Tasks.Task GetGroupMemberAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Group Member + /// + /// + /// Returns a LimitedGroup Member. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupLimitedMember) + System.Threading.Tasks.Task> GetGroupMemberWithHttpInfoAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// Cancellation Token to cancel the request. + /// Task of List<GroupMember> + System.Threading.Tasks.Task> GetGroupMembersAsync(string groupId, int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupMember>) + System.Threading.Tasks.Task>> GetGroupMembersWithHttpInfoAsync(string groupId, int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List Group Permissions + /// + /// + /// Returns a List of all possible/available permissions for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of List<GroupPermission> + System.Threading.Tasks.Task> GetGroupPermissionsAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List Group Permissions + /// + /// + /// Returns a List of all possible/available permissions for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupPermission>) + System.Threading.Tasks.Task>> GetGroupPermissionsWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Group Join Requests + /// + /// + /// Returns a list of members that have requested to join the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of List<GroupMember> + System.Threading.Tasks.Task> GetGroupRequestsAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Group Join Requests + /// + /// + /// Returns a list of members that have requested to join the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupMember>) + System.Threading.Tasks.Task>> GetGroupRequestsWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Group Roles + /// + /// + /// Returns a Group Role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of List<GroupRole> + System.Threading.Tasks.Task> GetGroupRolesAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Group Roles + /// + /// + /// Returns a Group Role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupRole>) + System.Threading.Tasks.Task>> GetGroupRolesWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Join Group + /// + /// + /// Join a Group by ID and returns the joined Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of Group + System.Threading.Tasks.Task JoinGroupAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Join Group + /// + /// + /// Join a Group by ID and returns the joined Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Group) + System.Threading.Tasks.Task> JoinGroupWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Kick Group Member + /// + /// + /// Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task KickGroupMemberAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Kick Group Member + /// + /// + /// Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> KickGroupMemberWithHttpInfoAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Leave Group + /// + /// + /// Leave a group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task LeaveGroupAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Leave Group + /// + /// + /// Leave a group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> LeaveGroupWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Remove Role from GroupMember + /// + /// + /// Removes a Role from a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of List<string> + System.Threading.Tasks.Task> RemoveGroupMemberRoleAsync(string groupId, string userId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Remove Role from GroupMember + /// + /// + /// Removes a Role from a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + System.Threading.Tasks.Task>> RemoveGroupMemberRoleWithHttpInfoAsync(string groupId, string userId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Respond Group Join request + /// + /// + /// Responds to a Group Join Request with Accept/Deny + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RespondGroupJoinRequestAsync(string groupId, string userId, RespondGroupJoinRequest respondGroupJoinRequest = default(RespondGroupJoinRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Respond Group Join request + /// + /// + /// Responds to a Group Join Request with Accept/Deny + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RespondGroupJoinRequestWithHttpInfoAsync(string groupId, string userId, RespondGroupJoinRequest respondGroupJoinRequest = default(RespondGroupJoinRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Unban Group Member + /// + /// + /// Unbans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of GroupMember + System.Threading.Tasks.Task UnbanGroupMemberAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Unban Group Member + /// + /// + /// Unbans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupMember) + System.Threading.Tasks.Task> UnbanGroupMemberWithHttpInfoAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update Group + /// + /// + /// Updates a Group and returns it. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of Group + System.Threading.Tasks.Task UpdateGroupAsync(string groupId, UpdateGroupRequest updateGroupRequest = default(UpdateGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update Group + /// + /// + /// Updates a Group and returns it. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Group) + System.Threading.Tasks.Task> UpdateGroupWithHttpInfoAsync(string groupId, UpdateGroupRequest updateGroupRequest = default(UpdateGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update Group Gallery + /// + /// + /// Updates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupGallery + System.Threading.Tasks.Task UpdateGroupGalleryAsync(string groupId, string groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest = default(UpdateGroupGalleryRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update Group Gallery + /// + /// + /// Updates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupGallery) + System.Threading.Tasks.Task> UpdateGroupGalleryWithHttpInfoAsync(string groupId, string groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest = default(UpdateGroupGalleryRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update Group Member + /// + /// + /// Updates a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupLimitedMember + System.Threading.Tasks.Task UpdateGroupMemberAsync(string groupId, string userId, UpdateGroupMemberRequest updateGroupMemberRequest = default(UpdateGroupMemberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update Group Member + /// + /// + /// Updates a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupLimitedMember) + System.Threading.Tasks.Task> UpdateGroupMemberWithHttpInfoAsync(string groupId, string userId, UpdateGroupMemberRequest updateGroupMemberRequest = default(UpdateGroupMemberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update Group Role + /// + /// + /// Updates a group role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of List<GroupRole> + System.Threading.Tasks.Task> UpdateGroupRoleAsync(string groupId, string groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest = default(UpdateGroupRoleRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update Group Role + /// + /// + /// Updates a group role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupRole>) + System.Threading.Tasks.Task>> UpdateGroupRoleWithHttpInfoAsync(string groupId, string groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest = default(UpdateGroupRoleRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IGroupsApi : IGroupsApiSync, IGroupsApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class GroupsApi : IGroupsApi + { + private VRChat.API.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public GroupsApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public GroupsApi(string basePath) + { + this.Configuration = VRChat.API.Client.Configuration.MergeConfigurations( + VRChat.API.Client.GlobalConfiguration.Instance, + new VRChat.API.Client.Configuration { BasePath = basePath } + ); + this.Client = new VRChat.API.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new VRChat.API.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = VRChat.API.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public GroupsApi(VRChat.API.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = VRChat.API.Client.Configuration.MergeConfigurations( + VRChat.API.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new VRChat.API.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new VRChat.API.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = VRChat.API.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public GroupsApi(VRChat.API.Client.ISynchronousClient client, VRChat.API.Client.IAsynchronousClient asyncClient, VRChat.API.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = VRChat.API.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public VRChat.API.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public VRChat.API.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public VRChat.API.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public VRChat.API.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Add Group Gallery Image Adds an image to a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// GroupGalleryImage + public GroupGalleryImage AddGroupGalleryImage(string groupId, string groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest = default(AddGroupGalleryImageRequest)) + { + VRChat.API.Client.ApiResponse localVarResponse = AddGroupGalleryImageWithHttpInfo(groupId, groupGalleryId, addGroupGalleryImageRequest); + return localVarResponse.Data; + } + + /// + /// Add Group Gallery Image Adds an image to a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// ApiResponse of GroupGalleryImage + public VRChat.API.Client.ApiResponse AddGroupGalleryImageWithHttpInfo(string groupId, string groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest = default(AddGroupGalleryImageRequest)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->AddGroupGalleryImage"); + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryId' when calling GroupsApi->AddGroupGalleryImage"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryId)); // path parameter + localVarRequestOptions.Data = addGroupGalleryImageRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/groups/{groupId}/galleries/{groupGalleryId}/images", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AddGroupGalleryImage", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Add Group Gallery Image Adds an image to a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupGalleryImage + public async System.Threading.Tasks.Task AddGroupGalleryImageAsync(string groupId, string groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest = default(AddGroupGalleryImageRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await AddGroupGalleryImageWithHttpInfoAsync(groupId, groupGalleryId, addGroupGalleryImageRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Add Group Gallery Image Adds an image to a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupGalleryImage) + public async System.Threading.Tasks.Task> AddGroupGalleryImageWithHttpInfoAsync(string groupId, string groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest = default(AddGroupGalleryImageRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->AddGroupGalleryImage"); + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryId' when calling GroupsApi->AddGroupGalleryImage"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryId)); // path parameter + localVarRequestOptions.Data = addGroupGalleryImageRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/groups/{groupId}/galleries/{groupGalleryId}/images", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AddGroupGalleryImage", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Add Role to GroupMember Adds a Role to a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// List<string> + public List AddGroupMemberRole(string groupId, string userId, string groupRoleId) + { + VRChat.API.Client.ApiResponse> localVarResponse = AddGroupMemberRoleWithHttpInfo(groupId, userId, groupRoleId); + return localVarResponse.Data; + } + + /// + /// Add Role to GroupMember Adds a Role to a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// ApiResponse of List<string> + public VRChat.API.Client.ApiResponse> AddGroupMemberRoleWithHttpInfo(string groupId, string userId, string groupRoleId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->AddGroupMemberRole"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->AddGroupMemberRole"); + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupRoleId' when calling GroupsApi->AddGroupMemberRole"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupRoleId", VRChat.API.Client.ClientUtils.ParameterToString(groupRoleId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Put>("/groups/{groupId}/members/{userId}/roles/{groupRoleId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AddGroupMemberRole", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Add Role to GroupMember Adds a Role to a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of List<string> + public async System.Threading.Tasks.Task> AddGroupMemberRoleAsync(string groupId, string userId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await AddGroupMemberRoleWithHttpInfoAsync(groupId, userId, groupRoleId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Add Role to GroupMember Adds a Role to a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + public async System.Threading.Tasks.Task>> AddGroupMemberRoleWithHttpInfoAsync(string groupId, string userId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->AddGroupMemberRole"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->AddGroupMemberRole"); + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupRoleId' when calling GroupsApi->AddGroupMemberRole"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupRoleId", VRChat.API.Client.ClientUtils.ParameterToString(groupRoleId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PutAsync>("/groups/{groupId}/members/{userId}/roles/{groupRoleId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AddGroupMemberRole", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Ban Group Member Bans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// GroupMember + public GroupMember BanGroupMember(string groupId, BanGroupMemberRequest banGroupMemberRequest = default(BanGroupMemberRequest)) + { + VRChat.API.Client.ApiResponse localVarResponse = BanGroupMemberWithHttpInfo(groupId, banGroupMemberRequest); + return localVarResponse.Data; + } + + /// + /// Ban Group Member Bans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of GroupMember + public VRChat.API.Client.ApiResponse BanGroupMemberWithHttpInfo(string groupId, BanGroupMemberRequest banGroupMemberRequest = default(BanGroupMemberRequest)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->BanGroupMember"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = banGroupMemberRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/groups/{groupId}/bans", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BanGroupMember", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Ban Group Member Bans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupMember + public async System.Threading.Tasks.Task BanGroupMemberAsync(string groupId, BanGroupMemberRequest banGroupMemberRequest = default(BanGroupMemberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await BanGroupMemberWithHttpInfoAsync(groupId, banGroupMemberRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Ban Group Member Bans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupMember) + public async System.Threading.Tasks.Task> BanGroupMemberWithHttpInfoAsync(string groupId, BanGroupMemberRequest banGroupMemberRequest = default(BanGroupMemberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->BanGroupMember"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = banGroupMemberRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/groups/{groupId}/bans", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BanGroupMember", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Cancel Group Join Request Cancels a request sent to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// + public void CancelGroupRequest(string groupId) + { + CancelGroupRequestWithHttpInfo(groupId); + } + + /// + /// Cancel Group Join Request Cancels a request sent to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of Object(void) + public VRChat.API.Client.ApiResponse CancelGroupRequestWithHttpInfo(string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->CancelGroupRequest"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/groups/{groupId}/requests", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CancelGroupRequest", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Cancel Group Join Request Cancels a request sent to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task CancelGroupRequestAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await CancelGroupRequestWithHttpInfoAsync(groupId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Cancel Group Join Request Cancels a request sent to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> CancelGroupRequestWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->CancelGroupRequest"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/groups/{groupId}/requests", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CancelGroupRequest", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Create Group Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + /// + /// Thrown when fails to make API call + /// (optional) + /// Group + public Group CreateGroup(CreateGroupRequest createGroupRequest = default(CreateGroupRequest)) + { + VRChat.API.Client.ApiResponse localVarResponse = CreateGroupWithHttpInfo(createGroupRequest); + return localVarResponse.Data; + } + + /// + /// Create Group Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Group + public VRChat.API.Client.ApiResponse CreateGroupWithHttpInfo(CreateGroupRequest createGroupRequest = default(CreateGroupRequest)) + { + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = createGroupRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/groups", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Create Group Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of Group + public async System.Threading.Tasks.Task CreateGroupAsync(CreateGroupRequest createGroupRequest = default(CreateGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await CreateGroupWithHttpInfoAsync(createGroupRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create Group Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Group) + public async System.Threading.Tasks.Task> CreateGroupWithHttpInfoAsync(CreateGroupRequest createGroupRequest = default(CreateGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = createGroupRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/groups", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Create Group Announcement Creates an Announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// GroupAnnouncement + public GroupAnnouncement CreateGroupAnnouncement(string groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest = default(CreateGroupAnnouncementRequest)) + { + VRChat.API.Client.ApiResponse localVarResponse = CreateGroupAnnouncementWithHttpInfo(groupId, createGroupAnnouncementRequest); + return localVarResponse.Data; + } + + /// + /// Create Group Announcement Creates an Announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of GroupAnnouncement + public VRChat.API.Client.ApiResponse CreateGroupAnnouncementWithHttpInfo(string groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest = default(CreateGroupAnnouncementRequest)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->CreateGroupAnnouncement"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = createGroupAnnouncementRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/groups/{groupId}/announcement", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroupAnnouncement", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Create Group Announcement Creates an Announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupAnnouncement + public async System.Threading.Tasks.Task CreateGroupAnnouncementAsync(string groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest = default(CreateGroupAnnouncementRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await CreateGroupAnnouncementWithHttpInfoAsync(groupId, createGroupAnnouncementRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create Group Announcement Creates an Announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupAnnouncement) + public async System.Threading.Tasks.Task> CreateGroupAnnouncementWithHttpInfoAsync(string groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest = default(CreateGroupAnnouncementRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->CreateGroupAnnouncement"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = createGroupAnnouncementRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/groups/{groupId}/announcement", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroupAnnouncement", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Create Group Gallery Creates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// GroupGallery + public GroupGallery CreateGroupGallery(string groupId, CreateGroupGalleryRequest createGroupGalleryRequest = default(CreateGroupGalleryRequest)) + { + VRChat.API.Client.ApiResponse localVarResponse = CreateGroupGalleryWithHttpInfo(groupId, createGroupGalleryRequest); + return localVarResponse.Data; + } + + /// + /// Create Group Gallery Creates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of GroupGallery + public VRChat.API.Client.ApiResponse CreateGroupGalleryWithHttpInfo(string groupId, CreateGroupGalleryRequest createGroupGalleryRequest = default(CreateGroupGalleryRequest)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->CreateGroupGallery"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = createGroupGalleryRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/groups/{groupId}/galleries", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroupGallery", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Create Group Gallery Creates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupGallery + public async System.Threading.Tasks.Task CreateGroupGalleryAsync(string groupId, CreateGroupGalleryRequest createGroupGalleryRequest = default(CreateGroupGalleryRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await CreateGroupGalleryWithHttpInfoAsync(groupId, createGroupGalleryRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create Group Gallery Creates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupGallery) + public async System.Threading.Tasks.Task> CreateGroupGalleryWithHttpInfoAsync(string groupId, CreateGroupGalleryRequest createGroupGalleryRequest = default(CreateGroupGalleryRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->CreateGroupGallery"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = createGroupGalleryRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/groups/{groupId}/galleries", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroupGallery", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Invite User to Group Sends an invite to a user to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// + public void CreateGroupInvite(string groupId, CreateGroupInviteRequest createGroupInviteRequest = default(CreateGroupInviteRequest)) + { + CreateGroupInviteWithHttpInfo(groupId, createGroupInviteRequest); + } + + /// + /// Invite User to Group Sends an invite to a user to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of Object(void) + public VRChat.API.Client.ApiResponse CreateGroupInviteWithHttpInfo(string groupId, CreateGroupInviteRequest createGroupInviteRequest = default(CreateGroupInviteRequest)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->CreateGroupInvite"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = createGroupInviteRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/groups/{groupId}/invites", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroupInvite", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Invite User to Group Sends an invite to a user to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task CreateGroupInviteAsync(string groupId, CreateGroupInviteRequest createGroupInviteRequest = default(CreateGroupInviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await CreateGroupInviteWithHttpInfoAsync(groupId, createGroupInviteRequest, cancellationToken).ConfigureAwait(false); + } + + /// + /// Invite User to Group Sends an invite to a user to join the group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> CreateGroupInviteWithHttpInfoAsync(string groupId, CreateGroupInviteRequest createGroupInviteRequest = default(CreateGroupInviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->CreateGroupInvite"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = createGroupInviteRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/groups/{groupId}/invites", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroupInvite", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Create GroupRole Create a Group role. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// GroupRole + public GroupRole CreateGroupRole(string groupId, CreateGroupRoleRequest createGroupRoleRequest = default(CreateGroupRoleRequest)) + { + VRChat.API.Client.ApiResponse localVarResponse = CreateGroupRoleWithHttpInfo(groupId, createGroupRoleRequest); + return localVarResponse.Data; + } + + /// + /// Create GroupRole Create a Group role. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of GroupRole + public VRChat.API.Client.ApiResponse CreateGroupRoleWithHttpInfo(string groupId, CreateGroupRoleRequest createGroupRoleRequest = default(CreateGroupRoleRequest)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->CreateGroupRole"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = createGroupRoleRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/groups/{groupId}/roles", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroupRole", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Create GroupRole Create a Group role. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupRole + public async System.Threading.Tasks.Task CreateGroupRoleAsync(string groupId, CreateGroupRoleRequest createGroupRoleRequest = default(CreateGroupRoleRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await CreateGroupRoleWithHttpInfoAsync(groupId, createGroupRoleRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create GroupRole Create a Group role. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupRole) + public async System.Threading.Tasks.Task> CreateGroupRoleWithHttpInfoAsync(string groupId, CreateGroupRoleRequest createGroupRoleRequest = default(CreateGroupRoleRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->CreateGroupRole"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = createGroupRoleRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/groups/{groupId}/roles", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateGroupRole", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete Group Deletes a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Success + public Success DeleteGroup(string groupId) + { + VRChat.API.Client.ApiResponse localVarResponse = DeleteGroupWithHttpInfo(groupId); + return localVarResponse.Data; + } + + /// + /// Delete Group Deletes a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of Success + public VRChat.API.Client.ApiResponse DeleteGroupWithHttpInfo(string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroup"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/groups/{groupId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete Group Deletes a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of Success + public async System.Threading.Tasks.Task DeleteGroupAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await DeleteGroupWithHttpInfoAsync(groupId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Delete Group Deletes a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Success) + public async System.Threading.Tasks.Task> DeleteGroupWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroup"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/groups/{groupId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete Group Announcement Deletes the announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Success + public Success DeleteGroupAnnouncement(string groupId) + { + VRChat.API.Client.ApiResponse localVarResponse = DeleteGroupAnnouncementWithHttpInfo(groupId); + return localVarResponse.Data; + } + + /// + /// Delete Group Announcement Deletes the announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of Success + public VRChat.API.Client.ApiResponse DeleteGroupAnnouncementWithHttpInfo(string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroupAnnouncement"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/groups/{groupId}/announcement", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroupAnnouncement", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete Group Announcement Deletes the announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of Success + public async System.Threading.Tasks.Task DeleteGroupAnnouncementAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await DeleteGroupAnnouncementWithHttpInfoAsync(groupId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Delete Group Announcement Deletes the announcement for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Success) + public async System.Threading.Tasks.Task> DeleteGroupAnnouncementWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroupAnnouncement"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/groups/{groupId}/announcement", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroupAnnouncement", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete Group Gallery Deletes a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Success + public Success DeleteGroupGallery(string groupId, string groupGalleryId) + { + VRChat.API.Client.ApiResponse localVarResponse = DeleteGroupGalleryWithHttpInfo(groupId, groupGalleryId); + return localVarResponse.Data; + } + + /// + /// Delete Group Gallery Deletes a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// ApiResponse of Success + public VRChat.API.Client.ApiResponse DeleteGroupGalleryWithHttpInfo(string groupId, string groupGalleryId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroupGallery"); + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryId' when calling GroupsApi->DeleteGroupGallery"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/groups/{groupId}/galleries/{groupGalleryId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroupGallery", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete Group Gallery Deletes a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Cancellation Token to cancel the request. + /// Task of Success + public async System.Threading.Tasks.Task DeleteGroupGalleryAsync(string groupId, string groupGalleryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await DeleteGroupGalleryWithHttpInfoAsync(groupId, groupGalleryId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Delete Group Gallery Deletes a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Success) + public async System.Threading.Tasks.Task> DeleteGroupGalleryWithHttpInfoAsync(string groupId, string groupGalleryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroupGallery"); + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryId' when calling GroupsApi->DeleteGroupGallery"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/groups/{groupId}/galleries/{groupGalleryId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroupGallery", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete Group Gallery Image Deletes an image from a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Must be a valid group gallery image ID. + /// Success + public Success DeleteGroupGalleryImage(string groupId, string groupGalleryId, string groupGalleryImageId) + { + VRChat.API.Client.ApiResponse localVarResponse = DeleteGroupGalleryImageWithHttpInfo(groupId, groupGalleryId, groupGalleryImageId); + return localVarResponse.Data; + } + + /// + /// Delete Group Gallery Image Deletes an image from a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Must be a valid group gallery image ID. + /// ApiResponse of Success + public VRChat.API.Client.ApiResponse DeleteGroupGalleryImageWithHttpInfo(string groupId, string groupGalleryId, string groupGalleryImageId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroupGalleryImage"); + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryId' when calling GroupsApi->DeleteGroupGalleryImage"); + + // verify the required parameter 'groupGalleryImageId' is set + if (groupGalleryImageId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryImageId' when calling GroupsApi->DeleteGroupGalleryImage"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryImageId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryImageId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/groups/{groupId}/galleries/{groupGalleryId}/images/{groupGalleryImageId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroupGalleryImage", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete Group Gallery Image Deletes an image from a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Must be a valid group gallery image ID. + /// Cancellation Token to cancel the request. + /// Task of Success + public async System.Threading.Tasks.Task DeleteGroupGalleryImageAsync(string groupId, string groupGalleryId, string groupGalleryImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await DeleteGroupGalleryImageWithHttpInfoAsync(groupId, groupGalleryId, groupGalleryImageId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Delete Group Gallery Image Deletes an image from a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// Must be a valid group gallery image ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Success) + public async System.Threading.Tasks.Task> DeleteGroupGalleryImageWithHttpInfoAsync(string groupId, string groupGalleryId, string groupGalleryImageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroupGalleryImage"); + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryId' when calling GroupsApi->DeleteGroupGalleryImage"); + + // verify the required parameter 'groupGalleryImageId' is set + if (groupGalleryImageId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryImageId' when calling GroupsApi->DeleteGroupGalleryImage"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryImageId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryImageId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/groups/{groupId}/galleries/{groupGalleryId}/images/{groupGalleryImageId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroupGalleryImage", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete User Invite Deletes an Group invite sent to a User + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// + public void DeleteGroupInvite(string groupId, string userId) + { + DeleteGroupInviteWithHttpInfo(groupId, userId); + } + + /// + /// Delete User Invite Deletes an Group invite sent to a User + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// ApiResponse of Object(void) + public VRChat.API.Client.ApiResponse DeleteGroupInviteWithHttpInfo(string groupId, string userId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroupInvite"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->DeleteGroupInvite"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/groups/{groupId}/invites/{userId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroupInvite", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete User Invite Deletes an Group invite sent to a User + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteGroupInviteAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteGroupInviteWithHttpInfoAsync(groupId, userId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete User Invite Deletes an Group invite sent to a User + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteGroupInviteWithHttpInfoAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroupInvite"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->DeleteGroupInvite"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/groups/{groupId}/invites/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroupInvite", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete Group Role Deletes a Group Role by ID and returns the remaining roles. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// List<GroupRole> + public List DeleteGroupRole(string groupId, string groupRoleId) + { + VRChat.API.Client.ApiResponse> localVarResponse = DeleteGroupRoleWithHttpInfo(groupId, groupRoleId); + return localVarResponse.Data; + } + + /// + /// Delete Group Role Deletes a Group Role by ID and returns the remaining roles. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// ApiResponse of List<GroupRole> + public VRChat.API.Client.ApiResponse> DeleteGroupRoleWithHttpInfo(string groupId, string groupRoleId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroupRole"); + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupRoleId' when calling GroupsApi->DeleteGroupRole"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupRoleId", VRChat.API.Client.ClientUtils.ParameterToString(groupRoleId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete>("/groups/{groupId}/roles/{groupRoleId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroupRole", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete Group Role Deletes a Group Role by ID and returns the remaining roles. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of List<GroupRole> + public async System.Threading.Tasks.Task> DeleteGroupRoleAsync(string groupId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await DeleteGroupRoleWithHttpInfoAsync(groupId, groupRoleId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Delete Group Role Deletes a Group Role by ID and returns the remaining roles. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupRole>) + public async System.Threading.Tasks.Task>> DeleteGroupRoleWithHttpInfoAsync(string groupId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroupRole"); + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupRoleId' when calling GroupsApi->DeleteGroupRole"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupRoleId", VRChat.API.Client.ClientUtils.ParameterToString(groupRoleId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.DeleteAsync>("/groups/{groupId}/roles/{groupRoleId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteGroupRole", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group by ID Returns a single Group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Include roles for the Group object. Defaults to false. (optional) + /// Group + public Group GetGroup(string groupId, bool? includeRoles = default(bool?)) + { + VRChat.API.Client.ApiResponse localVarResponse = GetGroupWithHttpInfo(groupId, includeRoles); + return localVarResponse.Data; + } + + /// + /// Get Group by ID Returns a single Group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Include roles for the Group object. Defaults to false. (optional) + /// ApiResponse of Group + public VRChat.API.Client.ApiResponse GetGroupWithHttpInfo(string groupId, bool? includeRoles = default(bool?)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroup"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + if (includeRoles != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "includeRoles", includeRoles)); + } + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/groups/{groupId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group by ID Returns a single Group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Include roles for the Group object. Defaults to false. (optional) + /// Cancellation Token to cancel the request. + /// Task of Group + public async System.Threading.Tasks.Task GetGroupAsync(string groupId, bool? includeRoles = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await GetGroupWithHttpInfoAsync(groupId, includeRoles, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Group by ID Returns a single Group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Include roles for the Group object. Defaults to false. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Group) + public async System.Threading.Tasks.Task> GetGroupWithHttpInfoAsync(string groupId, bool? includeRoles = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroup"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + if (includeRoles != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "includeRoles", includeRoles)); + } + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync("/groups/{groupId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// GroupAnnouncement + public GroupAnnouncement GetGroupAnnouncements(string groupId) + { + VRChat.API.Client.ApiResponse localVarResponse = GetGroupAnnouncementsWithHttpInfo(groupId); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of GroupAnnouncement + public VRChat.API.Client.ApiResponse GetGroupAnnouncementsWithHttpInfo(string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupAnnouncements"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/groups/{groupId}/announcement", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupAnnouncements", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of GroupAnnouncement + public async System.Threading.Tasks.Task GetGroupAnnouncementsAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await GetGroupAnnouncementsWithHttpInfoAsync(groupId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupAnnouncement) + public async System.Threading.Tasks.Task> GetGroupAnnouncementsWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupAnnouncements"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync("/groups/{groupId}/announcement", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupAnnouncements", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Audit Logs Returns a list of audit logs for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// The start date of the search range. (optional) + /// The end date of the search range. (optional) + /// PaginatedGroupAuditLogEntryList + public PaginatedGroupAuditLogEntryList GetGroupAuditLogs(string groupId, int? n = default(int?), int? offset = default(int?), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?)) + { + VRChat.API.Client.ApiResponse localVarResponse = GetGroupAuditLogsWithHttpInfo(groupId, n, offset, startDate, endDate); + return localVarResponse.Data; + } + + /// + /// Get Group Audit Logs Returns a list of audit logs for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// The start date of the search range. (optional) + /// The end date of the search range. (optional) + /// ApiResponse of PaginatedGroupAuditLogEntryList + public VRChat.API.Client.ApiResponse GetGroupAuditLogsWithHttpInfo(string groupId, int? n = default(int?), int? offset = default(int?), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupAuditLogs"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + if (n != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "n", n)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + if (startDate != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "startDate", startDate)); + } + if (endDate != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "endDate", endDate)); + } + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/groups/{groupId}/auditLogs", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupAuditLogs", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Audit Logs Returns a list of audit logs for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// The start date of the search range. (optional) + /// The end date of the search range. (optional) + /// Cancellation Token to cancel the request. + /// Task of PaginatedGroupAuditLogEntryList + public async System.Threading.Tasks.Task GetGroupAuditLogsAsync(string groupId, int? n = default(int?), int? offset = default(int?), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await GetGroupAuditLogsWithHttpInfoAsync(groupId, n, offset, startDate, endDate, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Group Audit Logs Returns a list of audit logs for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// The start date of the search range. (optional) + /// The end date of the search range. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PaginatedGroupAuditLogEntryList) + public async System.Threading.Tasks.Task> GetGroupAuditLogsWithHttpInfoAsync(string groupId, int? n = default(int?), int? offset = default(int?), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupAuditLogs"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + if (n != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "n", n)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + if (startDate != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "startDate", startDate)); + } + if (endDate != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "endDate", endDate)); + } + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync("/groups/{groupId}/auditLogs", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupAuditLogs", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Bans Returns a list of banned users for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// List<GroupMember> + public List GetGroupBans(string groupId, int? n = default(int?), int? offset = default(int?)) + { + VRChat.API.Client.ApiResponse> localVarResponse = GetGroupBansWithHttpInfo(groupId, n, offset); + return localVarResponse.Data; + } + + /// + /// Get Group Bans Returns a list of banned users for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// ApiResponse of List<GroupMember> + public VRChat.API.Client.ApiResponse> GetGroupBansWithHttpInfo(string groupId, int? n = default(int?), int? offset = default(int?)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupBans"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + if (n != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "n", n)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/groups/{groupId}/bans", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupBans", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Bans Returns a list of banned users for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// Cancellation Token to cancel the request. + /// Task of List<GroupMember> + public async System.Threading.Tasks.Task> GetGroupBansAsync(string groupId, int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await GetGroupBansWithHttpInfoAsync(groupId, n, offset, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Group Bans Returns a list of banned users for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupMember>) + public async System.Threading.Tasks.Task>> GetGroupBansWithHttpInfoAsync(string groupId, int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupBans"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + if (n != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "n", n)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync>("/groups/{groupId}/bans", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupBans", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Gallery Images Returns a list of images for a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// If specified, only returns images that have been approved or not approved. (optional) + /// List<GroupGalleryImage> + public List GetGroupGalleryImages(string groupId, string groupGalleryId, int? n = default(int?), int? offset = default(int?), bool? approved = default(bool?)) + { + VRChat.API.Client.ApiResponse> localVarResponse = GetGroupGalleryImagesWithHttpInfo(groupId, groupGalleryId, n, offset, approved); + return localVarResponse.Data; + } + + /// + /// Get Group Gallery Images Returns a list of images for a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// If specified, only returns images that have been approved or not approved. (optional) + /// ApiResponse of List<GroupGalleryImage> + public VRChat.API.Client.ApiResponse> GetGroupGalleryImagesWithHttpInfo(string groupId, string groupGalleryId, int? n = default(int?), int? offset = default(int?), bool? approved = default(bool?)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupGalleryImages"); + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryId' when calling GroupsApi->GetGroupGalleryImages"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryId)); // path parameter + if (n != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "n", n)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + if (approved != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "approved", approved)); + } + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/groups/{groupId}/galleries/{groupGalleryId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupGalleryImages", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Gallery Images Returns a list of images for a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// If specified, only returns images that have been approved or not approved. (optional) + /// Cancellation Token to cancel the request. + /// Task of List<GroupGalleryImage> + public async System.Threading.Tasks.Task> GetGroupGalleryImagesAsync(string groupId, string groupGalleryId, int? n = default(int?), int? offset = default(int?), bool? approved = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await GetGroupGalleryImagesWithHttpInfoAsync(groupId, groupGalleryId, n, offset, approved, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Group Gallery Images Returns a list of images for a Group gallery. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// If specified, only returns images that have been approved or not approved. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupGalleryImage>) + public async System.Threading.Tasks.Task>> GetGroupGalleryImagesWithHttpInfoAsync(string groupId, string groupGalleryId, int? n = default(int?), int? offset = default(int?), bool? approved = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupGalleryImages"); + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryId' when calling GroupsApi->GetGroupGalleryImages"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryId)); // path parameter + if (n != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "n", n)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + if (approved != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "approved", approved)); + } + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync>("/groups/{groupId}/galleries/{groupGalleryId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupGalleryImages", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Invites Sent Returns a list of members that have been invited to the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// List<GroupMember> + public List GetGroupInvites(string groupId) + { + VRChat.API.Client.ApiResponse> localVarResponse = GetGroupInvitesWithHttpInfo(groupId); + return localVarResponse.Data; + } + + /// + /// Get Group Invites Sent Returns a list of members that have been invited to the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of List<GroupMember> + public VRChat.API.Client.ApiResponse> GetGroupInvitesWithHttpInfo(string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupInvites"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/groups/{groupId}/invites", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupInvites", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Invites Sent Returns a list of members that have been invited to the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of List<GroupMember> + public async System.Threading.Tasks.Task> GetGroupInvitesAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await GetGroupInvitesWithHttpInfoAsync(groupId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Group Invites Sent Returns a list of members that have been invited to the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupMember>) + public async System.Threading.Tasks.Task>> GetGroupInvitesWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupInvites"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync>("/groups/{groupId}/invites", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupInvites", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Member Returns a LimitedGroup Member. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// GroupLimitedMember + public GroupLimitedMember GetGroupMember(string groupId, string userId) + { + VRChat.API.Client.ApiResponse localVarResponse = GetGroupMemberWithHttpInfo(groupId, userId); + return localVarResponse.Data; + } + + /// + /// Get Group Member Returns a LimitedGroup Member. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// ApiResponse of GroupLimitedMember + public VRChat.API.Client.ApiResponse GetGroupMemberWithHttpInfo(string groupId, string userId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupMember"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->GetGroupMember"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/groups/{groupId}/members/{userId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupMember", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Member Returns a LimitedGroup Member. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of GroupLimitedMember + public async System.Threading.Tasks.Task GetGroupMemberAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await GetGroupMemberWithHttpInfoAsync(groupId, userId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Group Member Returns a LimitedGroup Member. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupLimitedMember) + public async System.Threading.Tasks.Task> GetGroupMemberWithHttpInfoAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupMember"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->GetGroupMember"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync("/groups/{groupId}/members/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupMember", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// List<GroupMember> + public List GetGroupMembers(string groupId, int? n = default(int?), int? offset = default(int?)) + { + VRChat.API.Client.ApiResponse> localVarResponse = GetGroupMembersWithHttpInfo(groupId, n, offset); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// ApiResponse of List<GroupMember> + public VRChat.API.Client.ApiResponse> GetGroupMembersWithHttpInfo(string groupId, int? n = default(int?), int? offset = default(int?)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupMembers"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + if (n != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "n", n)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/groups/{groupId}/members", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupMembers", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// Cancellation Token to cancel the request. + /// Task of List<GroupMember> + public async System.Threading.Tasks.Task> GetGroupMembersAsync(string groupId, int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await GetGroupMembersWithHttpInfoAsync(groupId, n, offset, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// The number of objects to return. (optional, default to 60) + /// A zero-based offset from the default object sorting from where search results start. (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupMember>) + public async System.Threading.Tasks.Task>> GetGroupMembersWithHttpInfoAsync(string groupId, int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupMembers"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + if (n != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "n", n)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync>("/groups/{groupId}/members", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupMembers", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// List Group Permissions Returns a List of all possible/available permissions for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// List<GroupPermission> + public List GetGroupPermissions(string groupId) + { + VRChat.API.Client.ApiResponse> localVarResponse = GetGroupPermissionsWithHttpInfo(groupId); + return localVarResponse.Data; + } + + /// + /// List Group Permissions Returns a List of all possible/available permissions for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of List<GroupPermission> + public VRChat.API.Client.ApiResponse> GetGroupPermissionsWithHttpInfo(string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupPermissions"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/groups/{groupId}/permissions", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupPermissions", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// List Group Permissions Returns a List of all possible/available permissions for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of List<GroupPermission> + public async System.Threading.Tasks.Task> GetGroupPermissionsAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await GetGroupPermissionsWithHttpInfoAsync(groupId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List Group Permissions Returns a List of all possible/available permissions for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupPermission>) + public async System.Threading.Tasks.Task>> GetGroupPermissionsWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupPermissions"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync>("/groups/{groupId}/permissions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupPermissions", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Join Requests Returns a list of members that have requested to join the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// List<GroupMember> + public List GetGroupRequests(string groupId) + { + VRChat.API.Client.ApiResponse> localVarResponse = GetGroupRequestsWithHttpInfo(groupId); + return localVarResponse.Data; + } + + /// + /// Get Group Join Requests Returns a list of members that have requested to join the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of List<GroupMember> + public VRChat.API.Client.ApiResponse> GetGroupRequestsWithHttpInfo(string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupRequests"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/groups/{groupId}/requests", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupRequests", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Join Requests Returns a list of members that have requested to join the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of List<GroupMember> + public async System.Threading.Tasks.Task> GetGroupRequestsAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await GetGroupRequestsWithHttpInfoAsync(groupId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Group Join Requests Returns a list of members that have requested to join the Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupMember>) + public async System.Threading.Tasks.Task>> GetGroupRequestsWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupRequests"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync>("/groups/{groupId}/requests", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupRequests", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Roles Returns a Group Role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// List<GroupRole> + public List GetGroupRoles(string groupId) + { + VRChat.API.Client.ApiResponse> localVarResponse = GetGroupRolesWithHttpInfo(groupId); + return localVarResponse.Data; + } + + /// + /// Get Group Roles Returns a Group Role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of List<GroupRole> + public VRChat.API.Client.ApiResponse> GetGroupRolesWithHttpInfo(string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupRoles"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/groups/{groupId}/roles", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupRoles", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get Group Roles Returns a Group Role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of List<GroupRole> + public async System.Threading.Tasks.Task> GetGroupRolesAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await GetGroupRolesWithHttpInfoAsync(groupId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Group Roles Returns a Group Role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupRole>) + public async System.Threading.Tasks.Task>> GetGroupRolesWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->GetGroupRoles"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync>("/groups/{groupId}/roles", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetGroupRoles", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Join Group Join a Group by ID and returns the joined Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Group + public Group JoinGroup(string groupId) + { + VRChat.API.Client.ApiResponse localVarResponse = JoinGroupWithHttpInfo(groupId); + return localVarResponse.Data; + } + + /// + /// Join Group Join a Group by ID and returns the joined Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of Group + public VRChat.API.Client.ApiResponse JoinGroupWithHttpInfo(string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->JoinGroup"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/groups/{groupId}/join", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("JoinGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Join Group Join a Group by ID and returns the joined Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of Group + public async System.Threading.Tasks.Task JoinGroupAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await JoinGroupWithHttpInfoAsync(groupId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Join Group Join a Group by ID and returns the joined Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Group) + public async System.Threading.Tasks.Task> JoinGroupWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->JoinGroup"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/groups/{groupId}/join", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("JoinGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Kick Group Member Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// + public void KickGroupMember(string groupId, string userId) + { + KickGroupMemberWithHttpInfo(groupId, userId); + } + + /// + /// Kick Group Member Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// ApiResponse of Object(void) + public VRChat.API.Client.ApiResponse KickGroupMemberWithHttpInfo(string groupId, string userId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->KickGroupMember"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->KickGroupMember"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/groups/{groupId}/members/{userId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("KickGroupMember", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Kick Group Member Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task KickGroupMemberAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await KickGroupMemberWithHttpInfoAsync(groupId, userId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Kick Group Member Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> KickGroupMemberWithHttpInfoAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->KickGroupMember"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->KickGroupMember"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/groups/{groupId}/members/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("KickGroupMember", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Leave Group Leave a group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// + public void LeaveGroup(string groupId) + { + LeaveGroupWithHttpInfo(groupId); + } + + /// + /// Leave Group Leave a group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// ApiResponse of Object(void) + public VRChat.API.Client.ApiResponse LeaveGroupWithHttpInfo(string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->LeaveGroup"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/groups/{groupId}/leave", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("LeaveGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Leave Group Leave a group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task LeaveGroupAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await LeaveGroupWithHttpInfoAsync(groupId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Leave Group Leave a group by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> LeaveGroupWithHttpInfoAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->LeaveGroup"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/groups/{groupId}/leave", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("LeaveGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Remove Role from GroupMember Removes a Role from a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// List<string> + public List RemoveGroupMemberRole(string groupId, string userId, string groupRoleId) + { + VRChat.API.Client.ApiResponse> localVarResponse = RemoveGroupMemberRoleWithHttpInfo(groupId, userId, groupRoleId); + return localVarResponse.Data; + } + + /// + /// Remove Role from GroupMember Removes a Role from a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// ApiResponse of List<string> + public VRChat.API.Client.ApiResponse> RemoveGroupMemberRoleWithHttpInfo(string groupId, string userId, string groupRoleId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->RemoveGroupMemberRole"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->RemoveGroupMemberRole"); + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupRoleId' when calling GroupsApi->RemoveGroupMemberRole"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupRoleId", VRChat.API.Client.ClientUtils.ParameterToString(groupRoleId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete>("/groups/{groupId}/members/{userId}/roles/{groupRoleId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RemoveGroupMemberRole", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Remove Role from GroupMember Removes a Role from a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of List<string> + public async System.Threading.Tasks.Task> RemoveGroupMemberRoleAsync(string groupId, string userId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await RemoveGroupMemberRoleWithHttpInfoAsync(groupId, userId, groupRoleId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Remove Role from GroupMember Removes a Role from a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Must be a valid group role ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<string>) + public async System.Threading.Tasks.Task>> RemoveGroupMemberRoleWithHttpInfoAsync(string groupId, string userId, string groupRoleId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->RemoveGroupMemberRole"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->RemoveGroupMemberRole"); + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupRoleId' when calling GroupsApi->RemoveGroupMemberRole"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupRoleId", VRChat.API.Client.ClientUtils.ParameterToString(groupRoleId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.DeleteAsync>("/groups/{groupId}/members/{userId}/roles/{groupRoleId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RemoveGroupMemberRole", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Respond Group Join request Responds to a Group Join Request with Accept/Deny + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// + public void RespondGroupJoinRequest(string groupId, string userId, RespondGroupJoinRequest respondGroupJoinRequest = default(RespondGroupJoinRequest)) + { + RespondGroupJoinRequestWithHttpInfo(groupId, userId, respondGroupJoinRequest); + } + + /// + /// Respond Group Join request Responds to a Group Join Request with Accept/Deny + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// ApiResponse of Object(void) + public VRChat.API.Client.ApiResponse RespondGroupJoinRequestWithHttpInfo(string groupId, string userId, RespondGroupJoinRequest respondGroupJoinRequest = default(RespondGroupJoinRequest)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->RespondGroupJoinRequest"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->RespondGroupJoinRequest"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + localVarRequestOptions.Data = respondGroupJoinRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/groups/{groupId}/requests/{userId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RespondGroupJoinRequest", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Respond Group Join request Responds to a Group Join Request with Accept/Deny + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RespondGroupJoinRequestAsync(string groupId, string userId, RespondGroupJoinRequest respondGroupJoinRequest = default(RespondGroupJoinRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await RespondGroupJoinRequestWithHttpInfoAsync(groupId, userId, respondGroupJoinRequest, cancellationToken).ConfigureAwait(false); + } + + /// + /// Respond Group Join request Responds to a Group Join Request with Accept/Deny + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RespondGroupJoinRequestWithHttpInfoAsync(string groupId, string userId, RespondGroupJoinRequest respondGroupJoinRequest = default(RespondGroupJoinRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->RespondGroupJoinRequest"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->RespondGroupJoinRequest"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + localVarRequestOptions.Data = respondGroupJoinRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PutAsync("/groups/{groupId}/requests/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RespondGroupJoinRequest", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Unban Group Member Unbans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// GroupMember + public GroupMember UnbanGroupMember(string groupId, string userId) + { + VRChat.API.Client.ApiResponse localVarResponse = UnbanGroupMemberWithHttpInfo(groupId, userId); + return localVarResponse.Data; + } + + /// + /// Unban Group Member Unbans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// ApiResponse of GroupMember + public VRChat.API.Client.ApiResponse UnbanGroupMemberWithHttpInfo(string groupId, string userId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UnbanGroupMember"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->UnbanGroupMember"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/groups/{groupId}/bans/{userId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UnbanGroupMember", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Unban Group Member Unbans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of GroupMember + public async System.Threading.Tasks.Task UnbanGroupMemberAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await UnbanGroupMemberWithHttpInfoAsync(groupId, userId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Unban Group Member Unbans a user from a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupMember) + public async System.Threading.Tasks.Task> UnbanGroupMemberWithHttpInfoAsync(string groupId, string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UnbanGroupMember"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->UnbanGroupMember"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/groups/{groupId}/bans/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UnbanGroupMember", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Update Group Updates a Group and returns it. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Group + public Group UpdateGroup(string groupId, UpdateGroupRequest updateGroupRequest = default(UpdateGroupRequest)) + { + VRChat.API.Client.ApiResponse localVarResponse = UpdateGroupWithHttpInfo(groupId, updateGroupRequest); + return localVarResponse.Data; + } + + /// + /// Update Group Updates a Group and returns it. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// ApiResponse of Group + public VRChat.API.Client.ApiResponse UpdateGroupWithHttpInfo(string groupId, UpdateGroupRequest updateGroupRequest = default(UpdateGroupRequest)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UpdateGroup"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = updateGroupRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/groups/{groupId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Update Group Updates a Group and returns it. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of Group + public async System.Threading.Tasks.Task UpdateGroupAsync(string groupId, UpdateGroupRequest updateGroupRequest = default(UpdateGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await UpdateGroupWithHttpInfoAsync(groupId, updateGroupRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update Group Updates a Group and returns it. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Group) + public async System.Threading.Tasks.Task> UpdateGroupWithHttpInfoAsync(string groupId, UpdateGroupRequest updateGroupRequest = default(UpdateGroupRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UpdateGroup"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.Data = updateGroupRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PutAsync("/groups/{groupId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateGroup", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Update Group Gallery Updates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// GroupGallery + public GroupGallery UpdateGroupGallery(string groupId, string groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest = default(UpdateGroupGalleryRequest)) + { + VRChat.API.Client.ApiResponse localVarResponse = UpdateGroupGalleryWithHttpInfo(groupId, groupGalleryId, updateGroupGalleryRequest); + return localVarResponse.Data; + } + + /// + /// Update Group Gallery Updates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// ApiResponse of GroupGallery + public VRChat.API.Client.ApiResponse UpdateGroupGalleryWithHttpInfo(string groupId, string groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest = default(UpdateGroupGalleryRequest)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UpdateGroupGallery"); + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryId' when calling GroupsApi->UpdateGroupGallery"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryId)); // path parameter + localVarRequestOptions.Data = updateGroupGalleryRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/groups/{groupId}/galleries/{groupGalleryId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateGroupGallery", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Update Group Gallery Updates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupGallery + public async System.Threading.Tasks.Task UpdateGroupGalleryAsync(string groupId, string groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest = default(UpdateGroupGalleryRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await UpdateGroupGalleryWithHttpInfoAsync(groupId, groupGalleryId, updateGroupGalleryRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update Group Gallery Updates a gallery for a Group. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group gallery ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupGallery) + public async System.Threading.Tasks.Task> UpdateGroupGalleryWithHttpInfoAsync(string groupId, string groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest = default(UpdateGroupGalleryRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UpdateGroupGallery"); + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupGalleryId' when calling GroupsApi->UpdateGroupGallery"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupGalleryId", VRChat.API.Client.ClientUtils.ParameterToString(groupGalleryId)); // path parameter + localVarRequestOptions.Data = updateGroupGalleryRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PutAsync("/groups/{groupId}/galleries/{groupGalleryId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateGroupGallery", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Update Group Member Updates a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// GroupLimitedMember + public GroupLimitedMember UpdateGroupMember(string groupId, string userId, UpdateGroupMemberRequest updateGroupMemberRequest = default(UpdateGroupMemberRequest)) + { + VRChat.API.Client.ApiResponse localVarResponse = UpdateGroupMemberWithHttpInfo(groupId, userId, updateGroupMemberRequest); + return localVarResponse.Data; + } + + /// + /// Update Group Member Updates a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// ApiResponse of GroupLimitedMember + public VRChat.API.Client.ApiResponse UpdateGroupMemberWithHttpInfo(string groupId, string userId, UpdateGroupMemberRequest updateGroupMemberRequest = default(UpdateGroupMemberRequest)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UpdateGroupMember"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->UpdateGroupMember"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + localVarRequestOptions.Data = updateGroupMemberRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/groups/{groupId}/members/{userId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateGroupMember", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Update Group Member Updates a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of GroupLimitedMember + public async System.Threading.Tasks.Task UpdateGroupMemberAsync(string groupId, string userId, UpdateGroupMemberRequest updateGroupMemberRequest = default(UpdateGroupMemberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse localVarResponse = await UpdateGroupMemberWithHttpInfoAsync(groupId, userId, updateGroupMemberRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update Group Member Updates a Group Member + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid user ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (GroupLimitedMember) + public async System.Threading.Tasks.Task> UpdateGroupMemberWithHttpInfoAsync(string groupId, string userId, UpdateGroupMemberRequest updateGroupMemberRequest = default(UpdateGroupMemberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UpdateGroupMember"); + + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling GroupsApi->UpdateGroupMember"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + localVarRequestOptions.Data = updateGroupMemberRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PutAsync("/groups/{groupId}/members/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateGroupMember", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Update Group Role Updates a group role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// (optional) + /// List<GroupRole> + public List UpdateGroupRole(string groupId, string groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest = default(UpdateGroupRoleRequest)) + { + VRChat.API.Client.ApiResponse> localVarResponse = UpdateGroupRoleWithHttpInfo(groupId, groupRoleId, updateGroupRoleRequest); + return localVarResponse.Data; + } + + /// + /// Update Group Role Updates a group role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// (optional) + /// ApiResponse of List<GroupRole> + public VRChat.API.Client.ApiResponse> UpdateGroupRoleWithHttpInfo(string groupId, string groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest = default(UpdateGroupRoleRequest)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UpdateGroupRole"); + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupRoleId' when calling GroupsApi->UpdateGroupRole"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupRoleId", VRChat.API.Client.ClientUtils.ParameterToString(groupRoleId)); // path parameter + localVarRequestOptions.Data = updateGroupRoleRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Put>("/groups/{groupId}/roles/{groupRoleId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateGroupRole", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Update Group Role Updates a group role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of List<GroupRole> + public async System.Threading.Tasks.Task> UpdateGroupRoleAsync(string groupId, string groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest = default(UpdateGroupRoleRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await UpdateGroupRoleWithHttpInfoAsync(groupId, groupRoleId, updateGroupRoleRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update Group Role Updates a group role by ID. + /// + /// Thrown when fails to make API call + /// Must be a valid group ID. + /// Must be a valid group role ID. + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<GroupRole>) + public async System.Threading.Tasks.Task>> UpdateGroupRoleWithHttpInfoAsync(string groupId, string groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest = default(UpdateGroupRoleRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UpdateGroupRole"); + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'groupRoleId' when calling GroupsApi->UpdateGroupRole"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("groupId", VRChat.API.Client.ClientUtils.ParameterToString(groupId)); // path parameter + localVarRequestOptions.PathParameters.Add("groupRoleId", VRChat.API.Client.ClientUtils.ParameterToString(groupRoleId)); // path parameter + localVarRequestOptions.Data = updateGroupRoleRequest; + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PutAsync>("/groups/{groupId}/roles/{groupRoleId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateGroupRole", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + } +} diff --git a/src/VRChat.API/Api/InstancesApi.cs b/src/VRChat.API/Api/InstancesApi.cs index 746c7560..ff8c4c36 100644 --- a/src/VRChat.API/Api/InstancesApi.cs +++ b/src/VRChat.API/Api/InstancesApi.cs @@ -33,11 +33,10 @@ public interface IInstancesApiSync : IApiAccessor /// 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\"! /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Instance - Instance GetInstance(string worldId, string instanceId, int operationIndex = 0); + Instance GetInstance(string worldId, string instanceId); /// /// Get Instance @@ -46,11 +45,10 @@ public interface IInstancesApiSync : IApiAccessor /// 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\"! /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// ApiResponse of Instance - ApiResponse GetInstanceWithHttpInfo(string worldId, string instanceId, int operationIndex = 0); + ApiResponse GetInstanceWithHttpInfo(string worldId, string instanceId); /// /// Get Instance By Short Name /// @@ -58,10 +56,9 @@ public interface IInstancesApiSync : IApiAccessor /// Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid instance short name. /// Instance - Instance GetInstanceByShortName(string shortName, int operationIndex = 0); + Instance GetInstanceByShortName(string shortName); /// /// Get Instance By Short Name @@ -70,10 +67,9 @@ public interface IInstancesApiSync : IApiAccessor /// Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid instance short name. /// ApiResponse of Instance - ApiResponse GetInstanceByShortNameWithHttpInfo(string shortName, int operationIndex = 0); + ApiResponse GetInstanceByShortNameWithHttpInfo(string shortName); /// /// Get Instance Short Name /// @@ -81,11 +77,10 @@ public interface IInstancesApiSync : IApiAccessor /// Returns an instance short name. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// InstanceShortNameResponse - InstanceShortNameResponse GetShortName(string worldId, string instanceId, int operationIndex = 0); + InstanceShortNameResponse GetShortName(string worldId, string instanceId); /// /// Get Instance Short Name @@ -94,11 +89,10 @@ public interface IInstancesApiSync : IApiAccessor /// Returns an instance short name. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// ApiResponse of InstanceShortNameResponse - ApiResponse GetShortNameWithHttpInfo(string worldId, string instanceId, int operationIndex = 0); + ApiResponse GetShortNameWithHttpInfo(string worldId, string instanceId); /// /// Send Self Invite /// @@ -106,11 +100,10 @@ public interface IInstancesApiSync : IApiAccessor /// Sends an invite to the instance to yourself. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Success - Success SendSelfInvite(string worldId, string instanceId, int operationIndex = 0); + Success SendSelfInvite(string worldId, string instanceId); /// /// Send Self Invite @@ -119,11 +112,10 @@ public interface IInstancesApiSync : IApiAccessor /// Sends an invite to the instance to yourself. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// ApiResponse of Success - ApiResponse SendSelfInviteWithHttpInfo(string worldId, string instanceId, int operationIndex = 0); + ApiResponse SendSelfInviteWithHttpInfo(string worldId, string instanceId); #endregion Synchronous Operations } @@ -140,12 +132,11 @@ public interface IInstancesApiAsync : IApiAccessor /// 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\"! /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of Instance - System.Threading.Tasks.Task GetInstanceAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetInstanceAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Instance @@ -154,12 +145,11 @@ public interface IInstancesApiAsync : IApiAccessor /// 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\"! /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Instance) - System.Threading.Tasks.Task> GetInstanceWithHttpInfoAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetInstanceWithHttpInfoAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Instance By Short Name /// @@ -167,11 +157,10 @@ public interface IInstancesApiAsync : IApiAccessor /// Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid instance short name. /// Cancellation Token to cancel the request. /// Task of Instance - System.Threading.Tasks.Task GetInstanceByShortNameAsync(string shortName, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetInstanceByShortNameAsync(string shortName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Instance By Short Name @@ -180,11 +169,10 @@ public interface IInstancesApiAsync : IApiAccessor /// Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid instance short name. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Instance) - System.Threading.Tasks.Task> GetInstanceByShortNameWithHttpInfoAsync(string shortName, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetInstanceByShortNameWithHttpInfoAsync(string shortName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Instance Short Name /// @@ -192,12 +180,11 @@ public interface IInstancesApiAsync : IApiAccessor /// Returns an instance short name. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of InstanceShortNameResponse - System.Threading.Tasks.Task GetShortNameAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetShortNameAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Instance Short Name @@ -206,12 +193,11 @@ public interface IInstancesApiAsync : IApiAccessor /// Returns an instance short name. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InstanceShortNameResponse) - System.Threading.Tasks.Task> GetShortNameWithHttpInfoAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetShortNameWithHttpInfoAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Send Self Invite /// @@ -219,12 +205,11 @@ public interface IInstancesApiAsync : IApiAccessor /// Sends an invite to the instance to yourself. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task SendSelfInviteAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SendSelfInviteAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Send Self Invite @@ -233,12 +218,11 @@ public interface IInstancesApiAsync : IApiAccessor /// Sends an invite to the instance to yourself. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> SendSelfInviteWithHttpInfoAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SendSelfInviteWithHttpInfoAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -363,11 +347,10 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// 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\"! /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Instance - public Instance GetInstance(string worldId, string instanceId, int operationIndex = 0) + public Instance GetInstance(string worldId, string instanceId) { VRChat.API.Client.ApiResponse localVarResponse = GetInstanceWithHttpInfo(worldId, instanceId); return localVarResponse.Data; @@ -377,23 +360,18 @@ public Instance GetInstance(string worldId, string instanceId, int operationInde /// 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\"! /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// ApiResponse of Instance - public VRChat.API.Client.ApiResponse GetInstanceWithHttpInfo(string worldId, string instanceId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetInstanceWithHttpInfo(string worldId, string instanceId) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling InstancesApi->GetInstance"); - } // verify the required parameter 'instanceId' is set if (instanceId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'instanceId' when calling InstancesApi->GetInstance"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -406,23 +384,14 @@ public VRChat.API.Client.ApiResponse GetInstanceWithHttpInfo(string wo }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.PathParameters.Add("instanceId", VRChat.API.Client.ClientUtils.ParameterToString(instanceId)); // path parameter - localVarRequestOptions.Operation = "InstancesApi.GetInstance"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -438,13 +407,11 @@ public VRChat.API.Client.ApiResponse GetInstanceWithHttpInfo(string wo // make the HTTP request var localVarResponse = this.Client.Get("/instances/{worldId}:{instanceId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetInstance", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -454,14 +421,13 @@ public VRChat.API.Client.ApiResponse GetInstanceWithHttpInfo(string wo /// 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\"! /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of Instance - public async System.Threading.Tasks.Task GetInstanceAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetInstanceAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetInstanceWithHttpInfoAsync(worldId, instanceId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetInstanceWithHttpInfoAsync(worldId, instanceId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -469,24 +435,19 @@ public VRChat.API.Client.ApiResponse GetInstanceWithHttpInfo(string wo /// 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\"! /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Instance) - public async System.Threading.Tasks.Task> GetInstanceWithHttpInfoAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetInstanceWithHttpInfoAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling InstancesApi->GetInstance"); - } // verify the required parameter 'instanceId' is set if (instanceId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'instanceId' when calling InstancesApi->GetInstance"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -499,24 +460,16 @@ public VRChat.API.Client.ApiResponse GetInstanceWithHttpInfo(string wo "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.PathParameters.Add("instanceId", VRChat.API.Client.ClientUtils.ParameterToString(instanceId)); // path parameter - localVarRequestOptions.Operation = "InstancesApi.GetInstance"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -531,15 +484,13 @@ public VRChat.API.Client.ApiResponse GetInstanceWithHttpInfo(string wo } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/instances/{worldId}:{instanceId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetInstance", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -549,10 +500,9 @@ public VRChat.API.Client.ApiResponse GetInstanceWithHttpInfo(string wo /// Get Instance By Short Name Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid instance short name. /// Instance - public Instance GetInstanceByShortName(string shortName, int operationIndex = 0) + public Instance GetInstanceByShortName(string shortName) { VRChat.API.Client.ApiResponse localVarResponse = GetInstanceByShortNameWithHttpInfo(shortName); return localVarResponse.Data; @@ -562,16 +512,13 @@ public Instance GetInstanceByShortName(string shortName, int operationIndex = 0) /// Get Instance By Short Name Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid instance short name. /// ApiResponse of Instance - public VRChat.API.Client.ApiResponse GetInstanceByShortNameWithHttpInfo(string shortName, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetInstanceByShortNameWithHttpInfo(string shortName) { // verify the required parameter 'shortName' is set if (shortName == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'shortName' when calling InstancesApi->GetInstanceByShortName"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -584,22 +531,13 @@ public VRChat.API.Client.ApiResponse GetInstanceByShortNameWithHttpInf }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("shortName", VRChat.API.Client.ClientUtils.ParameterToString(shortName)); // path parameter - localVarRequestOptions.Operation = "InstancesApi.GetInstanceByShortName"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -615,13 +553,11 @@ public VRChat.API.Client.ApiResponse GetInstanceByShortNameWithHttpInf // make the HTTP request var localVarResponse = this.Client.Get("/instances/s/{shortName}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetInstanceByShortName", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -631,13 +567,12 @@ public VRChat.API.Client.ApiResponse GetInstanceByShortNameWithHttpInf /// Get Instance By Short Name Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid instance short name. /// Cancellation Token to cancel the request. /// Task of Instance - public async System.Threading.Tasks.Task GetInstanceByShortNameAsync(string shortName, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetInstanceByShortNameAsync(string shortName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetInstanceByShortNameWithHttpInfoAsync(shortName, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetInstanceByShortNameWithHttpInfoAsync(shortName, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -645,17 +580,14 @@ public VRChat.API.Client.ApiResponse GetInstanceByShortNameWithHttpInf /// Get Instance By Short Name Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid instance short name. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Instance) - public async System.Threading.Tasks.Task> GetInstanceByShortNameWithHttpInfoAsync(string shortName, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetInstanceByShortNameWithHttpInfoAsync(string shortName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'shortName' is set if (shortName == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'shortName' when calling InstancesApi->GetInstanceByShortName"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -668,23 +600,15 @@ public VRChat.API.Client.ApiResponse GetInstanceByShortNameWithHttpInf "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("shortName", VRChat.API.Client.ClientUtils.ParameterToString(shortName)); // path parameter - localVarRequestOptions.Operation = "InstancesApi.GetInstanceByShortName"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -699,15 +623,13 @@ public VRChat.API.Client.ApiResponse GetInstanceByShortNameWithHttpInf } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/instances/s/{shortName}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetInstanceByShortName", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -717,11 +639,10 @@ public VRChat.API.Client.ApiResponse GetInstanceByShortNameWithHttpInf /// Get Instance Short Name Returns an instance short name. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// InstanceShortNameResponse - public InstanceShortNameResponse GetShortName(string worldId, string instanceId, int operationIndex = 0) + public InstanceShortNameResponse GetShortName(string worldId, string instanceId) { VRChat.API.Client.ApiResponse localVarResponse = GetShortNameWithHttpInfo(worldId, instanceId); return localVarResponse.Data; @@ -731,23 +652,18 @@ public InstanceShortNameResponse GetShortName(string worldId, string instanceId, /// Get Instance Short Name Returns an instance short name. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// ApiResponse of InstanceShortNameResponse - public VRChat.API.Client.ApiResponse GetShortNameWithHttpInfo(string worldId, string instanceId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetShortNameWithHttpInfo(string worldId, string instanceId) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling InstancesApi->GetShortName"); - } // verify the required parameter 'instanceId' is set if (instanceId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'instanceId' when calling InstancesApi->GetShortName"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -761,23 +677,14 @@ public VRChat.API.Client.ApiResponse GetShortNameWith }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.PathParameters.Add("instanceId", VRChat.API.Client.ClientUtils.ParameterToString(instanceId)); // path parameter - localVarRequestOptions.Operation = "InstancesApi.GetShortName"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -793,13 +700,11 @@ public VRChat.API.Client.ApiResponse GetShortNameWith // make the HTTP request var localVarResponse = this.Client.Get("/instances/{worldId}:{instanceId}/shortName", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetShortName", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -809,14 +714,13 @@ public VRChat.API.Client.ApiResponse GetShortNameWith /// Get Instance Short Name Returns an instance short name. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of InstanceShortNameResponse - public async System.Threading.Tasks.Task GetShortNameAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetShortNameAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetShortNameWithHttpInfoAsync(worldId, instanceId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetShortNameWithHttpInfoAsync(worldId, instanceId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -824,24 +728,19 @@ public VRChat.API.Client.ApiResponse GetShortNameWith /// Get Instance Short Name Returns an instance short name. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InstanceShortNameResponse) - public async System.Threading.Tasks.Task> GetShortNameWithHttpInfoAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetShortNameWithHttpInfoAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling InstancesApi->GetShortName"); - } // verify the required parameter 'instanceId' is set if (instanceId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'instanceId' when calling InstancesApi->GetShortName"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -855,24 +754,16 @@ public VRChat.API.Client.ApiResponse GetShortNameWith "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.PathParameters.Add("instanceId", VRChat.API.Client.ClientUtils.ParameterToString(instanceId)); // path parameter - localVarRequestOptions.Operation = "InstancesApi.GetShortName"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -887,15 +778,13 @@ public VRChat.API.Client.ApiResponse GetShortNameWith } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/instances/{worldId}:{instanceId}/shortName", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetShortName", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -905,11 +794,10 @@ public VRChat.API.Client.ApiResponse GetShortNameWith /// Send Self Invite Sends an invite to the instance to yourself. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Success - public Success SendSelfInvite(string worldId, string instanceId, int operationIndex = 0) + public Success SendSelfInvite(string worldId, string instanceId) { VRChat.API.Client.ApiResponse localVarResponse = SendSelfInviteWithHttpInfo(worldId, instanceId); return localVarResponse.Data; @@ -919,23 +807,18 @@ public Success SendSelfInvite(string worldId, string instanceId, int operationIn /// Send Self Invite Sends an invite to the instance to yourself. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse SendSelfInviteWithHttpInfo(string worldId, string instanceId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse SendSelfInviteWithHttpInfo(string worldId, string instanceId) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling InstancesApi->SendSelfInvite"); - } // verify the required parameter 'instanceId' is set if (instanceId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'instanceId' when calling InstancesApi->SendSelfInvite"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -948,23 +831,14 @@ public VRChat.API.Client.ApiResponse SendSelfInviteWithHttpInfo(string }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.PathParameters.Add("instanceId", VRChat.API.Client.ClientUtils.ParameterToString(instanceId)); // path parameter - localVarRequestOptions.Operation = "InstancesApi.SendSelfInvite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -980,13 +854,11 @@ public VRChat.API.Client.ApiResponse SendSelfInviteWithHttpInfo(string // make the HTTP request var localVarResponse = this.Client.Post("/instances/{worldId}:{instanceId}/invite", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SendSelfInvite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -996,14 +868,13 @@ public VRChat.API.Client.ApiResponse SendSelfInviteWithHttpInfo(string /// Send Self Invite Sends an invite to the instance to yourself. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task SendSelfInviteAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SendSelfInviteAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await SendSelfInviteWithHttpInfoAsync(worldId, instanceId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await SendSelfInviteWithHttpInfoAsync(worldId, instanceId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1011,24 +882,19 @@ public VRChat.API.Client.ApiResponse SendSelfInviteWithHttpInfo(string /// Send Self Invite Sends an invite to the instance to yourself. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> SendSelfInviteWithHttpInfoAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SendSelfInviteWithHttpInfoAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling InstancesApi->SendSelfInvite"); - } // verify the required parameter 'instanceId' is set if (instanceId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'instanceId' when calling InstancesApi->SendSelfInvite"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1041,24 +907,16 @@ public VRChat.API.Client.ApiResponse SendSelfInviteWithHttpInfo(string "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.PathParameters.Add("instanceId", VRChat.API.Client.ClientUtils.ParameterToString(instanceId)); // path parameter - localVarRequestOptions.Operation = "InstancesApi.SendSelfInvite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1073,15 +931,13 @@ public VRChat.API.Client.ApiResponse SendSelfInviteWithHttpInfo(string } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/instances/{worldId}:{instanceId}/invite", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SendSelfInvite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/InviteApi.cs b/src/VRChat.API/Api/InviteApi.cs index c5381637..8cf543c0 100644 --- a/src/VRChat.API/Api/InviteApi.cs +++ b/src/VRChat.API/Api/InviteApi.cs @@ -33,12 +33,11 @@ public interface IInviteApiSync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// InviteMessage - InviteMessage GetInviteMessage(string userId, string messageType, int slot, int operationIndex = 0); + InviteMessage GetInviteMessage(string userId, InviteMessageType messageType, int slot); /// /// Get Invite Message @@ -47,12 +46,11 @@ public interface IInviteApiSync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// ApiResponse of InviteMessage - ApiResponse GetInviteMessageWithHttpInfo(string userId, string messageType, int slot, int operationIndex = 0); + ApiResponse GetInviteMessageWithHttpInfo(string userId, InviteMessageType messageType, int slot); /// /// List Invite Messages /// @@ -60,11 +58,10 @@ public interface IInviteApiSync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. /// List<InviteMessage> - List GetInviteMessages(string userId, string messageType, int operationIndex = 0); + List GetInviteMessages(string userId, InviteMessageType messageType); /// /// List Invite Messages @@ -73,11 +70,10 @@ public interface IInviteApiSync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. /// ApiResponse of List<InviteMessage> - ApiResponse> GetInviteMessagesWithHttpInfo(string userId, string messageType, int operationIndex = 0); + ApiResponse> GetInviteMessagesWithHttpInfo(string userId, InviteMessageType messageType); /// /// Invite Myself To Instance /// @@ -85,11 +81,10 @@ public interface IInviteApiSync : IApiAccessor /// Sends self an invite to an instance /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// SentNotification - SentNotification InviteMyselfTo(string worldId, string instanceId, int operationIndex = 0); + SentNotification InviteMyselfTo(string worldId, string instanceId); /// /// Invite Myself To Instance @@ -98,11 +93,10 @@ public interface IInviteApiSync : IApiAccessor /// Sends self an invite to an instance /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// ApiResponse of SentNotification - ApiResponse InviteMyselfToWithHttpInfo(string worldId, string instanceId, int operationIndex = 0); + ApiResponse InviteMyselfToWithHttpInfo(string worldId, string instanceId); /// /// Invite User /// @@ -110,11 +104,10 @@ public interface IInviteApiSync : IApiAccessor /// Sends an invite to a user. Returns the Notification of type `invite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Invite Message to use when inviting a user. (optional) - /// Index associated with the operation. /// SentNotification - SentNotification InviteUser(string userId, InviteRequest inviteRequest = default(InviteRequest), int operationIndex = 0); + SentNotification InviteUser(string userId, InviteRequest inviteRequest = default(InviteRequest)); /// /// Invite User @@ -123,11 +116,10 @@ public interface IInviteApiSync : IApiAccessor /// Sends an invite to a user. Returns the Notification of type `invite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Invite Message to use when inviting a user. (optional) - /// Index associated with the operation. /// ApiResponse of SentNotification - ApiResponse InviteUserWithHttpInfo(string userId, InviteRequest inviteRequest = default(InviteRequest), int operationIndex = 0); + ApiResponse InviteUserWithHttpInfo(string userId, InviteRequest inviteRequest = default(InviteRequest)); /// /// Request Invite /// @@ -135,11 +127,10 @@ public interface IInviteApiSync : IApiAccessor /// Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Request Message to use when request an invite. (optional) - /// Index associated with the operation. /// Notification - Notification RequestInvite(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), int operationIndex = 0); + Notification RequestInvite(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest)); /// /// Request Invite @@ -148,11 +139,10 @@ public interface IInviteApiSync : IApiAccessor /// Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Request Message to use when request an invite. (optional) - /// Index associated with the operation. /// ApiResponse of Notification - ApiResponse RequestInviteWithHttpInfo(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), int operationIndex = 0); + ApiResponse RequestInviteWithHttpInfo(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest)); /// /// Reset Invite Message /// @@ -160,12 +150,11 @@ public interface IInviteApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// List<InviteMessage> - List ResetInviteMessage(string userId, string messageType, int slot, int operationIndex = 0); + List ResetInviteMessage(string userId, InviteMessageType messageType, int slot); /// /// Reset Invite Message @@ -174,12 +163,11 @@ public interface IInviteApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// ApiResponse of List<InviteMessage> - ApiResponse> ResetInviteMessageWithHttpInfo(string userId, string messageType, int slot, int operationIndex = 0); + ApiResponse> ResetInviteMessageWithHttpInfo(string userId, InviteMessageType messageType, int slot); /// /// Respond Invite /// @@ -187,11 +175,10 @@ public interface IInviteApiSync : IApiAccessor /// Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. /// /// Thrown when fails to make API call - /// + /// Must be a valid notification ID. /// Slot number of the Response Message to use when responding to a user. (optional) - /// Index associated with the operation. /// Notification - Notification RespondInvite(string notificationId, InviteResponse inviteResponse = default(InviteResponse), int operationIndex = 0); + Notification RespondInvite(string notificationId, InviteResponse inviteResponse = default(InviteResponse)); /// /// Respond Invite @@ -200,11 +187,10 @@ public interface IInviteApiSync : IApiAccessor /// Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. /// /// Thrown when fails to make API call - /// + /// Must be a valid notification ID. /// Slot number of the Response Message to use when responding to a user. (optional) - /// Index associated with the operation. /// ApiResponse of Notification - ApiResponse RespondInviteWithHttpInfo(string notificationId, InviteResponse inviteResponse = default(InviteResponse), int operationIndex = 0); + ApiResponse RespondInviteWithHttpInfo(string notificationId, InviteResponse inviteResponse = default(InviteResponse)); /// /// Update Invite Message /// @@ -212,13 +198,12 @@ public interface IInviteApiSync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Message of what to set the invite message to. (optional) - /// Index associated with the operation. /// List<InviteMessage> - List UpdateInviteMessage(string userId, string messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), int operationIndex = 0); + List UpdateInviteMessage(string userId, InviteMessageType messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest)); /// /// Update Invite Message @@ -227,13 +212,12 @@ public interface IInviteApiSync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Message of what to set the invite message to. (optional) - /// Index associated with the operation. /// ApiResponse of List<InviteMessage> - ApiResponse> UpdateInviteMessageWithHttpInfo(string userId, string messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), int operationIndex = 0); + ApiResponse> UpdateInviteMessageWithHttpInfo(string userId, InviteMessageType messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest)); #endregion Synchronous Operations } @@ -250,13 +234,12 @@ public interface IInviteApiAsync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Cancellation Token to cancel the request. /// Task of InviteMessage - System.Threading.Tasks.Task GetInviteMessageAsync(string userId, string messageType, int slot, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetInviteMessageAsync(string userId, InviteMessageType messageType, int slot, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Invite Message @@ -265,13 +248,12 @@ public interface IInviteApiAsync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InviteMessage) - System.Threading.Tasks.Task> GetInviteMessageWithHttpInfoAsync(string userId, string messageType, int slot, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetInviteMessageWithHttpInfoAsync(string userId, InviteMessageType messageType, int slot, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Invite Messages /// @@ -279,12 +261,11 @@ public interface IInviteApiAsync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. /// Cancellation Token to cancel the request. /// Task of List<InviteMessage> - System.Threading.Tasks.Task> GetInviteMessagesAsync(string userId, string messageType, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetInviteMessagesAsync(string userId, InviteMessageType messageType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Invite Messages @@ -293,12 +274,11 @@ public interface IInviteApiAsync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<InviteMessage>) - System.Threading.Tasks.Task>> GetInviteMessagesWithHttpInfoAsync(string userId, string messageType, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetInviteMessagesWithHttpInfoAsync(string userId, InviteMessageType messageType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Invite Myself To Instance /// @@ -306,12 +286,11 @@ public interface IInviteApiAsync : IApiAccessor /// Sends self an invite to an instance /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of SentNotification - System.Threading.Tasks.Task InviteMyselfToAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task InviteMyselfToAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Invite Myself To Instance @@ -320,12 +299,11 @@ public interface IInviteApiAsync : IApiAccessor /// Sends self an invite to an instance /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SentNotification) - System.Threading.Tasks.Task> InviteMyselfToWithHttpInfoAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> InviteMyselfToWithHttpInfoAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Invite User /// @@ -333,12 +311,11 @@ public interface IInviteApiAsync : IApiAccessor /// Sends an invite to a user. Returns the Notification of type `invite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Invite Message to use when inviting a user. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SentNotification - System.Threading.Tasks.Task InviteUserAsync(string userId, InviteRequest inviteRequest = default(InviteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task InviteUserAsync(string userId, InviteRequest inviteRequest = default(InviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Invite User @@ -347,12 +324,11 @@ public interface IInviteApiAsync : IApiAccessor /// Sends an invite to a user. Returns the Notification of type `invite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Invite Message to use when inviting a user. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SentNotification) - System.Threading.Tasks.Task> InviteUserWithHttpInfoAsync(string userId, InviteRequest inviteRequest = default(InviteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> InviteUserWithHttpInfoAsync(string userId, InviteRequest inviteRequest = default(InviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Request Invite /// @@ -360,12 +336,11 @@ public interface IInviteApiAsync : IApiAccessor /// Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Request Message to use when request an invite. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Notification - System.Threading.Tasks.Task RequestInviteAsync(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RequestInviteAsync(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Request Invite @@ -374,12 +349,11 @@ public interface IInviteApiAsync : IApiAccessor /// Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Request Message to use when request an invite. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Notification) - System.Threading.Tasks.Task> RequestInviteWithHttpInfoAsync(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RequestInviteWithHttpInfoAsync(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Reset Invite Message /// @@ -387,13 +361,12 @@ public interface IInviteApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Cancellation Token to cancel the request. /// Task of List<InviteMessage> - System.Threading.Tasks.Task> ResetInviteMessageAsync(string userId, string messageType, int slot, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ResetInviteMessageAsync(string userId, InviteMessageType messageType, int slot, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Reset Invite Message @@ -402,13 +375,12 @@ public interface IInviteApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<InviteMessage>) - System.Threading.Tasks.Task>> ResetInviteMessageWithHttpInfoAsync(string userId, string messageType, int slot, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ResetInviteMessageWithHttpInfoAsync(string userId, InviteMessageType messageType, int slot, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Respond Invite /// @@ -416,12 +388,11 @@ public interface IInviteApiAsync : IApiAccessor /// Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. /// /// Thrown when fails to make API call - /// + /// Must be a valid notification ID. /// Slot number of the Response Message to use when responding to a user. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Notification - System.Threading.Tasks.Task RespondInviteAsync(string notificationId, InviteResponse inviteResponse = default(InviteResponse), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RespondInviteAsync(string notificationId, InviteResponse inviteResponse = default(InviteResponse), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Respond Invite @@ -430,12 +401,11 @@ public interface IInviteApiAsync : IApiAccessor /// Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. /// /// Thrown when fails to make API call - /// + /// Must be a valid notification ID. /// Slot number of the Response Message to use when responding to a user. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Notification) - System.Threading.Tasks.Task> RespondInviteWithHttpInfoAsync(string notificationId, InviteResponse inviteResponse = default(InviteResponse), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RespondInviteWithHttpInfoAsync(string notificationId, InviteResponse inviteResponse = default(InviteResponse), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Invite Message /// @@ -443,14 +413,13 @@ public interface IInviteApiAsync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Message of what to set the invite message to. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<InviteMessage> - System.Threading.Tasks.Task> UpdateInviteMessageAsync(string userId, string messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateInviteMessageAsync(string userId, InviteMessageType messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Invite Message @@ -459,14 +428,13 @@ public interface IInviteApiAsync : IApiAccessor /// 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 /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Message of what to set the invite message to. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<InviteMessage>) - System.Threading.Tasks.Task>> UpdateInviteMessageWithHttpInfoAsync(string userId, string messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> UpdateInviteMessageWithHttpInfoAsync(string userId, InviteMessageType messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -591,12 +559,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// 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 /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// InviteMessage - public InviteMessage GetInviteMessage(string userId, string messageType, int slot, int operationIndex = 0) + public InviteMessage GetInviteMessage(string userId, InviteMessageType messageType, int slot) { VRChat.API.Client.ApiResponse localVarResponse = GetInviteMessageWithHttpInfo(userId, messageType, slot); return localVarResponse.Data; @@ -606,24 +573,15 @@ public InviteMessage GetInviteMessage(string userId, string messageType, int slo /// 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 /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// ApiResponse of InviteMessage - public VRChat.API.Client.ApiResponse GetInviteMessageWithHttpInfo(string userId, string messageType, int slot, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetInviteMessageWithHttpInfo(string userId, InviteMessageType messageType, int slot) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->GetInviteMessage"); - } - - // verify the required parameter 'messageType' is set - if (messageType == null) - { - throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'messageType' when calling InviteApi->GetInviteMessage"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -636,24 +594,15 @@ public VRChat.API.Client.ApiResponse GetInviteMessageWithHttpInfo }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.PathParameters.Add("messageType", VRChat.API.Client.ClientUtils.ParameterToString(messageType)); // path parameter localVarRequestOptions.PathParameters.Add("slot", VRChat.API.Client.ClientUtils.ParameterToString(slot)); // path parameter - localVarRequestOptions.Operation = "InviteApi.GetInviteMessage"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -669,13 +618,11 @@ public VRChat.API.Client.ApiResponse GetInviteMessageWithHttpInfo // make the HTTP request var localVarResponse = this.Client.Get("/message/{userId}/{messageType}/{slot}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetInviteMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -685,15 +632,14 @@ public VRChat.API.Client.ApiResponse GetInviteMessageWithHttpInfo /// 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 /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Cancellation Token to cancel the request. /// Task of InviteMessage - public async System.Threading.Tasks.Task GetInviteMessageAsync(string userId, string messageType, int slot, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetInviteMessageAsync(string userId, InviteMessageType messageType, int slot, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetInviteMessageWithHttpInfoAsync(userId, messageType, slot, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetInviteMessageWithHttpInfoAsync(userId, messageType, slot, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -701,25 +647,16 @@ public VRChat.API.Client.ApiResponse GetInviteMessageWithHttpInfo /// 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 /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Cancellation Token to cancel the request. /// Task of ApiResponse (InviteMessage) - public async System.Threading.Tasks.Task> GetInviteMessageWithHttpInfoAsync(string userId, string messageType, int slot, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetInviteMessageWithHttpInfoAsync(string userId, InviteMessageType messageType, int slot, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->GetInviteMessage"); - } - - // verify the required parameter 'messageType' is set - if (messageType == null) - { - throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'messageType' when calling InviteApi->GetInviteMessage"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -732,25 +669,17 @@ public VRChat.API.Client.ApiResponse GetInviteMessageWithHttpInfo "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.PathParameters.Add("messageType", VRChat.API.Client.ClientUtils.ParameterToString(messageType)); // path parameter localVarRequestOptions.PathParameters.Add("slot", VRChat.API.Client.ClientUtils.ParameterToString(slot)); // path parameter - localVarRequestOptions.Operation = "InviteApi.GetInviteMessage"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -765,15 +694,13 @@ public VRChat.API.Client.ApiResponse GetInviteMessageWithHttpInfo } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/message/{userId}/{messageType}/{slot}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetInviteMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -783,11 +710,10 @@ public VRChat.API.Client.ApiResponse GetInviteMessageWithHttpInfo /// 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 /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. /// List<InviteMessage> - public List GetInviteMessages(string userId, string messageType, int operationIndex = 0) + public List GetInviteMessages(string userId, InviteMessageType messageType) { VRChat.API.Client.ApiResponse> localVarResponse = GetInviteMessagesWithHttpInfo(userId, messageType); return localVarResponse.Data; @@ -797,23 +723,14 @@ 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 /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. /// ApiResponse of List<InviteMessage> - public VRChat.API.Client.ApiResponse> GetInviteMessagesWithHttpInfo(string userId, string messageType, int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetInviteMessagesWithHttpInfo(string userId, InviteMessageType messageType) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->GetInviteMessages"); - } - - // verify the required parameter 'messageType' is set - if (messageType == null) - { - throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'messageType' when calling InviteApi->GetInviteMessages"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -826,23 +743,14 @@ public VRChat.API.Client.ApiResponse> GetInviteMessagesWithH }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.PathParameters.Add("messageType", VRChat.API.Client.ClientUtils.ParameterToString(messageType)); // path parameter - localVarRequestOptions.Operation = "InviteApi.GetInviteMessages"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -858,13 +766,11 @@ public VRChat.API.Client.ApiResponse> GetInviteMessagesWithH // make the HTTP request var localVarResponse = this.Client.Get>("/message/{userId}/{messageType}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetInviteMessages", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -874,14 +780,13 @@ public VRChat.API.Client.ApiResponse> GetInviteMessagesWithH /// 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 /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. /// Cancellation Token to cancel the request. /// Task of List<InviteMessage> - public async System.Threading.Tasks.Task> GetInviteMessagesAsync(string userId, string messageType, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetInviteMessagesAsync(string userId, InviteMessageType messageType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetInviteMessagesWithHttpInfoAsync(userId, messageType, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetInviteMessagesWithHttpInfoAsync(userId, messageType, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -889,24 +794,15 @@ public VRChat.API.Client.ApiResponse> GetInviteMessagesWithH /// 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 /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<InviteMessage>) - public async System.Threading.Tasks.Task>> GetInviteMessagesWithHttpInfoAsync(string userId, string messageType, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetInviteMessagesWithHttpInfoAsync(string userId, InviteMessageType messageType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->GetInviteMessages"); - } - - // verify the required parameter 'messageType' is set - if (messageType == null) - { - throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'messageType' when calling InviteApi->GetInviteMessages"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -919,24 +815,16 @@ public VRChat.API.Client.ApiResponse> GetInviteMessagesWithH "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.PathParameters.Add("messageType", VRChat.API.Client.ClientUtils.ParameterToString(messageType)); // path parameter - localVarRequestOptions.Operation = "InviteApi.GetInviteMessages"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -951,15 +839,13 @@ public VRChat.API.Client.ApiResponse> GetInviteMessagesWithH } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/message/{userId}/{messageType}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetInviteMessages", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -969,11 +855,10 @@ public VRChat.API.Client.ApiResponse> GetInviteMessagesWithH /// Invite Myself To Instance Sends self an invite to an instance /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// SentNotification - public SentNotification InviteMyselfTo(string worldId, string instanceId, int operationIndex = 0) + public SentNotification InviteMyselfTo(string worldId, string instanceId) { VRChat.API.Client.ApiResponse localVarResponse = InviteMyselfToWithHttpInfo(worldId, instanceId); return localVarResponse.Data; @@ -983,23 +868,18 @@ public SentNotification InviteMyselfTo(string worldId, string instanceId, int op /// Invite Myself To Instance Sends self an invite to an instance /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// ApiResponse of SentNotification - public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInfo(string worldId, string instanceId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInfo(string worldId, string instanceId) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling InviteApi->InviteMyselfTo"); - } // verify the required parameter 'instanceId' is set if (instanceId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'instanceId' when calling InviteApi->InviteMyselfTo"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1012,23 +892,14 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.PathParameters.Add("instanceId", VRChat.API.Client.ClientUtils.ParameterToString(instanceId)); // path parameter - localVarRequestOptions.Operation = "InviteApi.InviteMyselfTo"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1044,13 +915,11 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf // make the HTTP request var localVarResponse = this.Client.Post("/invite/myself/to/{worldId}:{instanceId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("InviteMyselfTo", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1060,14 +929,13 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf /// Invite Myself To Instance Sends self an invite to an instance /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of SentNotification - public async System.Threading.Tasks.Task InviteMyselfToAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task InviteMyselfToAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await InviteMyselfToWithHttpInfoAsync(worldId, instanceId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await InviteMyselfToWithHttpInfoAsync(worldId, instanceId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1075,24 +943,19 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf /// Invite Myself To Instance Sends self an invite to an instance /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SentNotification) - public async System.Threading.Tasks.Task> InviteMyselfToWithHttpInfoAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> InviteMyselfToWithHttpInfoAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling InviteApi->InviteMyselfTo"); - } // verify the required parameter 'instanceId' is set if (instanceId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'instanceId' when calling InviteApi->InviteMyselfTo"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1105,24 +968,16 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.PathParameters.Add("instanceId", VRChat.API.Client.ClientUtils.ParameterToString(instanceId)); // path parameter - localVarRequestOptions.Operation = "InviteApi.InviteMyselfTo"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1137,15 +992,13 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/invite/myself/to/{worldId}:{instanceId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("InviteMyselfTo", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1155,11 +1008,10 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf /// Invite User Sends an invite to a user. Returns the Notification of type `invite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Invite Message to use when inviting a user. (optional) - /// Index associated with the operation. /// SentNotification - public SentNotification InviteUser(string userId, InviteRequest inviteRequest = default(InviteRequest), int operationIndex = 0) + public SentNotification InviteUser(string userId, InviteRequest inviteRequest = default(InviteRequest)) { VRChat.API.Client.ApiResponse localVarResponse = InviteUserWithHttpInfo(userId, inviteRequest); return localVarResponse.Data; @@ -1169,17 +1021,14 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf /// Invite User Sends an invite to a user. Returns the Notification of type `invite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Invite Message to use when inviting a user. (optional) - /// Index associated with the operation. /// ApiResponse of SentNotification - public VRChat.API.Client.ApiResponse InviteUserWithHttpInfo(string userId, InviteRequest inviteRequest = default(InviteRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse InviteUserWithHttpInfo(string userId, InviteRequest inviteRequest = default(InviteRequest)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->InviteUser"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1193,23 +1042,14 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.Data = inviteRequest; - localVarRequestOptions.Operation = "InviteApi.InviteUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1225,13 +1065,11 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf // make the HTTP request var localVarResponse = this.Client.Post("/invite/{userId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("InviteUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1241,14 +1079,13 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf /// Invite User Sends an invite to a user. Returns the Notification of type `invite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Invite Message to use when inviting a user. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of SentNotification - public async System.Threading.Tasks.Task InviteUserAsync(string userId, InviteRequest inviteRequest = default(InviteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task InviteUserAsync(string userId, InviteRequest inviteRequest = default(InviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await InviteUserWithHttpInfoAsync(userId, inviteRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await InviteUserWithHttpInfoAsync(userId, inviteRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1256,18 +1093,15 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf /// Invite User Sends an invite to a user. Returns the Notification of type `invite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Invite Message to use when inviting a user. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (SentNotification) - public async System.Threading.Tasks.Task> InviteUserWithHttpInfoAsync(string userId, InviteRequest inviteRequest = default(InviteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> InviteUserWithHttpInfoAsync(string userId, InviteRequest inviteRequest = default(InviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->InviteUser"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1281,24 +1115,16 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.Data = inviteRequest; - localVarRequestOptions.Operation = "InviteApi.InviteUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1313,15 +1139,13 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/invite/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("InviteUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1331,11 +1155,10 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf /// Request Invite Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Request Message to use when request an invite. (optional) - /// Index associated with the operation. /// Notification - public Notification RequestInvite(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), int operationIndex = 0) + public Notification RequestInvite(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest)) { VRChat.API.Client.ApiResponse localVarResponse = RequestInviteWithHttpInfo(userId, requestInviteRequest); return localVarResponse.Data; @@ -1345,17 +1168,14 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf /// Request Invite Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Request Message to use when request an invite. (optional) - /// Index associated with the operation. /// ApiResponse of Notification - public VRChat.API.Client.ApiResponse RequestInviteWithHttpInfo(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse RequestInviteWithHttpInfo(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->RequestInvite"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1369,23 +1189,14 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.Data = requestInviteRequest; - localVarRequestOptions.Operation = "InviteApi.RequestInvite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1401,13 +1212,11 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf // make the HTTP request var localVarResponse = this.Client.Post("/requestInvite/{userId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("RequestInvite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1417,14 +1226,13 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf /// Request Invite Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Request Message to use when request an invite. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Notification - public async System.Threading.Tasks.Task RequestInviteAsync(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task RequestInviteAsync(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await RequestInviteWithHttpInfoAsync(userId, requestInviteRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await RequestInviteWithHttpInfoAsync(userId, requestInviteRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1432,18 +1240,15 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf /// Request Invite Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// Slot number of the Request Message to use when request an invite. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Notification) - public async System.Threading.Tasks.Task> RequestInviteWithHttpInfoAsync(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> RequestInviteWithHttpInfoAsync(string userId, RequestInviteRequest requestInviteRequest = default(RequestInviteRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->RequestInvite"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1457,24 +1262,16 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.Data = requestInviteRequest; - localVarRequestOptions.Operation = "InviteApi.RequestInvite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1489,15 +1286,13 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/requestInvite/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("RequestInvite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1507,12 +1302,11 @@ public VRChat.API.Client.ApiResponse InviteMyselfToWithHttpInf /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// List<InviteMessage> - public List ResetInviteMessage(string userId, string messageType, int slot, int operationIndex = 0) + public List ResetInviteMessage(string userId, InviteMessageType messageType, int slot) { VRChat.API.Client.ApiResponse> localVarResponse = ResetInviteMessageWithHttpInfo(userId, messageType, slot); return localVarResponse.Data; @@ -1522,24 +1316,15 @@ 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// ApiResponse of List<InviteMessage> - public VRChat.API.Client.ApiResponse> ResetInviteMessageWithHttpInfo(string userId, string messageType, int slot, int operationIndex = 0) + public VRChat.API.Client.ApiResponse> ResetInviteMessageWithHttpInfo(string userId, InviteMessageType messageType, int slot) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->ResetInviteMessage"); - } - - // verify the required parameter 'messageType' is set - if (messageType == null) - { - throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'messageType' when calling InviteApi->ResetInviteMessage"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1552,24 +1337,15 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.PathParameters.Add("messageType", VRChat.API.Client.ClientUtils.ParameterToString(messageType)); // path parameter localVarRequestOptions.PathParameters.Add("slot", VRChat.API.Client.ClientUtils.ParameterToString(slot)); // path parameter - localVarRequestOptions.Operation = "InviteApi.ResetInviteMessage"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1585,13 +1361,11 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith // make the HTTP request var localVarResponse = this.Client.Delete>("/message/{userId}/{messageType}/{slot}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ResetInviteMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1601,15 +1375,14 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Cancellation Token to cancel the request. /// Task of List<InviteMessage> - public async System.Threading.Tasks.Task> ResetInviteMessageAsync(string userId, string messageType, int slot, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ResetInviteMessageAsync(string userId, InviteMessageType messageType, int slot, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await ResetInviteMessageWithHttpInfoAsync(userId, messageType, slot, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await ResetInviteMessageWithHttpInfoAsync(userId, messageType, slot, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1617,25 +1390,16 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith /// 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. /// /// Thrown when fails to make API call - /// - /// - /// - /// Index associated with the operation. + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<InviteMessage>) - public async System.Threading.Tasks.Task>> ResetInviteMessageWithHttpInfoAsync(string userId, string messageType, int slot, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ResetInviteMessageWithHttpInfoAsync(string userId, InviteMessageType messageType, int slot, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->ResetInviteMessage"); - } - - // verify the required parameter 'messageType' is set - if (messageType == null) - { - throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'messageType' when calling InviteApi->ResetInviteMessage"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1648,25 +1412,17 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.PathParameters.Add("messageType", VRChat.API.Client.ClientUtils.ParameterToString(messageType)); // path parameter localVarRequestOptions.PathParameters.Add("slot", VRChat.API.Client.ClientUtils.ParameterToString(slot)); // path parameter - localVarRequestOptions.Operation = "InviteApi.ResetInviteMessage"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1681,15 +1437,13 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync>("/message/{userId}/{messageType}/{slot}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ResetInviteMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1699,11 +1453,10 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith /// Respond Invite Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. /// /// Thrown when fails to make API call - /// + /// Must be a valid notification ID. /// Slot number of the Response Message to use when responding to a user. (optional) - /// Index associated with the operation. /// Notification - public Notification RespondInvite(string notificationId, InviteResponse inviteResponse = default(InviteResponse), int operationIndex = 0) + public Notification RespondInvite(string notificationId, InviteResponse inviteResponse = default(InviteResponse)) { VRChat.API.Client.ApiResponse localVarResponse = RespondInviteWithHttpInfo(notificationId, inviteResponse); return localVarResponse.Data; @@ -1713,17 +1466,14 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith /// Respond Invite Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. /// /// Thrown when fails to make API call - /// + /// Must be a valid notification ID. /// Slot number of the Response Message to use when responding to a user. (optional) - /// Index associated with the operation. /// ApiResponse of Notification - public VRChat.API.Client.ApiResponse RespondInviteWithHttpInfo(string notificationId, InviteResponse inviteResponse = default(InviteResponse), int operationIndex = 0) + public VRChat.API.Client.ApiResponse RespondInviteWithHttpInfo(string notificationId, InviteResponse inviteResponse = default(InviteResponse)) { // verify the required parameter 'notificationId' is set if (notificationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'notificationId' when calling InviteApi->RespondInvite"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1737,23 +1487,14 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("notificationId", VRChat.API.Client.ClientUtils.ParameterToString(notificationId)); // path parameter localVarRequestOptions.Data = inviteResponse; - localVarRequestOptions.Operation = "InviteApi.RespondInvite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1769,13 +1510,11 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith // make the HTTP request var localVarResponse = this.Client.Post("/invite/{notificationId}/response", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("RespondInvite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1785,14 +1524,13 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith /// Respond Invite Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. /// /// Thrown when fails to make API call - /// + /// Must be a valid notification ID. /// Slot number of the Response Message to use when responding to a user. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Notification - public async System.Threading.Tasks.Task RespondInviteAsync(string notificationId, InviteResponse inviteResponse = default(InviteResponse), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task RespondInviteAsync(string notificationId, InviteResponse inviteResponse = default(InviteResponse), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await RespondInviteWithHttpInfoAsync(notificationId, inviteResponse, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await RespondInviteWithHttpInfoAsync(notificationId, inviteResponse, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1800,18 +1538,15 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith /// Respond Invite Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. /// /// Thrown when fails to make API call - /// + /// Must be a valid notification ID. /// Slot number of the Response Message to use when responding to a user. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Notification) - public async System.Threading.Tasks.Task> RespondInviteWithHttpInfoAsync(string notificationId, InviteResponse inviteResponse = default(InviteResponse), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> RespondInviteWithHttpInfoAsync(string notificationId, InviteResponse inviteResponse = default(InviteResponse), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'notificationId' is set if (notificationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'notificationId' when calling InviteApi->RespondInvite"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1825,24 +1560,16 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("notificationId", VRChat.API.Client.ClientUtils.ParameterToString(notificationId)); // path parameter localVarRequestOptions.Data = inviteResponse; - localVarRequestOptions.Operation = "InviteApi.RespondInvite"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1857,15 +1584,13 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/invite/{notificationId}/response", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("RespondInvite", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1875,13 +1600,12 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith /// 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 /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Message of what to set the invite message to. (optional) - /// Index associated with the operation. /// List<InviteMessage> - public List UpdateInviteMessage(string userId, string messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), int operationIndex = 0) + public List UpdateInviteMessage(string userId, InviteMessageType messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest)) { VRChat.API.Client.ApiResponse> localVarResponse = UpdateInviteMessageWithHttpInfo(userId, messageType, slot, updateInviteMessageRequest); return localVarResponse.Data; @@ -1891,25 +1615,16 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith /// 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 /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Message of what to set the invite message to. (optional) - /// Index associated with the operation. /// ApiResponse of List<InviteMessage> - public VRChat.API.Client.ApiResponse> UpdateInviteMessageWithHttpInfo(string userId, string messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> UpdateInviteMessageWithHttpInfo(string userId, InviteMessageType messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->UpdateInviteMessage"); - } - - // verify the required parameter 'messageType' is set - if (messageType == null) - { - throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'messageType' when calling InviteApi->UpdateInviteMessage"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1923,25 +1638,16 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.PathParameters.Add("messageType", VRChat.API.Client.ClientUtils.ParameterToString(messageType)); // path parameter localVarRequestOptions.PathParameters.Add("slot", VRChat.API.Client.ClientUtils.ParameterToString(slot)); // path parameter localVarRequestOptions.Data = updateInviteMessageRequest; - localVarRequestOptions.Operation = "InviteApi.UpdateInviteMessage"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1957,13 +1663,11 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith // make the HTTP request var localVarResponse = this.Client.Put>("/message/{userId}/{messageType}/{slot}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateInviteMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1973,16 +1677,15 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith /// 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 /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Message of what to set the invite message to. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<InviteMessage> - public async System.Threading.Tasks.Task> UpdateInviteMessageAsync(string userId, string messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateInviteMessageAsync(string userId, InviteMessageType messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await UpdateInviteMessageWithHttpInfoAsync(userId, messageType, slot, updateInviteMessageRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await UpdateInviteMessageWithHttpInfoAsync(userId, messageType, slot, updateInviteMessageRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1990,26 +1693,17 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith /// 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 /// /// Thrown when fails to make API call - /// - /// - /// + /// Must be a valid user ID. + /// The type of message to fetch, must be a valid InviteMessageType. + /// The message slot to fetch of a given message type. /// Message of what to set the invite message to. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<InviteMessage>) - public async System.Threading.Tasks.Task>> UpdateInviteMessageWithHttpInfoAsync(string userId, string messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> UpdateInviteMessageWithHttpInfoAsync(string userId, InviteMessageType messageType, int slot, UpdateInviteMessageRequest updateInviteMessageRequest = default(UpdateInviteMessageRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling InviteApi->UpdateInviteMessage"); - } - - // verify the required parameter 'messageType' is set - if (messageType == null) - { - throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'messageType' when calling InviteApi->UpdateInviteMessage"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2023,26 +1717,18 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.PathParameters.Add("messageType", VRChat.API.Client.ClientUtils.ParameterToString(messageType)); // path parameter localVarRequestOptions.PathParameters.Add("slot", VRChat.API.Client.ClientUtils.ParameterToString(slot)); // path parameter localVarRequestOptions.Data = updateInviteMessageRequest; - localVarRequestOptions.Operation = "InviteApi.UpdateInviteMessage"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2057,15 +1743,13 @@ public VRChat.API.Client.ApiResponse> ResetInviteMessageWith } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync>("/message/{userId}/{messageType}/{slot}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateInviteMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/NotificationsApi.cs b/src/VRChat.API/Api/NotificationsApi.cs index ceb90210..eafc3aea 100644 --- a/src/VRChat.API/Api/NotificationsApi.cs +++ b/src/VRChat.API/Api/NotificationsApi.cs @@ -33,10 +33,9 @@ public interface INotificationsApiSync : IApiAccessor /// Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Success - Success AcceptFriendRequest(string notificationId, int operationIndex = 0); + Success AcceptFriendRequest(string notificationId); /// /// Accept Friend Request @@ -45,10 +44,9 @@ public interface INotificationsApiSync : IApiAccessor /// Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// ApiResponse of Success - ApiResponse AcceptFriendRequestWithHttpInfo(string notificationId, int operationIndex = 0); + ApiResponse AcceptFriendRequestWithHttpInfo(string notificationId); /// /// Clear All Notifications /// @@ -56,9 +54,8 @@ public interface INotificationsApiSync : IApiAccessor /// Clear **all** notifications. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Success - Success ClearNotifications(int operationIndex = 0); + Success ClearNotifications(); /// /// Clear All Notifications @@ -67,9 +64,8 @@ public interface INotificationsApiSync : IApiAccessor /// Clear **all** notifications. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of Success - ApiResponse ClearNotificationsWithHttpInfo(int operationIndex = 0); + ApiResponse ClearNotificationsWithHttpInfo(); /// /// Delete Notification /// @@ -77,10 +73,9 @@ public interface INotificationsApiSync : IApiAccessor /// Delete a notification. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Notification - Notification DeleteNotification(string notificationId, int operationIndex = 0); + Notification DeleteNotification(string notificationId); /// /// Delete Notification @@ -89,10 +84,9 @@ public interface INotificationsApiSync : IApiAccessor /// Delete a notification. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// ApiResponse of Notification - ApiResponse DeleteNotificationWithHttpInfo(string notificationId, int operationIndex = 0); + ApiResponse DeleteNotificationWithHttpInfo(string notificationId); /// /// List Notifications /// @@ -106,9 +100,8 @@ public interface INotificationsApiSync : IApiAccessor /// Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// List<Notification> - List GetNotifications(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0); + List GetNotifications(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?)); /// /// List Notifications @@ -123,9 +116,8 @@ public interface INotificationsApiSync : IApiAccessor /// Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// ApiResponse of List<Notification> - ApiResponse> GetNotificationsWithHttpInfo(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0); + ApiResponse> GetNotificationsWithHttpInfo(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?)); /// /// Mark Notification As Read /// @@ -133,10 +125,9 @@ public interface INotificationsApiSync : IApiAccessor /// Mark a notification as seen. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Notification - Notification MarkNotificationAsRead(string notificationId, int operationIndex = 0); + Notification MarkNotificationAsRead(string notificationId); /// /// Mark Notification As Read @@ -145,10 +136,9 @@ public interface INotificationsApiSync : IApiAccessor /// Mark a notification as seen. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// ApiResponse of Notification - ApiResponse MarkNotificationAsReadWithHttpInfo(string notificationId, int operationIndex = 0); + ApiResponse MarkNotificationAsReadWithHttpInfo(string notificationId); #endregion Synchronous Operations } @@ -165,11 +155,10 @@ public interface INotificationsApiAsync : IApiAccessor /// Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task AcceptFriendRequestAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AcceptFriendRequestAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Accept Friend Request @@ -178,11 +167,10 @@ public interface INotificationsApiAsync : IApiAccessor /// Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> AcceptFriendRequestWithHttpInfoAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AcceptFriendRequestWithHttpInfoAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Clear All Notifications /// @@ -190,10 +178,9 @@ public interface INotificationsApiAsync : IApiAccessor /// Clear **all** notifications. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task ClearNotificationsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ClearNotificationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Clear All Notifications @@ -202,10 +189,9 @@ public interface INotificationsApiAsync : IApiAccessor /// Clear **all** notifications. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> ClearNotificationsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ClearNotificationsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete Notification /// @@ -213,11 +199,10 @@ public interface INotificationsApiAsync : IApiAccessor /// Delete a notification. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of Notification - System.Threading.Tasks.Task DeleteNotificationAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteNotificationAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete Notification @@ -226,11 +211,10 @@ public interface INotificationsApiAsync : IApiAccessor /// Delete a notification. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Notification) - System.Threading.Tasks.Task> DeleteNotificationWithHttpInfoAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteNotificationWithHttpInfoAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Notifications /// @@ -244,10 +228,9 @@ public interface INotificationsApiAsync : IApiAccessor /// Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Notification> - System.Threading.Tasks.Task> GetNotificationsAsync(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetNotificationsAsync(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Notifications @@ -262,10 +245,9 @@ public interface INotificationsApiAsync : IApiAccessor /// Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Notification>) - System.Threading.Tasks.Task>> GetNotificationsWithHttpInfoAsync(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetNotificationsWithHttpInfoAsync(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Mark Notification As Read /// @@ -273,11 +255,10 @@ public interface INotificationsApiAsync : IApiAccessor /// Mark a notification as seen. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of Notification - System.Threading.Tasks.Task MarkNotificationAsReadAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task MarkNotificationAsReadAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Mark Notification As Read @@ -286,11 +267,10 @@ public interface INotificationsApiAsync : IApiAccessor /// Mark a notification as seen. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Notification) - System.Threading.Tasks.Task> MarkNotificationAsReadWithHttpInfoAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> MarkNotificationAsReadWithHttpInfoAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -415,10 +395,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// 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`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Success - public Success AcceptFriendRequest(string notificationId, int operationIndex = 0) + public Success AcceptFriendRequest(string notificationId) { VRChat.API.Client.ApiResponse localVarResponse = AcceptFriendRequestWithHttpInfo(notificationId); return localVarResponse.Data; @@ -428,16 +407,13 @@ public Success AcceptFriendRequest(string notificationId, int operationIndex = 0 /// 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`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse AcceptFriendRequestWithHttpInfo(string notificationId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse AcceptFriendRequestWithHttpInfo(string notificationId) { // verify the required parameter 'notificationId' is set if (notificationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'notificationId' when calling NotificationsApi->AcceptFriendRequest"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -450,22 +426,13 @@ public VRChat.API.Client.ApiResponse AcceptFriendRequestWithHttpInfo(st }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("notificationId", VRChat.API.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.Operation = "NotificationsApi.AcceptFriendRequest"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -481,13 +448,11 @@ public VRChat.API.Client.ApiResponse AcceptFriendRequestWithHttpInfo(st // make the HTTP request var localVarResponse = this.Client.Put("/auth/user/notifications/{notificationId}/accept", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("AcceptFriendRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -497,13 +462,12 @@ public VRChat.API.Client.ApiResponse AcceptFriendRequestWithHttpInfo(st /// 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`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task AcceptFriendRequestAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AcceptFriendRequestAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await AcceptFriendRequestWithHttpInfoAsync(notificationId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await AcceptFriendRequestWithHttpInfoAsync(notificationId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -511,17 +475,14 @@ public VRChat.API.Client.ApiResponse AcceptFriendRequestWithHttpInfo(st /// 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`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> AcceptFriendRequestWithHttpInfoAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AcceptFriendRequestWithHttpInfoAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'notificationId' is set if (notificationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'notificationId' when calling NotificationsApi->AcceptFriendRequest"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -534,23 +495,15 @@ public VRChat.API.Client.ApiResponse AcceptFriendRequestWithHttpInfo(st "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("notificationId", VRChat.API.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.Operation = "NotificationsApi.AcceptFriendRequest"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -565,15 +518,13 @@ public VRChat.API.Client.ApiResponse AcceptFriendRequestWithHttpInfo(st } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/auth/user/notifications/{notificationId}/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("AcceptFriendRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -583,9 +534,8 @@ public VRChat.API.Client.ApiResponse AcceptFriendRequestWithHttpInfo(st /// Clear All Notifications Clear **all** notifications. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Success - public Success ClearNotifications(int operationIndex = 0) + public Success ClearNotifications() { VRChat.API.Client.ApiResponse localVarResponse = ClearNotificationsWithHttpInfo(); return localVarResponse.Data; @@ -595,9 +545,8 @@ public Success ClearNotifications(int operationIndex = 0) /// Clear All Notifications Clear **all** notifications. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse ClearNotificationsWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse ClearNotificationsWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -610,21 +559,12 @@ public VRChat.API.Client.ApiResponse ClearNotificationsWithHttpInfo(int }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "NotificationsApi.ClearNotifications"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -640,13 +580,11 @@ public VRChat.API.Client.ApiResponse ClearNotificationsWithHttpInfo(int // make the HTTP request var localVarResponse = this.Client.Put("/auth/user/notifications/clear", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ClearNotifications", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -656,12 +594,11 @@ public VRChat.API.Client.ApiResponse ClearNotificationsWithHttpInfo(int /// Clear All Notifications Clear **all** notifications. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task ClearNotificationsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ClearNotificationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await ClearNotificationsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await ClearNotificationsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -669,10 +606,9 @@ public VRChat.API.Client.ApiResponse ClearNotificationsWithHttpInfo(int /// Clear All Notifications Clear **all** notifications. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> ClearNotificationsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ClearNotificationsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -685,22 +621,14 @@ public VRChat.API.Client.ApiResponse ClearNotificationsWithHttpInfo(int "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "NotificationsApi.ClearNotifications"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -715,15 +643,13 @@ public VRChat.API.Client.ApiResponse ClearNotificationsWithHttpInfo(int } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/auth/user/notifications/clear", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ClearNotifications", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -733,10 +659,9 @@ public VRChat.API.Client.ApiResponse ClearNotificationsWithHttpInfo(int /// Delete Notification Delete a notification. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Notification - public Notification DeleteNotification(string notificationId, int operationIndex = 0) + public Notification DeleteNotification(string notificationId) { VRChat.API.Client.ApiResponse localVarResponse = DeleteNotificationWithHttpInfo(notificationId); return localVarResponse.Data; @@ -746,16 +671,13 @@ public Notification DeleteNotification(string notificationId, int operationIndex /// Delete Notification Delete a notification. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// ApiResponse of Notification - public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInfo(string notificationId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInfo(string notificationId) { // verify the required parameter 'notificationId' is set if (notificationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'notificationId' when calling NotificationsApi->DeleteNotification"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -768,22 +690,13 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("notificationId", VRChat.API.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.Operation = "NotificationsApi.DeleteNotification"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -799,13 +712,11 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf // make the HTTP request var localVarResponse = this.Client.Put("/auth/user/notifications/{notificationId}/hide", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteNotification", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -815,13 +726,12 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf /// Delete Notification Delete a notification. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of Notification - public async System.Threading.Tasks.Task DeleteNotificationAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteNotificationAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await DeleteNotificationWithHttpInfoAsync(notificationId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await DeleteNotificationWithHttpInfoAsync(notificationId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -829,17 +739,14 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf /// Delete Notification Delete a notification. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Notification) - public async System.Threading.Tasks.Task> DeleteNotificationWithHttpInfoAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteNotificationWithHttpInfoAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'notificationId' is set if (notificationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'notificationId' when calling NotificationsApi->DeleteNotification"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -852,23 +759,15 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("notificationId", VRChat.API.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.Operation = "NotificationsApi.DeleteNotification"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -883,15 +782,13 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/auth/user/notifications/{notificationId}/hide", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteNotification", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -907,9 +804,8 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf /// Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// List<Notification> - public List GetNotifications(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0) + public List GetNotifications(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?)) { VRChat.API.Client.ApiResponse> localVarResponse = GetNotificationsWithHttpInfo(type, sent, hidden, after, n, offset); return localVarResponse.Data; @@ -925,9 +821,8 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf /// Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// ApiResponse of List<Notification> - public VRChat.API.Client.ApiResponse> GetNotificationsWithHttpInfo(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetNotificationsWithHttpInfo(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -940,16 +835,10 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (type != null) { @@ -976,9 +865,6 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); } - localVarRequestOptions.Operation = "NotificationsApi.GetNotifications"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -994,13 +880,11 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf // make the HTTP request var localVarResponse = this.Client.Get>("/auth/user/notifications", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetNotifications", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1016,12 +900,11 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf /// Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Notification> - public async System.Threading.Tasks.Task> GetNotificationsAsync(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetNotificationsAsync(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetNotificationsWithHttpInfoAsync(type, sent, hidden, after, n, offset, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetNotificationsWithHttpInfoAsync(type, sent, hidden, after, n, offset, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1035,10 +918,9 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf /// Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Notification>) - public async System.Threading.Tasks.Task>> GetNotificationsWithHttpInfoAsync(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetNotificationsWithHttpInfoAsync(string type = default(string), bool? sent = default(bool?), bool? hidden = default(bool?), string after = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1051,17 +933,12 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (type != null) { @@ -1088,9 +965,6 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); } - localVarRequestOptions.Operation = "NotificationsApi.GetNotifications"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1105,15 +979,13 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/auth/user/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetNotifications", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1123,10 +995,9 @@ public VRChat.API.Client.ApiResponse DeleteNotificationWithHttpInf /// Mark Notification As Read Mark a notification as seen. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Notification - public Notification MarkNotificationAsRead(string notificationId, int operationIndex = 0) + public Notification MarkNotificationAsRead(string notificationId) { VRChat.API.Client.ApiResponse localVarResponse = MarkNotificationAsReadWithHttpInfo(notificationId); return localVarResponse.Data; @@ -1136,16 +1007,13 @@ public Notification MarkNotificationAsRead(string notificationId, int operationI /// Mark Notification As Read Mark a notification as seen. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// ApiResponse of Notification - public VRChat.API.Client.ApiResponse MarkNotificationAsReadWithHttpInfo(string notificationId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse MarkNotificationAsReadWithHttpInfo(string notificationId) { // verify the required parameter 'notificationId' is set if (notificationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'notificationId' when calling NotificationsApi->MarkNotificationAsRead"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1158,22 +1026,13 @@ public VRChat.API.Client.ApiResponse MarkNotificationAsReadWithHtt }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("notificationId", VRChat.API.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.Operation = "NotificationsApi.MarkNotificationAsRead"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1189,13 +1048,11 @@ public VRChat.API.Client.ApiResponse MarkNotificationAsReadWithHtt // make the HTTP request var localVarResponse = this.Client.Put("/auth/user/notifications/{notificationId}/see", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("MarkNotificationAsRead", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1205,13 +1062,12 @@ public VRChat.API.Client.ApiResponse MarkNotificationAsReadWithHtt /// Mark Notification As Read Mark a notification as seen. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of Notification - public async System.Threading.Tasks.Task MarkNotificationAsReadAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task MarkNotificationAsReadAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await MarkNotificationAsReadWithHttpInfoAsync(notificationId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await MarkNotificationAsReadWithHttpInfoAsync(notificationId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1219,17 +1075,14 @@ public VRChat.API.Client.ApiResponse MarkNotificationAsReadWithHtt /// Mark Notification As Read Mark a notification as seen. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid notification ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Notification) - public async System.Threading.Tasks.Task> MarkNotificationAsReadWithHttpInfoAsync(string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> MarkNotificationAsReadWithHttpInfoAsync(string notificationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'notificationId' is set if (notificationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'notificationId' when calling NotificationsApi->MarkNotificationAsRead"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1242,23 +1095,15 @@ public VRChat.API.Client.ApiResponse MarkNotificationAsReadWithHtt "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("notificationId", VRChat.API.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.Operation = "NotificationsApi.MarkNotificationAsRead"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1273,15 +1118,13 @@ public VRChat.API.Client.ApiResponse MarkNotificationAsReadWithHtt } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/auth/user/notifications/{notificationId}/see", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("MarkNotificationAsRead", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/PermissionsApi.cs b/src/VRChat.API/Api/PermissionsApi.cs index d37dc58c..70e2d65a 100644 --- a/src/VRChat.API/Api/PermissionsApi.cs +++ b/src/VRChat.API/Api/PermissionsApi.cs @@ -33,9 +33,8 @@ public interface IPermissionsApiSync : IApiAccessor /// Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// List<Permission> - List GetAssignedPermissions(int operationIndex = 0); + List GetAssignedPermissions(); /// /// Get Assigned Permissions @@ -44,9 +43,8 @@ public interface IPermissionsApiSync : IApiAccessor /// Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of List<Permission> - ApiResponse> GetAssignedPermissionsWithHttpInfo(int operationIndex = 0); + ApiResponse> GetAssignedPermissionsWithHttpInfo(); /// /// Get Permission /// @@ -54,10 +52,9 @@ public interface IPermissionsApiSync : IApiAccessor /// Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid permission ID. /// Permission - Permission GetPermission(string permissionId, int operationIndex = 0); + Permission GetPermission(string permissionId); /// /// Get Permission @@ -66,10 +63,9 @@ public interface IPermissionsApiSync : IApiAccessor /// Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid permission ID. /// ApiResponse of Permission - ApiResponse GetPermissionWithHttpInfo(string permissionId, int operationIndex = 0); + ApiResponse GetPermissionWithHttpInfo(string permissionId); #endregion Synchronous Operations } @@ -86,10 +82,9 @@ public interface IPermissionsApiAsync : IApiAccessor /// Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Permission> - System.Threading.Tasks.Task> GetAssignedPermissionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetAssignedPermissionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Assigned Permissions @@ -98,10 +93,9 @@ public interface IPermissionsApiAsync : IApiAccessor /// Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Permission>) - System.Threading.Tasks.Task>> GetAssignedPermissionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetAssignedPermissionsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Permission /// @@ -109,11 +103,10 @@ public interface IPermissionsApiAsync : IApiAccessor /// Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid permission ID. /// Cancellation Token to cancel the request. /// Task of Permission - System.Threading.Tasks.Task GetPermissionAsync(string permissionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetPermissionAsync(string permissionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Permission @@ -122,11 +115,10 @@ public interface IPermissionsApiAsync : IApiAccessor /// Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid permission ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Permission) - System.Threading.Tasks.Task> GetPermissionWithHttpInfoAsync(string permissionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetPermissionWithHttpInfoAsync(string permissionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -251,9 +243,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Get Assigned Permissions Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// List<Permission> - public List GetAssignedPermissions(int operationIndex = 0) + public List GetAssignedPermissions() { VRChat.API.Client.ApiResponse> localVarResponse = GetAssignedPermissionsWithHttpInfo(); return localVarResponse.Data; @@ -263,9 +254,8 @@ public List GetAssignedPermissions(int operationIndex = 0) /// Get Assigned Permissions Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of List<Permission> - public VRChat.API.Client.ApiResponse> GetAssignedPermissionsWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetAssignedPermissionsWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -278,20 +268,11 @@ public VRChat.API.Client.ApiResponse> GetAssignedPermissionsWit }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "PermissionsApi.GetAssignedPermissions"; - localVarRequestOptions.OperationIndex = operationIndex; // authentication (apiKeyCookie) required // cookie parameter support @@ -308,13 +289,11 @@ public VRChat.API.Client.ApiResponse> GetAssignedPermissionsWit // make the HTTP request var localVarResponse = this.Client.Get>("/auth/permissions", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetAssignedPermissions", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -324,12 +303,11 @@ public VRChat.API.Client.ApiResponse> GetAssignedPermissionsWit /// Get Assigned Permissions Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<Permission> - public async System.Threading.Tasks.Task> GetAssignedPermissionsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetAssignedPermissionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetAssignedPermissionsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetAssignedPermissionsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -337,10 +315,9 @@ public VRChat.API.Client.ApiResponse> GetAssignedPermissionsWit /// Get Assigned Permissions Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Permission>) - public async System.Threading.Tasks.Task>> GetAssignedPermissionsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetAssignedPermissionsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -353,22 +330,14 @@ public VRChat.API.Client.ApiResponse> GetAssignedPermissionsWit "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "PermissionsApi.GetAssignedPermissions"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -383,15 +352,13 @@ public VRChat.API.Client.ApiResponse> GetAssignedPermissionsWit } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/auth/permissions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetAssignedPermissions", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -401,10 +368,9 @@ public VRChat.API.Client.ApiResponse> GetAssignedPermissionsWit /// Get Permission Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid permission ID. /// Permission - public Permission GetPermission(string permissionId, int operationIndex = 0) + public Permission GetPermission(string permissionId) { VRChat.API.Client.ApiResponse localVarResponse = GetPermissionWithHttpInfo(permissionId); return localVarResponse.Data; @@ -414,16 +380,13 @@ public Permission GetPermission(string permissionId, int operationIndex = 0) /// Get Permission Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid permission ID. /// ApiResponse of Permission - public VRChat.API.Client.ApiResponse GetPermissionWithHttpInfo(string permissionId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetPermissionWithHttpInfo(string permissionId) { // verify the required parameter 'permissionId' is set if (permissionId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'permissionId' when calling PermissionsApi->GetPermission"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -436,22 +399,13 @@ public VRChat.API.Client.ApiResponse GetPermissionWithHttpInfo(strin }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("permissionId", VRChat.API.Client.ClientUtils.ParameterToString(permissionId)); // path parameter - localVarRequestOptions.Operation = "PermissionsApi.GetPermission"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -467,13 +421,11 @@ public VRChat.API.Client.ApiResponse GetPermissionWithHttpInfo(strin // make the HTTP request var localVarResponse = this.Client.Get("/permissions/{permissionId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetPermission", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -483,13 +435,12 @@ public VRChat.API.Client.ApiResponse GetPermissionWithHttpInfo(strin /// Get Permission Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid permission ID. /// Cancellation Token to cancel the request. /// Task of Permission - public async System.Threading.Tasks.Task GetPermissionAsync(string permissionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetPermissionAsync(string permissionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetPermissionWithHttpInfoAsync(permissionId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetPermissionWithHttpInfoAsync(permissionId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -497,17 +448,14 @@ public VRChat.API.Client.ApiResponse GetPermissionWithHttpInfo(strin /// Get Permission Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid permission ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Permission) - public async System.Threading.Tasks.Task> GetPermissionWithHttpInfoAsync(string permissionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetPermissionWithHttpInfoAsync(string permissionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'permissionId' is set if (permissionId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'permissionId' when calling PermissionsApi->GetPermission"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -520,23 +468,15 @@ public VRChat.API.Client.ApiResponse GetPermissionWithHttpInfo(strin "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("permissionId", VRChat.API.Client.ClientUtils.ParameterToString(permissionId)); // path parameter - localVarRequestOptions.Operation = "PermissionsApi.GetPermission"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -551,15 +491,13 @@ public VRChat.API.Client.ApiResponse GetPermissionWithHttpInfo(strin } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/permissions/{permissionId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetPermission", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/PlayermoderationApi.cs b/src/VRChat.API/Api/PlayermoderationApi.cs index a9d3f38e..4d8a1d9c 100644 --- a/src/VRChat.API/Api/PlayermoderationApi.cs +++ b/src/VRChat.API/Api/PlayermoderationApi.cs @@ -33,9 +33,8 @@ public interface IPlayermoderationApiSync : IApiAccessor /// ⚠️ **This will delete every single player moderation you've ever made.** /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Success - Success ClearAllPlayerModerations(int operationIndex = 0); + Success ClearAllPlayerModerations(); /// /// Clear All Player Moderations @@ -44,9 +43,8 @@ public interface IPlayermoderationApiSync : IApiAccessor /// ⚠️ **This will delete every single player moderation you've ever made.** /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of Success - ApiResponse ClearAllPlayerModerationsWithHttpInfo(int operationIndex = 0); + ApiResponse ClearAllPlayerModerationsWithHttpInfo(); /// /// Delete Player Moderation /// @@ -54,10 +52,9 @@ public interface IPlayermoderationApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// Success - Success DeletePlayerModeration(string playerModerationId, int operationIndex = 0); + Success DeletePlayerModeration(string playerModerationId); /// /// Delete Player Moderation @@ -66,10 +63,9 @@ public interface IPlayermoderationApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// ApiResponse of Success - ApiResponse DeletePlayerModerationWithHttpInfo(string playerModerationId, int operationIndex = 0); + ApiResponse DeletePlayerModerationWithHttpInfo(string playerModerationId); /// /// Get Player Moderation /// @@ -77,10 +73,9 @@ public interface IPlayermoderationApiSync : IApiAccessor /// Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// PlayerModeration - PlayerModeration GetPlayerModeration(string playerModerationId, int operationIndex = 0); + PlayerModeration GetPlayerModeration(string playerModerationId); /// /// Get Player Moderation @@ -89,10 +84,9 @@ public interface IPlayermoderationApiSync : IApiAccessor /// Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// ApiResponse of PlayerModeration - ApiResponse GetPlayerModerationWithHttpInfo(string playerModerationId, int operationIndex = 0); + ApiResponse GetPlayerModerationWithHttpInfo(string playerModerationId); /// /// Search Player Moderations /// @@ -102,9 +96,8 @@ public interface IPlayermoderationApiSync : IApiAccessor /// Thrown when fails to make API call /// Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) /// Must be valid UserID. (optional) - /// Index associated with the operation. /// List<PlayerModeration> - List GetPlayerModerations(string type = default(string), string targetUserId = default(string), int operationIndex = 0); + List GetPlayerModerations(string type = default(string), string targetUserId = default(string)); /// /// Search Player Moderations @@ -115,9 +108,8 @@ public interface IPlayermoderationApiSync : IApiAccessor /// Thrown when fails to make API call /// Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) /// Must be valid UserID. (optional) - /// Index associated with the operation. /// ApiResponse of List<PlayerModeration> - ApiResponse> GetPlayerModerationsWithHttpInfo(string type = default(string), string targetUserId = default(string), int operationIndex = 0); + ApiResponse> GetPlayerModerationsWithHttpInfo(string type = default(string), string targetUserId = default(string)); /// /// Moderate User /// @@ -126,9 +118,8 @@ public interface IPlayermoderationApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// PlayerModeration - PlayerModeration ModerateUser(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0); + PlayerModeration ModerateUser(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest)); /// /// Moderate User @@ -138,9 +129,8 @@ public interface IPlayermoderationApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of PlayerModeration - ApiResponse ModerateUserWithHttpInfo(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0); + ApiResponse ModerateUserWithHttpInfo(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest)); /// /// Unmoderate User /// @@ -149,9 +139,8 @@ public interface IPlayermoderationApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Success - Success UnmoderateUser(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0); + Success UnmoderateUser(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest)); /// /// Unmoderate User @@ -161,9 +150,8 @@ public interface IPlayermoderationApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of Success - ApiResponse UnmoderateUserWithHttpInfo(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0); + ApiResponse UnmoderateUserWithHttpInfo(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest)); #endregion Synchronous Operations } @@ -180,10 +168,9 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// ⚠️ **This will delete every single player moderation you've ever made.** /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task ClearAllPlayerModerationsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ClearAllPlayerModerationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Clear All Player Moderations @@ -192,10 +179,9 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// ⚠️ **This will delete every single player moderation you've ever made.** /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> ClearAllPlayerModerationsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ClearAllPlayerModerationsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete Player Moderation /// @@ -203,11 +189,10 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task DeletePlayerModerationAsync(string playerModerationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePlayerModerationAsync(string playerModerationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete Player Moderation @@ -216,11 +201,10 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> DeletePlayerModerationWithHttpInfoAsync(string playerModerationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePlayerModerationWithHttpInfoAsync(string playerModerationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Player Moderation /// @@ -228,11 +212,10 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// Cancellation Token to cancel the request. /// Task of PlayerModeration - System.Threading.Tasks.Task GetPlayerModerationAsync(string playerModerationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetPlayerModerationAsync(string playerModerationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Player Moderation @@ -241,11 +224,10 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (PlayerModeration) - System.Threading.Tasks.Task> GetPlayerModerationWithHttpInfoAsync(string playerModerationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetPlayerModerationWithHttpInfoAsync(string playerModerationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Search Player Moderations /// @@ -255,10 +237,9 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// Thrown when fails to make API call /// Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) /// Must be valid UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<PlayerModeration> - System.Threading.Tasks.Task> GetPlayerModerationsAsync(string type = default(string), string targetUserId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetPlayerModerationsAsync(string type = default(string), string targetUserId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Search Player Moderations @@ -269,10 +250,9 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// Thrown when fails to make API call /// Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) /// Must be valid UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<PlayerModeration>) - System.Threading.Tasks.Task>> GetPlayerModerationsWithHttpInfoAsync(string type = default(string), string targetUserId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetPlayerModerationsWithHttpInfoAsync(string type = default(string), string targetUserId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Moderate User /// @@ -281,10 +261,9 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of PlayerModeration - System.Threading.Tasks.Task ModerateUserAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ModerateUserAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Moderate User @@ -294,10 +273,9 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (PlayerModeration) - System.Threading.Tasks.Task> ModerateUserWithHttpInfoAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ModerateUserWithHttpInfoAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Unmoderate User /// @@ -306,10 +284,9 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Success - System.Threading.Tasks.Task UnmoderateUserAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UnmoderateUserAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Unmoderate User @@ -319,10 +296,9 @@ public interface IPlayermoderationApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - System.Threading.Tasks.Task> UnmoderateUserWithHttpInfoAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UnmoderateUserWithHttpInfoAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -447,9 +423,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Clear All Player Moderations ⚠️ **This will delete every single player moderation you've ever made.** /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Success - public Success ClearAllPlayerModerations(int operationIndex = 0) + public Success ClearAllPlayerModerations() { VRChat.API.Client.ApiResponse localVarResponse = ClearAllPlayerModerationsWithHttpInfo(); return localVarResponse.Data; @@ -459,9 +434,8 @@ public Success ClearAllPlayerModerations(int operationIndex = 0) /// Clear All Player Moderations ⚠️ **This will delete every single player moderation you've ever made.** /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse ClearAllPlayerModerationsWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse ClearAllPlayerModerationsWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -474,21 +448,12 @@ public VRChat.API.Client.ApiResponse ClearAllPlayerModerationsWithHttpI }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "PlayermoderationApi.ClearAllPlayerModerations"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -504,13 +469,11 @@ public VRChat.API.Client.ApiResponse ClearAllPlayerModerationsWithHttpI // make the HTTP request var localVarResponse = this.Client.Delete("/auth/user/playermoderations", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ClearAllPlayerModerations", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -520,12 +483,11 @@ public VRChat.API.Client.ApiResponse ClearAllPlayerModerationsWithHttpI /// Clear All Player Moderations ⚠️ **This will delete every single player moderation you've ever made.** /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task ClearAllPlayerModerationsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ClearAllPlayerModerationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await ClearAllPlayerModerationsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await ClearAllPlayerModerationsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -533,10 +495,9 @@ public VRChat.API.Client.ApiResponse ClearAllPlayerModerationsWithHttpI /// Clear All Player Moderations ⚠️ **This will delete every single player moderation you've ever made.** /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> ClearAllPlayerModerationsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ClearAllPlayerModerationsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -549,21 +510,13 @@ public VRChat.API.Client.ApiResponse ClearAllPlayerModerationsWithHttpI "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "PlayermoderationApi.ClearAllPlayerModerations"; - localVarRequestOptions.OperationIndex = operationIndex; // authentication (apiKeyCookie) required // cookie parameter support @@ -579,15 +532,13 @@ public VRChat.API.Client.ApiResponse ClearAllPlayerModerationsWithHttpI } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/auth/user/playermoderations", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ClearAllPlayerModerations", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -597,10 +548,9 @@ public VRChat.API.Client.ApiResponse ClearAllPlayerModerationsWithHttpI /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// Success - public Success DeletePlayerModeration(string playerModerationId, int operationIndex = 0) + public Success DeletePlayerModeration(string playerModerationId) { VRChat.API.Client.ApiResponse localVarResponse = DeletePlayerModerationWithHttpInfo(playerModerationId); return localVarResponse.Data; @@ -610,16 +560,13 @@ public Success DeletePlayerModeration(string playerModerationId, int operationIn /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse DeletePlayerModerationWithHttpInfo(string playerModerationId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse DeletePlayerModerationWithHttpInfo(string playerModerationId) { // verify the required parameter 'playerModerationId' is set if (playerModerationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'playerModerationId' when calling PlayermoderationApi->DeletePlayerModeration"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -632,22 +579,13 @@ public VRChat.API.Client.ApiResponse DeletePlayerModerationWithHttpInfo }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("playerModerationId", VRChat.API.Client.ClientUtils.ParameterToString(playerModerationId)); // path parameter - localVarRequestOptions.Operation = "PlayermoderationApi.DeletePlayerModeration"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -663,13 +601,11 @@ public VRChat.API.Client.ApiResponse DeletePlayerModerationWithHttpInfo // make the HTTP request var localVarResponse = this.Client.Delete("/auth/user/playermoderations/{playerModerationId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeletePlayerModeration", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -679,13 +615,12 @@ public VRChat.API.Client.ApiResponse DeletePlayerModerationWithHttpInfo /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task DeletePlayerModerationAsync(string playerModerationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePlayerModerationAsync(string playerModerationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await DeletePlayerModerationWithHttpInfoAsync(playerModerationId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await DeletePlayerModerationWithHttpInfoAsync(playerModerationId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -693,17 +628,14 @@ public VRChat.API.Client.ApiResponse DeletePlayerModerationWithHttpInfo /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> DeletePlayerModerationWithHttpInfoAsync(string playerModerationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePlayerModerationWithHttpInfoAsync(string playerModerationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'playerModerationId' is set if (playerModerationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'playerModerationId' when calling PlayermoderationApi->DeletePlayerModeration"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -716,23 +648,15 @@ public VRChat.API.Client.ApiResponse DeletePlayerModerationWithHttpInfo "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("playerModerationId", VRChat.API.Client.ClientUtils.ParameterToString(playerModerationId)); // path parameter - localVarRequestOptions.Operation = "PlayermoderationApi.DeletePlayerModeration"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -747,15 +671,13 @@ public VRChat.API.Client.ApiResponse DeletePlayerModerationWithHttpInfo } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/auth/user/playermoderations/{playerModerationId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeletePlayerModeration", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -765,10 +687,9 @@ public VRChat.API.Client.ApiResponse DeletePlayerModerationWithHttpInfo /// Get Player Moderation Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// PlayerModeration - public PlayerModeration GetPlayerModeration(string playerModerationId, int operationIndex = 0) + public PlayerModeration GetPlayerModeration(string playerModerationId) { VRChat.API.Client.ApiResponse localVarResponse = GetPlayerModerationWithHttpInfo(playerModerationId); return localVarResponse.Data; @@ -778,16 +699,13 @@ public PlayerModeration GetPlayerModeration(string playerModerationId, int opera /// Get Player Moderation Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// ApiResponse of PlayerModeration - public VRChat.API.Client.ApiResponse GetPlayerModerationWithHttpInfo(string playerModerationId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetPlayerModerationWithHttpInfo(string playerModerationId) { // verify the required parameter 'playerModerationId' is set if (playerModerationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'playerModerationId' when calling PlayermoderationApi->GetPlayerModeration"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -800,22 +718,13 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("playerModerationId", VRChat.API.Client.ClientUtils.ParameterToString(playerModerationId)); // path parameter - localVarRequestOptions.Operation = "PlayermoderationApi.GetPlayerModeration"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -831,13 +740,11 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt // make the HTTP request var localVarResponse = this.Client.Get("/auth/user/playermoderations/{playerModerationId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetPlayerModeration", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -847,13 +754,12 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// Get Player Moderation Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// Cancellation Token to cancel the request. /// Task of PlayerModeration - public async System.Threading.Tasks.Task GetPlayerModerationAsync(string playerModerationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetPlayerModerationAsync(string playerModerationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetPlayerModerationWithHttpInfoAsync(playerModerationId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetPlayerModerationWithHttpInfoAsync(playerModerationId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -861,17 +767,14 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// Get Player Moderation Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid `pmod_` ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (PlayerModeration) - public async System.Threading.Tasks.Task> GetPlayerModerationWithHttpInfoAsync(string playerModerationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetPlayerModerationWithHttpInfoAsync(string playerModerationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'playerModerationId' is set if (playerModerationId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'playerModerationId' when calling PlayermoderationApi->GetPlayerModeration"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -884,23 +787,15 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("playerModerationId", VRChat.API.Client.ClientUtils.ParameterToString(playerModerationId)); // path parameter - localVarRequestOptions.Operation = "PlayermoderationApi.GetPlayerModeration"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -915,15 +810,13 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/auth/user/playermoderations/{playerModerationId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetPlayerModeration", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -935,9 +828,8 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// Thrown when fails to make API call /// Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) /// Must be valid UserID. (optional) - /// Index associated with the operation. /// List<PlayerModeration> - public List GetPlayerModerations(string type = default(string), string targetUserId = default(string), int operationIndex = 0) + public List GetPlayerModerations(string type = default(string), string targetUserId = default(string)) { VRChat.API.Client.ApiResponse> localVarResponse = GetPlayerModerationsWithHttpInfo(type, targetUserId); return localVarResponse.Data; @@ -949,9 +841,8 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// Thrown when fails to make API call /// Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) /// Must be valid UserID. (optional) - /// Index associated with the operation. /// ApiResponse of List<PlayerModeration> - public VRChat.API.Client.ApiResponse> GetPlayerModerationsWithHttpInfo(string type = default(string), string targetUserId = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetPlayerModerationsWithHttpInfo(string type = default(string), string targetUserId = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -964,16 +855,10 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (type != null) { @@ -984,9 +869,6 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "targetUserId", targetUserId)); } - localVarRequestOptions.Operation = "PlayermoderationApi.GetPlayerModerations"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1002,13 +884,11 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt // make the HTTP request var localVarResponse = this.Client.Get>("/auth/user/playermoderations", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetPlayerModerations", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1020,12 +900,11 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// Thrown when fails to make API call /// Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) /// Must be valid UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<PlayerModeration> - public async System.Threading.Tasks.Task> GetPlayerModerationsAsync(string type = default(string), string targetUserId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetPlayerModerationsAsync(string type = default(string), string targetUserId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetPlayerModerationsWithHttpInfoAsync(type, targetUserId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetPlayerModerationsWithHttpInfoAsync(type, targetUserId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1035,10 +914,9 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// Thrown when fails to make API call /// Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) /// Must be valid UserID. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<PlayerModeration>) - public async System.Threading.Tasks.Task>> GetPlayerModerationsWithHttpInfoAsync(string type = default(string), string targetUserId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetPlayerModerationsWithHttpInfoAsync(string type = default(string), string targetUserId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1051,17 +929,12 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (type != null) { @@ -1072,9 +945,6 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "targetUserId", targetUserId)); } - localVarRequestOptions.Operation = "PlayermoderationApi.GetPlayerModerations"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1089,15 +959,13 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/auth/user/playermoderations", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetPlayerModerations", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1108,9 +976,8 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// PlayerModeration - public PlayerModeration ModerateUser(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0) + public PlayerModeration ModerateUser(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest)) { VRChat.API.Client.ApiResponse localVarResponse = ModerateUserWithHttpInfo(moderateUserRequest); return localVarResponse.Data; @@ -1121,9 +988,8 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of PlayerModeration - public VRChat.API.Client.ApiResponse ModerateUserWithHttpInfo(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse ModerateUserWithHttpInfo(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1137,22 +1003,13 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = moderateUserRequest; - localVarRequestOptions.Operation = "PlayermoderationApi.ModerateUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1168,13 +1025,11 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt // make the HTTP request var localVarResponse = this.Client.Post("/auth/user/playermoderations", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ModerateUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1185,12 +1040,11 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of PlayerModeration - public async System.Threading.Tasks.Task ModerateUserAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ModerateUserAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await ModerateUserWithHttpInfoAsync(moderateUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await ModerateUserWithHttpInfoAsync(moderateUserRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1199,10 +1053,9 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (PlayerModeration) - public async System.Threading.Tasks.Task> ModerateUserWithHttpInfoAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ModerateUserWithHttpInfoAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1216,23 +1069,15 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = moderateUserRequest; - localVarRequestOptions.Operation = "PlayermoderationApi.ModerateUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1247,15 +1092,13 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/auth/user/playermoderations", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ModerateUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1266,9 +1109,8 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Success - public Success UnmoderateUser(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0) + public Success UnmoderateUser(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest)) { VRChat.API.Client.ApiResponse localVarResponse = UnmoderateUserWithHttpInfo(moderateUserRequest); return localVarResponse.Data; @@ -1279,9 +1121,8 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of Success - public VRChat.API.Client.ApiResponse UnmoderateUserWithHttpInfo(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse UnmoderateUserWithHttpInfo(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1295,22 +1136,13 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = moderateUserRequest; - localVarRequestOptions.Operation = "PlayermoderationApi.UnmoderateUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1326,13 +1158,11 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt // make the HTTP request var localVarResponse = this.Client.Put("/auth/user/unplayermoderate", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UnmoderateUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1343,12 +1173,11 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Success - public async System.Threading.Tasks.Task UnmoderateUserAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UnmoderateUserAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await UnmoderateUserWithHttpInfoAsync(moderateUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await UnmoderateUserWithHttpInfoAsync(moderateUserRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1357,10 +1186,9 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Success) - public async System.Threading.Tasks.Task> UnmoderateUserWithHttpInfoAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UnmoderateUserWithHttpInfoAsync(ModerateUserRequest moderateUserRequest = default(ModerateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1374,23 +1202,15 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = moderateUserRequest; - localVarRequestOptions.Operation = "PlayermoderationApi.UnmoderateUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1405,15 +1225,13 @@ public VRChat.API.Client.ApiResponse GetPlayerModerationWithHt } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/auth/user/unplayermoderate", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UnmoderateUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/SystemApi.cs b/src/VRChat.API/Api/SystemApi.cs index 403fb910..f4124791 100644 --- a/src/VRChat.API/Api/SystemApi.cs +++ b/src/VRChat.API/Api/SystemApi.cs @@ -35,9 +35,8 @@ public interface ISystemApiSync : IApiAccessor /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// string - string GetCSS(string variant = default(string), string branch = default(string), int operationIndex = 0); + string GetCSS(string variant = default(string), string branch = default(string)); /// /// Download CSS @@ -48,9 +47,8 @@ public interface ISystemApiSync : IApiAccessor /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// ApiResponse of string - ApiResponse GetCSSWithHttpInfo(string variant = default(string), string branch = default(string), int operationIndex = 0); + ApiResponse GetCSSWithHttpInfo(string variant = default(string), string branch = default(string)); /// /// Fetch API Config /// @@ -58,9 +56,8 @@ public interface ISystemApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// APIConfig - APIConfig GetConfig(int operationIndex = 0); + APIConfig GetConfig(); /// /// Fetch API Config @@ -69,9 +66,8 @@ public interface ISystemApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of APIConfig - ApiResponse GetConfigWithHttpInfo(int operationIndex = 0); + ApiResponse GetConfigWithHttpInfo(); /// /// Current Online Users /// @@ -79,9 +75,8 @@ public interface ISystemApiSync : IApiAccessor /// Returns the current number of online users. **NOTE:** The response type is not a JSON object, but a simple JSON integer. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// int - int GetCurrentOnlineUsers(int operationIndex = 0); + int GetCurrentOnlineUsers(); /// /// Current Online Users @@ -90,9 +85,8 @@ public interface ISystemApiSync : IApiAccessor /// Returns the current number of online users. **NOTE:** The response type is not a JSON object, but a simple JSON integer. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of int - ApiResponse GetCurrentOnlineUsersWithHttpInfo(int operationIndex = 0); + ApiResponse GetCurrentOnlineUsersWithHttpInfo(); /// /// Check API Health /// @@ -100,10 +94,9 @@ public interface ISystemApiSync : IApiAccessor /// ~~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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// APIHealth [Obsolete] - APIHealth GetHealth(int operationIndex = 0); + APIHealth GetHealth(); /// /// Check API Health @@ -112,10 +105,9 @@ public interface ISystemApiSync : IApiAccessor /// ~~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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of APIHealth [Obsolete] - ApiResponse GetHealthWithHttpInfo(int operationIndex = 0); + ApiResponse GetHealthWithHttpInfo(); /// /// Show Information Notices /// @@ -125,9 +117,8 @@ public interface ISystemApiSync : IApiAccessor /// Thrown when fails to make API call /// Tags to include (comma-separated). All of the tags needs to be present. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// List<InfoPush> - List GetInfoPush(string require = default(string), string include = default(string), int operationIndex = 0); + List GetInfoPush(string require = default(string), string include = default(string)); /// /// Show Information Notices @@ -138,9 +129,8 @@ public interface ISystemApiSync : IApiAccessor /// Thrown when fails to make API call /// Tags to include (comma-separated). All of the tags needs to be present. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// ApiResponse of List<InfoPush> - ApiResponse> GetInfoPushWithHttpInfo(string require = default(string), string include = default(string), int operationIndex = 0); + ApiResponse> GetInfoPushWithHttpInfo(string require = default(string), string include = default(string)); /// /// Download JavaScript /// @@ -150,9 +140,8 @@ public interface ISystemApiSync : IApiAccessor /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// string - string GetJavaScript(string variant = default(string), string branch = default(string), int operationIndex = 0); + string GetJavaScript(string variant = default(string), string branch = default(string)); /// /// Download JavaScript @@ -163,9 +152,8 @@ public interface ISystemApiSync : IApiAccessor /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// ApiResponse of string - ApiResponse GetJavaScriptWithHttpInfo(string variant = default(string), string branch = default(string), int operationIndex = 0); + ApiResponse GetJavaScriptWithHttpInfo(string variant = default(string), string branch = default(string)); /// /// Current System Time /// @@ -173,9 +161,8 @@ public interface ISystemApiSync : IApiAccessor /// Returns the current time of the API server. **NOTE:** The response type is not a JSON object, but a simple JSON string. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// DateTime - DateTime GetSystemTime(int operationIndex = 0); + DateTime GetSystemTime(); /// /// Current System Time @@ -184,9 +171,8 @@ public interface ISystemApiSync : IApiAccessor /// Returns the current time of the API server. **NOTE:** The response type is not a JSON object, but a simple JSON string. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of DateTime - ApiResponse GetSystemTimeWithHttpInfo(int operationIndex = 0); + ApiResponse GetSystemTimeWithHttpInfo(); #endregion Synchronous Operations } @@ -205,10 +191,9 @@ public interface ISystemApiAsync : IApiAccessor /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task GetCSSAsync(string variant = default(string), string branch = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetCSSAsync(string variant = default(string), string branch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Download CSS @@ -219,10 +204,9 @@ public interface ISystemApiAsync : IApiAccessor /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> GetCSSWithHttpInfoAsync(string variant = default(string), string branch = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetCSSWithHttpInfoAsync(string variant = default(string), string branch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fetch API Config /// @@ -230,10 +214,9 @@ public interface ISystemApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of APIConfig - System.Threading.Tasks.Task GetConfigAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetConfigAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fetch API Config @@ -242,10 +225,9 @@ public interface ISystemApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (APIConfig) - System.Threading.Tasks.Task> GetConfigWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetConfigWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Current Online Users /// @@ -253,10 +235,9 @@ public interface ISystemApiAsync : IApiAccessor /// Returns the current number of online users. **NOTE:** The response type is not a JSON object, but a simple JSON integer. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of int - System.Threading.Tasks.Task GetCurrentOnlineUsersAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetCurrentOnlineUsersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Current Online Users @@ -265,10 +246,9 @@ public interface ISystemApiAsync : IApiAccessor /// Returns the current number of online users. **NOTE:** The response type is not a JSON object, but a simple JSON integer. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (int) - System.Threading.Tasks.Task> GetCurrentOnlineUsersWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetCurrentOnlineUsersWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check API Health /// @@ -276,11 +256,10 @@ public interface ISystemApiAsync : IApiAccessor /// ~~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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of APIHealth [Obsolete] - System.Threading.Tasks.Task GetHealthAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetHealthAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check API Health @@ -289,11 +268,10 @@ public interface ISystemApiAsync : IApiAccessor /// ~~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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (APIHealth) [Obsolete] - System.Threading.Tasks.Task> GetHealthWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetHealthWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Show Information Notices /// @@ -303,10 +281,9 @@ public interface ISystemApiAsync : IApiAccessor /// Thrown when fails to make API call /// Tags to include (comma-separated). All of the tags needs to be present. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<InfoPush> - System.Threading.Tasks.Task> GetInfoPushAsync(string require = default(string), string include = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetInfoPushAsync(string require = default(string), string include = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Show Information Notices @@ -317,10 +294,9 @@ public interface ISystemApiAsync : IApiAccessor /// Thrown when fails to make API call /// Tags to include (comma-separated). All of the tags needs to be present. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<InfoPush>) - System.Threading.Tasks.Task>> GetInfoPushWithHttpInfoAsync(string require = default(string), string include = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetInfoPushWithHttpInfoAsync(string require = default(string), string include = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Download JavaScript /// @@ -330,10 +306,9 @@ public interface ISystemApiAsync : IApiAccessor /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task GetJavaScriptAsync(string variant = default(string), string branch = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetJavaScriptAsync(string variant = default(string), string branch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Download JavaScript @@ -344,10 +319,9 @@ public interface ISystemApiAsync : IApiAccessor /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> GetJavaScriptWithHttpInfoAsync(string variant = default(string), string branch = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetJavaScriptWithHttpInfoAsync(string variant = default(string), string branch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Current System Time /// @@ -355,10 +329,9 @@ public interface ISystemApiAsync : IApiAccessor /// Returns the current time of the API server. **NOTE:** The response type is not a JSON object, but a simple JSON string. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of DateTime - System.Threading.Tasks.Task GetSystemTimeAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetSystemTimeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Current System Time @@ -367,10 +340,9 @@ public interface ISystemApiAsync : IApiAccessor /// Returns the current time of the API server. **NOTE:** The response type is not a JSON object, but a simple JSON string. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (DateTime) - System.Threading.Tasks.Task> GetSystemTimeWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetSystemTimeWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -497,9 +469,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// string - public string GetCSS(string variant = default(string), string branch = default(string), int operationIndex = 0) + public string GetCSS(string variant = default(string), string branch = default(string)) { VRChat.API.Client.ApiResponse localVarResponse = GetCSSWithHttpInfo(variant, branch); return localVarResponse.Data; @@ -511,9 +482,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// ApiResponse of string - public VRChat.API.Client.ApiResponse GetCSSWithHttpInfo(string variant = default(string), string branch = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetCSSWithHttpInfo(string variant = default(string), string branch = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -527,16 +497,10 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (variant != null) { @@ -547,19 +511,14 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "branch", branch)); } - localVarRequestOptions.Operation = "SystemApi.GetCSS"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request var localVarResponse = this.Client.Get("/css/app.css", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetCSS", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -571,12 +530,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task GetCSSAsync(string variant = default(string), string branch = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetCSSAsync(string variant = default(string), string branch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetCSSWithHttpInfoAsync(variant, branch, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetCSSWithHttpInfoAsync(variant, branch, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -586,10 +544,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> GetCSSWithHttpInfoAsync(string variant = default(string), string branch = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetCSSWithHttpInfoAsync(string variant = default(string), string branch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -603,17 +560,12 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (variant != null) { @@ -624,20 +576,15 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "branch", branch)); } - localVarRequestOptions.Operation = "SystemApi.GetCSS"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/css/app.css", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetCSS", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -647,9 +594,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Fetch API Config 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// APIConfig - public APIConfig GetConfig(int operationIndex = 0) + public APIConfig GetConfig() { VRChat.API.Client.ApiResponse localVarResponse = GetConfigWithHttpInfo(); return localVarResponse.Data; @@ -659,9 +605,8 @@ public APIConfig GetConfig(int operationIndex = 0) /// Fetch API Config 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of APIConfig - public VRChat.API.Client.ApiResponse GetConfigWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetConfigWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -674,31 +619,20 @@ public VRChat.API.Client.ApiResponse GetConfigWithHttpInfo(int operat }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "SystemApi.GetConfig"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request var localVarResponse = this.Client.Get("/config", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetConfig", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -708,12 +642,11 @@ public VRChat.API.Client.ApiResponse GetConfigWithHttpInfo(int operat /// Fetch API Config 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of APIConfig - public async System.Threading.Tasks.Task GetConfigAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetConfigAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetConfigWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetConfigWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -721,10 +654,9 @@ public VRChat.API.Client.ApiResponse GetConfigWithHttpInfo(int operat /// Fetch API Config 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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (APIConfig) - public async System.Threading.Tasks.Task> GetConfigWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetConfigWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -737,33 +669,23 @@ public VRChat.API.Client.ApiResponse GetConfigWithHttpInfo(int operat "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "SystemApi.GetConfig"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/config", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetConfig", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -773,9 +695,8 @@ public VRChat.API.Client.ApiResponse GetConfigWithHttpInfo(int operat /// Current Online Users Returns the current number of online users. **NOTE:** The response type is not a JSON object, but a simple JSON integer. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// int - public int GetCurrentOnlineUsers(int operationIndex = 0) + public int GetCurrentOnlineUsers() { VRChat.API.Client.ApiResponse localVarResponse = GetCurrentOnlineUsersWithHttpInfo(); return localVarResponse.Data; @@ -785,9 +706,8 @@ public int GetCurrentOnlineUsers(int operationIndex = 0) /// Current Online Users Returns the current number of online users. **NOTE:** The response type is not a JSON object, but a simple JSON integer. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of int - public VRChat.API.Client.ApiResponse GetCurrentOnlineUsersWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetCurrentOnlineUsersWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -800,31 +720,20 @@ public VRChat.API.Client.ApiResponse GetCurrentOnlineUsersWithHttpInfo(int }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "SystemApi.GetCurrentOnlineUsers"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request var localVarResponse = this.Client.Get("/visits", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetCurrentOnlineUsers", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -834,12 +743,11 @@ public VRChat.API.Client.ApiResponse GetCurrentOnlineUsersWithHttpInfo(int /// Current Online Users Returns the current number of online users. **NOTE:** The response type is not a JSON object, but a simple JSON integer. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of int - public async System.Threading.Tasks.Task GetCurrentOnlineUsersAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetCurrentOnlineUsersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetCurrentOnlineUsersWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetCurrentOnlineUsersWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -847,10 +755,9 @@ public VRChat.API.Client.ApiResponse GetCurrentOnlineUsersWithHttpInfo(int /// Current Online Users Returns the current number of online users. **NOTE:** The response type is not a JSON object, but a simple JSON integer. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (int) - public async System.Threading.Tasks.Task> GetCurrentOnlineUsersWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetCurrentOnlineUsersWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -863,33 +770,23 @@ public VRChat.API.Client.ApiResponse GetCurrentOnlineUsersWithHttpInfo(int "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "SystemApi.GetCurrentOnlineUsers"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/visits", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetCurrentOnlineUsers", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -899,10 +796,9 @@ public VRChat.API.Client.ApiResponse GetCurrentOnlineUsersWithHttpInfo(int /// Check API Health ~~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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// APIHealth [Obsolete] - public APIHealth GetHealth(int operationIndex = 0) + public APIHealth GetHealth() { VRChat.API.Client.ApiResponse localVarResponse = GetHealthWithHttpInfo(); return localVarResponse.Data; @@ -912,10 +808,9 @@ public APIHealth GetHealth(int operationIndex = 0) /// Check API Health ~~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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of APIHealth [Obsolete] - public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -928,31 +823,20 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "SystemApi.GetHealth"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request var localVarResponse = this.Client.Get("/health", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetHealth", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -962,13 +846,12 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat /// Check API Health ~~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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of APIHealth [Obsolete] - public async System.Threading.Tasks.Task GetHealthAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetHealthAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetHealthWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetHealthWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -976,11 +859,10 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat /// Check API Health ~~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. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (APIHealth) [Obsolete] - public async System.Threading.Tasks.Task> GetHealthWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetHealthWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -993,33 +875,23 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "SystemApi.GetHealth"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/health", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetHealth", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1031,9 +903,8 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat /// Thrown when fails to make API call /// Tags to include (comma-separated). All of the tags needs to be present. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// List<InfoPush> - public List GetInfoPush(string require = default(string), string include = default(string), int operationIndex = 0) + public List GetInfoPush(string require = default(string), string include = default(string)) { VRChat.API.Client.ApiResponse> localVarResponse = GetInfoPushWithHttpInfo(require, include); return localVarResponse.Data; @@ -1045,9 +916,8 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat /// Thrown when fails to make API call /// Tags to include (comma-separated). All of the tags needs to be present. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// ApiResponse of List<InfoPush> - public VRChat.API.Client.ApiResponse> GetInfoPushWithHttpInfo(string require = default(string), string include = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetInfoPushWithHttpInfo(string require = default(string), string include = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1060,16 +930,10 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (require != null) { @@ -1080,19 +944,14 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "include", include)); } - localVarRequestOptions.Operation = "SystemApi.GetInfoPush"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request var localVarResponse = this.Client.Get>("/infoPush", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetInfoPush", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1104,12 +963,11 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat /// Thrown when fails to make API call /// Tags to include (comma-separated). All of the tags needs to be present. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<InfoPush> - public async System.Threading.Tasks.Task> GetInfoPushAsync(string require = default(string), string include = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetInfoPushAsync(string require = default(string), string include = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetInfoPushWithHttpInfoAsync(require, include, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetInfoPushWithHttpInfoAsync(require, include, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1119,10 +977,9 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat /// Thrown when fails to make API call /// Tags to include (comma-separated). All of the tags needs to be present. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<InfoPush>) - public async System.Threading.Tasks.Task>> GetInfoPushWithHttpInfoAsync(string require = default(string), string include = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetInfoPushWithHttpInfoAsync(string require = default(string), string include = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1135,17 +992,12 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (require != null) { @@ -1156,20 +1008,15 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "include", include)); } - localVarRequestOptions.Operation = "SystemApi.GetInfoPush"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/infoPush", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetInfoPush", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1181,9 +1028,8 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// string - public string GetJavaScript(string variant = default(string), string branch = default(string), int operationIndex = 0) + public string GetJavaScript(string variant = default(string), string branch = default(string)) { VRChat.API.Client.ApiResponse localVarResponse = GetJavaScriptWithHttpInfo(variant, branch); return localVarResponse.Data; @@ -1195,9 +1041,8 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// ApiResponse of string - public VRChat.API.Client.ApiResponse GetJavaScriptWithHttpInfo(string variant = default(string), string branch = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetJavaScriptWithHttpInfo(string variant = default(string), string branch = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1211,16 +1056,10 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (variant != null) { @@ -1231,19 +1070,14 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "branch", branch)); } - localVarRequestOptions.Operation = "SystemApi.GetJavaScript"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request var localVarResponse = this.Client.Get("/js/app.js", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetJavaScript", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1255,12 +1089,11 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task GetJavaScriptAsync(string variant = default(string), string branch = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetJavaScriptAsync(string variant = default(string), string branch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetJavaScriptWithHttpInfoAsync(variant, branch, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetJavaScriptWithHttpInfoAsync(variant, branch, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1270,10 +1103,9 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat /// Thrown when fails to make API call /// 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) /// Specifies which git branch the site should load frontend source code from. (optional, default to "main") - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> GetJavaScriptWithHttpInfoAsync(string variant = default(string), string branch = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetJavaScriptWithHttpInfoAsync(string variant = default(string), string branch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1287,17 +1119,12 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (variant != null) { @@ -1308,20 +1135,15 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "branch", branch)); } - localVarRequestOptions.Operation = "SystemApi.GetJavaScript"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/js/app.js", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetJavaScript", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1331,9 +1153,8 @@ public VRChat.API.Client.ApiResponse GetHealthWithHttpInfo(int operat /// Current System Time Returns the current time of the API server. **NOTE:** The response type is not a JSON object, but a simple JSON string. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// DateTime - public DateTime GetSystemTime(int operationIndex = 0) + public DateTime GetSystemTime() { VRChat.API.Client.ApiResponse localVarResponse = GetSystemTimeWithHttpInfo(); return localVarResponse.Data; @@ -1343,9 +1164,8 @@ public DateTime GetSystemTime(int operationIndex = 0) /// Current System Time Returns the current time of the API server. **NOTE:** The response type is not a JSON object, but a simple JSON string. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// ApiResponse of DateTime - public VRChat.API.Client.ApiResponse GetSystemTimeWithHttpInfo(int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetSystemTimeWithHttpInfo() { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1358,31 +1178,20 @@ public VRChat.API.Client.ApiResponse GetSystemTimeWithHttpInfo(int ope }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "SystemApi.GetSystemTime"; - localVarRequestOptions.OperationIndex = operationIndex; // make the HTTP request var localVarResponse = this.Client.Get("/time", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetSystemTime", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1392,12 +1201,11 @@ public VRChat.API.Client.ApiResponse GetSystemTimeWithHttpInfo(int ope /// Current System Time Returns the current time of the API server. **NOTE:** The response type is not a JSON object, but a simple JSON string. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of DateTime - public async System.Threading.Tasks.Task GetSystemTimeAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetSystemTimeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetSystemTimeWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetSystemTimeWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1405,10 +1213,9 @@ public VRChat.API.Client.ApiResponse GetSystemTimeWithHttpInfo(int ope /// Current System Time Returns the current time of the API server. **NOTE:** The response type is not a JSON object, but a simple JSON string. /// /// Thrown when fails to make API call - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (DateTime) - public async System.Threading.Tasks.Task> GetSystemTimeWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetSystemTimeWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1421,33 +1228,23 @@ public VRChat.API.Client.ApiResponse GetSystemTimeWithHttpInfo(int ope "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.Operation = "SystemApi.GetSystemTime"; - localVarRequestOptions.OperationIndex = operationIndex; // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/time", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetSystemTime", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/UsersApi.cs b/src/VRChat.API/Api/UsersApi.cs index 7a137901..c3c1092f 100644 --- a/src/VRChat.API/Api/UsersApi.cs +++ b/src/VRChat.API/Api/UsersApi.cs @@ -33,10 +33,9 @@ public interface IUsersApiSync : IApiAccessor /// Get public user information about a specific user using their ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// User - User GetUser(string userId, int operationIndex = 0); + User GetUser(string userId); /// /// Get User by ID @@ -45,10 +44,9 @@ public interface IUsersApiSync : IApiAccessor /// Get public user information about a specific user using their ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of User - ApiResponse GetUserWithHttpInfo(string userId, int operationIndex = 0); + ApiResponse GetUserWithHttpInfo(string userId); /// /// Get User by Username /// @@ -56,11 +54,10 @@ public interface IUsersApiSync : IApiAccessor /// ~~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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Username of the user /// User [Obsolete] - User GetUserByName(string username, int operationIndex = 0); + User GetUserByName(string username); /// /// Get User by Username @@ -69,11 +66,52 @@ public interface IUsersApiSync : IApiAccessor /// ~~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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Username of the user /// ApiResponse of User [Obsolete] - ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0); + ApiResponse GetUserByNameWithHttpInfo(string username); + /// + /// Get User Group Requests + /// + /// + /// Returns a list of Groups the user has requested to be invited into. + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// List<Group> + List GetUserGroupRequests(string userId); + + /// + /// Get User Group Requests + /// + /// + /// Returns a list of Groups the user has requested to be invited into. + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// ApiResponse of List<Group> + ApiResponse> GetUserGroupRequestsWithHttpInfo(string userId); + /// + /// Get User Groups + /// + /// + /// Get user's public groups + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// List<Group> + List GetUserGroups(string userId); + + /// + /// Get User Groups + /// + /// + /// Get user's public groups + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// ApiResponse of List<Group> + ApiResponse> GetUserGroupsWithHttpInfo(string userId); /// /// Search All Users /// @@ -85,9 +123,8 @@ public interface IUsersApiSync : IApiAccessor /// Active user by developer type, none for normal users and internal for moderators (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// List<LimitedUser> - List SearchUsers(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0); + List SearchUsers(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?)); /// /// Search All Users @@ -100,9 +137,8 @@ public interface IUsersApiSync : IApiAccessor /// Active user by developer type, none for normal users and internal for moderators (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedUser> - ApiResponse> SearchUsersWithHttpInfo(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0); + ApiResponse> SearchUsersWithHttpInfo(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?)); /// /// Update User Info /// @@ -110,11 +146,10 @@ public interface IUsersApiSync : IApiAccessor /// Update a users information such as the email and birthday. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// CurrentUser - CurrentUser UpdateUser(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), int operationIndex = 0); + CurrentUser UpdateUser(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest)); /// /// Update User Info @@ -123,11 +158,10 @@ public interface IUsersApiSync : IApiAccessor /// Update a users information such as the email and birthday. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// ApiResponse of CurrentUser - ApiResponse UpdateUserWithHttpInfo(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), int operationIndex = 0); + ApiResponse UpdateUserWithHttpInfo(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest)); #endregion Synchronous Operations } @@ -144,11 +178,10 @@ public interface IUsersApiAsync : IApiAccessor /// Get public user information about a specific user using their ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of User - System.Threading.Tasks.Task GetUserAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetUserAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get User by ID @@ -157,11 +190,10 @@ public interface IUsersApiAsync : IApiAccessor /// Get public user information about a specific user using their ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - System.Threading.Tasks.Task> GetUserWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetUserWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get User by Username /// @@ -169,12 +201,11 @@ public interface IUsersApiAsync : IApiAccessor /// ~~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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Username of the user /// Cancellation Token to cancel the request. /// Task of User [Obsolete] - System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get User by Username @@ -183,12 +214,57 @@ public interface IUsersApiAsync : IApiAccessor /// ~~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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Username of the user /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) [Obsolete] - System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get User Group Requests + /// + /// + /// Returns a list of Groups the user has requested to be invited into. + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of List<Group> + System.Threading.Tasks.Task> GetUserGroupRequestsAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get User Group Requests + /// + /// + /// Returns a list of Groups the user has requested to be invited into. + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Group>) + System.Threading.Tasks.Task>> GetUserGroupRequestsWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get User Groups + /// + /// + /// Get user's public groups + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of List<Group> + System.Threading.Tasks.Task> GetUserGroupsAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get User Groups + /// + /// + /// Get user's public groups + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Group>) + System.Threading.Tasks.Task>> GetUserGroupsWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Search All Users /// @@ -200,10 +276,9 @@ public interface IUsersApiAsync : IApiAccessor /// Active user by developer type, none for normal users and internal for moderators (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedUser> - System.Threading.Tasks.Task> SearchUsersAsync(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SearchUsersAsync(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Search All Users @@ -216,10 +291,9 @@ public interface IUsersApiAsync : IApiAccessor /// Active user by developer type, none for normal users and internal for moderators (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedUser>) - System.Threading.Tasks.Task>> SearchUsersWithHttpInfoAsync(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> SearchUsersWithHttpInfoAsync(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update User Info /// @@ -227,12 +301,11 @@ public interface IUsersApiAsync : IApiAccessor /// Update a users information such as the email and birthday. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of CurrentUser - System.Threading.Tasks.Task UpdateUserAsync(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateUserAsync(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update User Info @@ -241,12 +314,11 @@ public interface IUsersApiAsync : IApiAccessor /// Update a users information such as the email and birthday. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CurrentUser) - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -371,10 +443,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// Get User by ID Get public user information about a specific user using their ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// User - public User GetUser(string userId, int operationIndex = 0) + public User GetUser(string userId) { VRChat.API.Client.ApiResponse localVarResponse = GetUserWithHttpInfo(userId); return localVarResponse.Data; @@ -384,16 +455,13 @@ public User GetUser(string userId, int operationIndex = 0) /// Get User by ID Get public user information about a specific user using their ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// ApiResponse of User - public VRChat.API.Client.ApiResponse GetUserWithHttpInfo(string userId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetUserWithHttpInfo(string userId) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling UsersApi->GetUser"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -406,22 +474,13 @@ public VRChat.API.Client.ApiResponse GetUserWithHttpInfo(string userId, in }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "UsersApi.GetUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -437,13 +496,11 @@ public VRChat.API.Client.ApiResponse GetUserWithHttpInfo(string userId, in // make the HTTP request var localVarResponse = this.Client.Get("/users/{userId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -453,13 +510,12 @@ public VRChat.API.Client.ApiResponse GetUserWithHttpInfo(string userId, in /// Get User by ID Get public user information about a specific user using their ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of User - public async System.Threading.Tasks.Task GetUserAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetUserAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetUserWithHttpInfoAsync(userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetUserWithHttpInfoAsync(userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -467,17 +523,14 @@ public VRChat.API.Client.ApiResponse GetUserWithHttpInfo(string userId, in /// Get User by ID Get public user information about a specific user using their ID. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid user ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> GetUserWithHttpInfoAsync(string userId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetUserWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling UsersApi->GetUser"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -490,23 +543,15 @@ public VRChat.API.Client.ApiResponse GetUserWithHttpInfo(string userId, in "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter - localVarRequestOptions.Operation = "UsersApi.GetUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -521,15 +566,13 @@ public VRChat.API.Client.ApiResponse GetUserWithHttpInfo(string userId, in } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/users/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -539,11 +582,10 @@ public VRChat.API.Client.ApiResponse GetUserWithHttpInfo(string userId, in /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Username of the user /// User [Obsolete] - public User GetUserByName(string username, int operationIndex = 0) + public User GetUserByName(string username) { VRChat.API.Client.ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); return localVarResponse.Data; @@ -553,17 +595,14 @@ public User GetUserByName(string username, int operationIndex = 0) /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Username of the user /// ApiResponse of User [Obsolete] - public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string username, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string username) { // verify the required parameter 'username' is set if (username == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'username' when calling UsersApi->GetUserByName"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -576,22 +615,13 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("username", VRChat.API.Client.ClientUtils.ParameterToString(username)); // path parameter - localVarRequestOptions.Operation = "UsersApi.GetUserByName"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -607,13 +637,11 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user // make the HTTP request var localVarResponse = this.Client.Get("/users/{username}/name", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetUserByName", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -623,14 +651,13 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Username of the user /// Cancellation Token to cancel the request. /// Task of User [Obsolete] - public async System.Threading.Tasks.Task GetUserByNameAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -638,19 +665,155 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Username of the user /// Cancellation Token to cancel the request. /// Task of ApiResponse (User) [Obsolete] - public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'username' is set if (username == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'username' when calling UsersApi->GetUserByName"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("username", VRChat.API.Client.ClientUtils.ParameterToString(username)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync("/users/{username}/name", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetUserByName", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get User Group Requests Returns a list of Groups the user has requested to be invited into. + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// List<Group> + public List GetUserGroupRequests(string userId) + { + VRChat.API.Client.ApiResponse> localVarResponse = GetUserGroupRequestsWithHttpInfo(userId); + return localVarResponse.Data; + } + + /// + /// Get User Group Requests Returns a list of Groups the user has requested to be invited into. + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// ApiResponse of List<Group> + public VRChat.API.Client.ApiResponse> GetUserGroupRequestsWithHttpInfo(string userId) + { + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling UsersApi->GetUserGroupRequests"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/users/{userId}/groups/requested", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetUserGroupRequests", localVarResponse); + if (_exception != null) throw _exception; } + return localVarResponse; + } + + /// + /// Get User Group Requests Returns a list of Groups the user has requested to be invited into. + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of List<Group> + public async System.Threading.Tasks.Task> GetUserGroupRequestsAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await GetUserGroupRequestsWithHttpInfoAsync(userId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get User Group Requests Returns a list of Groups the user has requested to be invited into. + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Group>) + public async System.Threading.Tasks.Task>> GetUserGroupRequestsWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling UsersApi->GetUserGroupRequests"); + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -662,22 +825,153 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync>("/users/{userId}/groups/requested", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + Exception _exception = this.ExceptionFactory("GetUserGroupRequests", localVarResponse); + if (_exception != null) throw _exception; } + return localVarResponse; + } + + /// + /// Get User Groups Get user's public groups + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// List<Group> + public List GetUserGroups(string userId) + { + VRChat.API.Client.ApiResponse> localVarResponse = GetUserGroupsWithHttpInfo(userId); + return localVarResponse.Data; + } + + /// + /// Get User Groups Get user's public groups + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// ApiResponse of List<Group> + public VRChat.API.Client.ApiResponse> GetUserGroupsWithHttpInfo(string userId) + { + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling UsersApi->GetUserGroups"); + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter + + // authentication (apiKeyCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("apiKey", this.Configuration.GetApiKeyWithPrefix("apiKey"))); + } + // authentication (authCookie) required + // cookie parameter support + if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("auth"))) + { + localVarRequestOptions.Cookies.Add(new Cookie("auth", this.Configuration.GetApiKeyWithPrefix("auth"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/users/{userId}/groups", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + Exception _exception = this.ExceptionFactory("GetUserGroups", localVarResponse); + if (_exception != null) throw _exception; } - localVarRequestOptions.PathParameters.Add("username", VRChat.API.Client.ClientUtils.ParameterToString(username)); // path parameter + return localVarResponse; + } - localVarRequestOptions.Operation = "UsersApi.GetUserByName"; - localVarRequestOptions.OperationIndex = operationIndex; + /// + /// Get User Groups Get user's public groups + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of List<Group> + public async System.Threading.Tasks.Task> GetUserGroupsAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + VRChat.API.Client.ApiResponse> localVarResponse = await GetUserGroupsWithHttpInfoAsync(userId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get User Groups Get user's public groups + /// + /// Thrown when fails to make API call + /// Must be a valid user ID. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Group>) + public async System.Threading.Tasks.Task>> GetUserGroupsWithHttpInfoAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'userId' is set + if (userId == null) + throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling UsersApi->GetUserGroups"); + + + VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter // authentication (apiKeyCookie) required // cookie parameter support @@ -693,15 +987,13 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/users/{username}/name", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + var localVarResponse = await this.AsynchronousClient.GetAsync>("/users/{userId}/groups", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetUserByName", localVarResponse); - if (_exception != null) - { - throw _exception; - } + Exception _exception = this.ExceptionFactory("GetUserGroups", localVarResponse); + if (_exception != null) throw _exception; } return localVarResponse; @@ -715,9 +1007,8 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user /// Active user by developer type, none for normal users and internal for moderators (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// List<LimitedUser> - public List SearchUsers(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0) + public List SearchUsers(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?)) { VRChat.API.Client.ApiResponse> localVarResponse = SearchUsersWithHttpInfo(search, developerType, n, offset); return localVarResponse.Data; @@ -731,9 +1022,8 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user /// Active user by developer type, none for normal users and internal for moderators (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedUser> - public VRChat.API.Client.ApiResponse> SearchUsersWithHttpInfo(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> SearchUsersWithHttpInfo(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -746,16 +1036,10 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (search != null) { @@ -774,9 +1058,6 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); } - localVarRequestOptions.Operation = "UsersApi.SearchUsers"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -792,13 +1073,11 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user // make the HTTP request var localVarResponse = this.Client.Get>("/users", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SearchUsers", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -812,12 +1091,11 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user /// Active user by developer type, none for normal users and internal for moderators (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedUser> - public async System.Threading.Tasks.Task> SearchUsersAsync(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SearchUsersAsync(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await SearchUsersWithHttpInfoAsync(search, developerType, n, offset, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await SearchUsersWithHttpInfoAsync(search, developerType, n, offset, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -829,10 +1107,9 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user /// Active user by developer type, none for normal users and internal for moderators (optional) /// The number of objects to return. (optional, default to 60) /// A zero-based offset from the default object sorting from where search results start. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedUser>) - public async System.Threading.Tasks.Task>> SearchUsersWithHttpInfoAsync(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> SearchUsersWithHttpInfoAsync(string search = default(string), string developerType = default(string), int? n = default(int?), int? offset = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -845,17 +1122,12 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (search != null) { @@ -874,9 +1146,6 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); } - localVarRequestOptions.Operation = "UsersApi.SearchUsers"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -891,15 +1160,13 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/users", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SearchUsers", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -909,11 +1176,10 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user /// Update User Info Update a users information such as the email and birthday. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// CurrentUser - public CurrentUser UpdateUser(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), int operationIndex = 0) + public CurrentUser UpdateUser(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest)) { VRChat.API.Client.ApiResponse localVarResponse = UpdateUserWithHttpInfo(userId, updateUserRequest); return localVarResponse.Data; @@ -923,17 +1189,14 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user /// Update User Info Update a users information such as the email and birthday. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// ApiResponse of CurrentUser - public VRChat.API.Client.ApiResponse UpdateUserWithHttpInfo(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse UpdateUserWithHttpInfo(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling UsersApi->UpdateUser"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -947,23 +1210,14 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.Data = updateUserRequest; - localVarRequestOptions.Operation = "UsersApi.UpdateUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -979,13 +1233,11 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user // make the HTTP request var localVarResponse = this.Client.Put("/users/{userId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -995,14 +1247,13 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user /// Update User Info Update a users information such as the email and birthday. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of CurrentUser - public async System.Threading.Tasks.Task UpdateUserAsync(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateUserAsync(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await UpdateUserWithHttpInfoAsync(userId, updateUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await UpdateUserWithHttpInfoAsync(userId, updateUserRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1010,18 +1261,15 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user /// Update User Info Update a users information such as the email and birthday. /// /// Thrown when fails to make API call - /// + /// Must be a valid user ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CurrentUser) - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string userId, UpdateUserRequest updateUserRequest = default(UpdateUserRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'userId' is set if (userId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'userId' when calling UsersApi->UpdateUser"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1035,24 +1283,16 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("userId", VRChat.API.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.Data = updateUserRequest; - localVarRequestOptions.Operation = "UsersApi.UpdateUser"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1067,15 +1307,13 @@ public VRChat.API.Client.ApiResponse GetUserByNameWithHttpInfo(string user } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/users/{userId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Api/WorldsApi.cs b/src/VRChat.API/Api/WorldsApi.cs index 500f656d..d4c95595 100644 --- a/src/VRChat.API/Api/WorldsApi.cs +++ b/src/VRChat.API/Api/WorldsApi.cs @@ -34,9 +34,8 @@ public interface IWorldsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// World - World CreateWorld(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), int operationIndex = 0); + World CreateWorld(CreateWorldRequest createWorldRequest = default(CreateWorldRequest)); /// /// Create World @@ -46,9 +45,8 @@ public interface IWorldsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of World - ApiResponse CreateWorldWithHttpInfo(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), int operationIndex = 0); + ApiResponse CreateWorldWithHttpInfo(CreateWorldRequest createWorldRequest = default(CreateWorldRequest)); /// /// Delete World /// @@ -56,10 +54,9 @@ public interface IWorldsApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// - void DeleteWorld(string worldId, int operationIndex = 0); + void DeleteWorld(string worldId); /// /// Delete World @@ -68,10 +65,9 @@ public interface IWorldsApiSync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of Object(void) - ApiResponse DeleteWorldWithHttpInfo(string worldId, int operationIndex = 0); + ApiResponse DeleteWorldWithHttpInfo(string worldId); /// /// List Active Worlds /// @@ -80,20 +76,19 @@ public interface IWorldsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// List<LimitedWorld> - List GetActiveWorlds(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0); + List GetActiveWorlds(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)); /// /// List Active Worlds @@ -103,20 +98,19 @@ public interface IWorldsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedWorld> - ApiResponse> GetActiveWorldsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0); + ApiResponse> GetActiveWorldsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)); /// /// List Favorited Worlds /// @@ -125,21 +119,20 @@ public interface IWorldsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// List<LimitedWorld> - List GetFavoritedWorlds(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0); + List GetFavoritedWorlds(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)); /// /// List Favorited Worlds @@ -149,21 +142,20 @@ public interface IWorldsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedWorld> - ApiResponse> GetFavoritedWorldsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0); + ApiResponse> GetFavoritedWorldsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)); /// /// List Recent Worlds /// @@ -172,21 +164,20 @@ public interface IWorldsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// List<LimitedWorld> - List GetRecentWorlds(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0); + List GetRecentWorlds(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)); /// /// List Recent Worlds @@ -196,21 +187,20 @@ public interface IWorldsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedWorld> - ApiResponse> GetRecentWorldsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0); + ApiResponse> GetRecentWorldsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)); /// /// Get World by ID /// @@ -218,10 +208,9 @@ public interface IWorldsApiSync : IApiAccessor /// Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// World - World GetWorld(string worldId, int operationIndex = 0); + World GetWorld(string worldId); /// /// Get World by ID @@ -230,10 +219,9 @@ public interface IWorldsApiSync : IApiAccessor /// Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of World - ApiResponse GetWorldWithHttpInfo(string worldId, int operationIndex = 0); + ApiResponse GetWorldWithHttpInfo(string worldId); /// /// Get World Instance /// @@ -241,11 +229,10 @@ public interface IWorldsApiSync : IApiAccessor /// Returns a worlds instance. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Instance - Instance GetWorldInstance(string worldId, string instanceId, int operationIndex = 0); + Instance GetWorldInstance(string worldId, string instanceId); /// /// Get World Instance @@ -254,11 +241,10 @@ public interface IWorldsApiSync : IApiAccessor /// Returns a worlds instance. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// ApiResponse of Instance - ApiResponse GetWorldInstanceWithHttpInfo(string worldId, string instanceId, int operationIndex = 0); + ApiResponse GetWorldInstanceWithHttpInfo(string worldId, string instanceId); /// /// Get World Metadata /// @@ -266,11 +252,10 @@ public interface IWorldsApiSync : IApiAccessor /// Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// WorldMetadata [Obsolete] - WorldMetadata GetWorldMetadata(string worldId, int operationIndex = 0); + WorldMetadata GetWorldMetadata(string worldId); /// /// Get World Metadata @@ -279,11 +264,10 @@ public interface IWorldsApiSync : IApiAccessor /// Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of WorldMetadata [Obsolete] - ApiResponse GetWorldMetadataWithHttpInfo(string worldId, int operationIndex = 0); + ApiResponse GetWorldMetadataWithHttpInfo(string worldId); /// /// Get World Publish Status /// @@ -291,10 +275,9 @@ public interface IWorldsApiSync : IApiAccessor /// Returns a worlds publish status. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// WorldPublishStatus - WorldPublishStatus GetWorldPublishStatus(string worldId, int operationIndex = 0); + WorldPublishStatus GetWorldPublishStatus(string worldId); /// /// Get World Publish Status @@ -303,10 +286,9 @@ public interface IWorldsApiSync : IApiAccessor /// Returns a worlds publish status. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of WorldPublishStatus - ApiResponse GetWorldPublishStatusWithHttpInfo(string worldId, int operationIndex = 0); + ApiResponse GetWorldPublishStatusWithHttpInfo(string worldId); /// /// Publish World /// @@ -314,10 +296,9 @@ public interface IWorldsApiSync : IApiAccessor /// Publish a world. You can only publish one world per week. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// - void PublishWorld(string worldId, int operationIndex = 0); + void PublishWorld(string worldId); /// /// Publish World @@ -326,10 +307,9 @@ public interface IWorldsApiSync : IApiAccessor /// Publish a world. You can only publish one world per week. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of Object(void) - ApiResponse PublishWorldWithHttpInfo(string worldId, int operationIndex = 0); + ApiResponse PublishWorldWithHttpInfo(string worldId); /// /// Search All Worlds /// @@ -338,22 +318,21 @@ public interface IWorldsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own worlds. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// List<LimitedWorld> - List SearchWorlds(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0); + List SearchWorlds(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)); /// /// Search All Worlds @@ -363,22 +342,21 @@ public interface IWorldsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own worlds. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedWorld> - ApiResponse> SearchWorldsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0); + ApiResponse> SearchWorldsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)); /// /// Unpublish World /// @@ -386,10 +364,9 @@ public interface IWorldsApiSync : IApiAccessor /// Unpublish a world. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// - void UnpublishWorld(string worldId, int operationIndex = 0); + void UnpublishWorld(string worldId); /// /// Unpublish World @@ -398,10 +375,9 @@ public interface IWorldsApiSync : IApiAccessor /// Unpublish a world. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of Object(void) - ApiResponse UnpublishWorldWithHttpInfo(string worldId, int operationIndex = 0); + ApiResponse UnpublishWorldWithHttpInfo(string worldId); /// /// Update World /// @@ -409,11 +385,10 @@ public interface IWorldsApiSync : IApiAccessor /// Update information about a specific World. /// /// Thrown when fails to make API call - /// + /// Must be a valid world ID. /// (optional) - /// Index associated with the operation. /// World - World UpdateWorld(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), int operationIndex = 0); + World UpdateWorld(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest)); /// /// Update World @@ -422,11 +397,10 @@ public interface IWorldsApiSync : IApiAccessor /// Update information about a specific World. /// /// Thrown when fails to make API call - /// + /// Must be a valid world ID. /// (optional) - /// Index associated with the operation. /// ApiResponse of World - ApiResponse UpdateWorldWithHttpInfo(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), int operationIndex = 0); + ApiResponse UpdateWorldWithHttpInfo(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest)); #endregion Synchronous Operations } @@ -444,10 +418,9 @@ public interface IWorldsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of World - System.Threading.Tasks.Task CreateWorldAsync(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateWorldAsync(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create World @@ -457,10 +430,9 @@ public interface IWorldsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (World) - System.Threading.Tasks.Task> CreateWorldWithHttpInfoAsync(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateWorldWithHttpInfoAsync(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete World /// @@ -468,11 +440,10 @@ public interface IWorldsApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteWorldAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteWorldAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete World @@ -481,11 +452,10 @@ public interface IWorldsApiAsync : IApiAccessor /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteWorldWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteWorldWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Active Worlds /// @@ -494,21 +464,20 @@ public interface IWorldsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedWorld> - System.Threading.Tasks.Task> GetActiveWorldsAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetActiveWorldsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Active Worlds @@ -518,21 +487,20 @@ public interface IWorldsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedWorld>) - System.Threading.Tasks.Task>> GetActiveWorldsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetActiveWorldsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Favorited Worlds /// @@ -541,22 +509,21 @@ public interface IWorldsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedWorld> - System.Threading.Tasks.Task> GetFavoritedWorldsAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFavoritedWorldsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Favorited Worlds @@ -566,22 +533,21 @@ public interface IWorldsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedWorld>) - System.Threading.Tasks.Task>> GetFavoritedWorldsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetFavoritedWorldsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Recent Worlds /// @@ -590,22 +556,21 @@ public interface IWorldsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedWorld> - System.Threading.Tasks.Task> GetRecentWorldsAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetRecentWorldsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Recent Worlds @@ -615,22 +580,21 @@ public interface IWorldsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedWorld>) - System.Threading.Tasks.Task>> GetRecentWorldsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> GetRecentWorldsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get World by ID /// @@ -638,11 +602,10 @@ public interface IWorldsApiAsync : IApiAccessor /// Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of World - System.Threading.Tasks.Task GetWorldAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetWorldAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get World by ID @@ -651,11 +614,10 @@ public interface IWorldsApiAsync : IApiAccessor /// Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (World) - System.Threading.Tasks.Task> GetWorldWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetWorldWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get World Instance /// @@ -663,12 +625,11 @@ public interface IWorldsApiAsync : IApiAccessor /// Returns a worlds instance. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of Instance - System.Threading.Tasks.Task GetWorldInstanceAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetWorldInstanceAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get World Instance @@ -677,12 +638,11 @@ public interface IWorldsApiAsync : IApiAccessor /// Returns a worlds instance. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Instance) - System.Threading.Tasks.Task> GetWorldInstanceWithHttpInfoAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetWorldInstanceWithHttpInfoAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get World Metadata /// @@ -690,12 +650,11 @@ public interface IWorldsApiAsync : IApiAccessor /// Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of WorldMetadata [Obsolete] - System.Threading.Tasks.Task GetWorldMetadataAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetWorldMetadataAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get World Metadata @@ -704,12 +663,11 @@ public interface IWorldsApiAsync : IApiAccessor /// Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (WorldMetadata) [Obsolete] - System.Threading.Tasks.Task> GetWorldMetadataWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetWorldMetadataWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get World Publish Status /// @@ -717,11 +675,10 @@ public interface IWorldsApiAsync : IApiAccessor /// Returns a worlds publish status. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of WorldPublishStatus - System.Threading.Tasks.Task GetWorldPublishStatusAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetWorldPublishStatusAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get World Publish Status @@ -730,11 +687,10 @@ public interface IWorldsApiAsync : IApiAccessor /// Returns a worlds publish status. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (WorldPublishStatus) - System.Threading.Tasks.Task> GetWorldPublishStatusWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetWorldPublishStatusWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Publish World /// @@ -742,11 +698,10 @@ public interface IWorldsApiAsync : IApiAccessor /// Publish a world. You can only publish one world per week. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task PublishWorldAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task PublishWorldAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Publish World @@ -755,11 +710,10 @@ public interface IWorldsApiAsync : IApiAccessor /// Publish a world. You can only publish one world per week. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> PublishWorldWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PublishWorldWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Search All Worlds /// @@ -768,23 +722,22 @@ public interface IWorldsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own worlds. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedWorld> - System.Threading.Tasks.Task> SearchWorldsAsync(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SearchWorldsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Search All Worlds @@ -794,23 +747,22 @@ public interface IWorldsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own worlds. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedWorld>) - System.Threading.Tasks.Task>> SearchWorldsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> SearchWorldsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Unpublish World /// @@ -818,11 +770,10 @@ public interface IWorldsApiAsync : IApiAccessor /// Unpublish a world. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UnpublishWorldAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UnpublishWorldAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Unpublish World @@ -831,11 +782,10 @@ public interface IWorldsApiAsync : IApiAccessor /// Unpublish a world. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UnpublishWorldWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UnpublishWorldWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update World /// @@ -843,12 +793,11 @@ public interface IWorldsApiAsync : IApiAccessor /// Update information about a specific World. /// /// Thrown when fails to make API call - /// + /// Must be a valid world ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of World - System.Threading.Tasks.Task UpdateWorldAsync(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateWorldAsync(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update World @@ -857,12 +806,11 @@ public interface IWorldsApiAsync : IApiAccessor /// Update information about a specific World. /// /// Thrown when fails to make API call - /// + /// Must be a valid world ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (World) - System.Threading.Tasks.Task> UpdateWorldWithHttpInfoAsync(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateWorldWithHttpInfoAsync(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -988,9 +936,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// World - public World CreateWorld(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), int operationIndex = 0) + public World CreateWorld(CreateWorldRequest createWorldRequest = default(CreateWorldRequest)) { VRChat.API.Client.ApiResponse localVarResponse = CreateWorldWithHttpInfo(createWorldRequest); return localVarResponse.Data; @@ -1001,9 +948,8 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// ApiResponse of World - public VRChat.API.Client.ApiResponse CreateWorldWithHttpInfo(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse CreateWorldWithHttpInfo(CreateWorldRequest createWorldRequest = default(CreateWorldRequest)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1017,32 +963,21 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = createWorldRequest; - localVarRequestOptions.Operation = "WorldsApi.CreateWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request var localVarResponse = this.Client.Post("/worlds", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1053,12 +988,11 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of World - public async System.Threading.Tasks.Task CreateWorldAsync(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateWorldAsync(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await CreateWorldWithHttpInfoAsync(createWorldRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await CreateWorldWithHttpInfoAsync(createWorldRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1067,10 +1001,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (World) - public async System.Threading.Tasks.Task> CreateWorldWithHttpInfoAsync(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateWorldWithHttpInfoAsync(CreateWorldRequest createWorldRequest = default(CreateWorldRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1084,34 +1017,24 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.Data = createWorldRequest; - localVarRequestOptions.Operation = "WorldsApi.CreateWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/worlds", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1121,10 +1044,9 @@ public VRChat.API.Client.ExceptionFactory ExceptionFactory /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// - public void DeleteWorld(string worldId, int operationIndex = 0) + public void DeleteWorld(string worldId) { DeleteWorldWithHttpInfo(worldId); } @@ -1133,16 +1055,13 @@ public void DeleteWorld(string worldId, int operationIndex = 0) /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of Object(void) - public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worldId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worldId) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->DeleteWorld"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1155,22 +1074,13 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.DeleteWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1186,13 +1096,11 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl // make the HTTP request var localVarResponse = this.Client.Delete("/worlds/{worldId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1202,30 +1110,26 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteWorldAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteWorldAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteWorldWithHttpInfoAsync(worldId, operationIndex, cancellationToken).ConfigureAwait(false); + await DeleteWorldWithHttpInfoAsync(worldId, cancellationToken).ConfigureAwait(false); } /// /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteWorldWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteWorldWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->DeleteWorld"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1238,23 +1142,15 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.DeleteWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1269,15 +1165,13 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/worlds/{worldId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1288,20 +1182,19 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// List<LimitedWorld> - public List GetActiveWorlds(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0) + public List GetActiveWorlds(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)) { VRChat.API.Client.ApiResponse> localVarResponse = GetActiveWorldsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); return localVarResponse.Data; @@ -1312,20 +1205,19 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedWorld> - public VRChat.API.Client.ApiResponse> GetActiveWorldsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetActiveWorldsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1338,16 +1230,10 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -1398,9 +1284,6 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "platform", platform)); } - localVarRequestOptions.Operation = "WorldsApi.GetActiveWorlds"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1416,13 +1299,11 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl // make the HTTP request var localVarResponse = this.Client.Get>("/worlds/active", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetActiveWorlds", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1433,23 +1314,22 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedWorld> - public async System.Threading.Tasks.Task> GetActiveWorldsAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetActiveWorldsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetActiveWorldsWithHttpInfoAsync(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetActiveWorldsWithHttpInfoAsync(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1458,21 +1338,20 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedWorld>) - public async System.Threading.Tasks.Task>> GetActiveWorldsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetActiveWorldsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1485,17 +1364,12 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -1546,9 +1420,6 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "platform", platform)); } - localVarRequestOptions.Operation = "WorldsApi.GetActiveWorlds"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1563,15 +1434,13 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/worlds/active", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetActiveWorlds", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1582,21 +1451,20 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// List<LimitedWorld> - public List GetFavoritedWorlds(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0) + public List GetFavoritedWorlds(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)) { VRChat.API.Client.ApiResponse> localVarResponse = GetFavoritedWorldsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); return localVarResponse.Data; @@ -1607,21 +1475,20 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedWorld> - public VRChat.API.Client.ApiResponse> GetFavoritedWorldsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetFavoritedWorldsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1634,16 +1501,10 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -1698,9 +1559,6 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "userId", userId)); } - localVarRequestOptions.Operation = "WorldsApi.GetFavoritedWorlds"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1716,13 +1574,11 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl // make the HTTP request var localVarResponse = this.Client.Get>("/worlds/favorites", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavoritedWorlds", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1733,24 +1589,23 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedWorld> - public async System.Threading.Tasks.Task> GetFavoritedWorldsAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFavoritedWorldsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetFavoritedWorldsWithHttpInfoAsync(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetFavoritedWorldsWithHttpInfoAsync(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1759,22 +1614,21 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedWorld>) - public async System.Threading.Tasks.Task>> GetFavoritedWorldsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetFavoritedWorldsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1787,17 +1641,12 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -1852,9 +1701,6 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "userId", userId)); } - localVarRequestOptions.Operation = "WorldsApi.GetFavoritedWorlds"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -1869,15 +1715,13 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/worlds/favorites", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFavoritedWorlds", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -1888,21 +1732,20 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// List<LimitedWorld> - public List GetRecentWorlds(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0) + public List GetRecentWorlds(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)) { VRChat.API.Client.ApiResponse> localVarResponse = GetRecentWorldsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); return localVarResponse.Data; @@ -1913,21 +1756,20 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedWorld> - public VRChat.API.Client.ApiResponse> GetRecentWorldsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> GetRecentWorldsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -1940,16 +1782,10 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -2004,9 +1840,6 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "userId", userId)); } - localVarRequestOptions.Operation = "WorldsApi.GetRecentWorlds"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2022,13 +1855,11 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl // make the HTTP request var localVarResponse = this.Client.Get>("/worlds/recent", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetRecentWorlds", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2039,24 +1870,23 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedWorld> - public async System.Threading.Tasks.Task> GetRecentWorldsAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetRecentWorldsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await GetRecentWorldsWithHttpInfoAsync(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await GetRecentWorldsWithHttpInfoAsync(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2065,22 +1895,21 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) /// Target user to see information on, admin-only. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedWorld>) - public async System.Threading.Tasks.Task>> GetRecentWorldsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> GetRecentWorldsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), string userId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2093,17 +1922,12 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -2158,9 +1982,6 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "userId", userId)); } - localVarRequestOptions.Operation = "WorldsApi.GetRecentWorlds"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2175,15 +1996,13 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/worlds/recent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetRecentWorlds", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2193,10 +2012,9 @@ public VRChat.API.Client.ApiResponse DeleteWorldWithHttpInfo(string worl /// Get World by ID Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// World - public World GetWorld(string worldId, int operationIndex = 0) + public World GetWorld(string worldId) { VRChat.API.Client.ApiResponse localVarResponse = GetWorldWithHttpInfo(worldId); return localVarResponse.Data; @@ -2206,16 +2024,13 @@ public World GetWorld(string worldId, int operationIndex = 0) /// Get World by ID Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of World - public VRChat.API.Client.ApiResponse GetWorldWithHttpInfo(string worldId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetWorldWithHttpInfo(string worldId) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->GetWorld"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2228,22 +2043,13 @@ public VRChat.API.Client.ApiResponse GetWorldWithHttpInfo(string worldId, }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.GetWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2253,13 +2059,11 @@ public VRChat.API.Client.ApiResponse GetWorldWithHttpInfo(string worldId, // make the HTTP request var localVarResponse = this.Client.Get("/worlds/{worldId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2269,13 +2073,12 @@ public VRChat.API.Client.ApiResponse GetWorldWithHttpInfo(string worldId, /// Get World by ID Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of World - public async System.Threading.Tasks.Task GetWorldAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetWorldAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetWorldWithHttpInfoAsync(worldId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetWorldWithHttpInfoAsync(worldId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2283,17 +2086,14 @@ public VRChat.API.Client.ApiResponse GetWorldWithHttpInfo(string worldId, /// Get World by ID Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (World) - public async System.Threading.Tasks.Task> GetWorldWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWorldWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->GetWorld"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2306,23 +2106,15 @@ public VRChat.API.Client.ApiResponse GetWorldWithHttpInfo(string worldId, "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.GetWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2331,15 +2123,13 @@ public VRChat.API.Client.ApiResponse GetWorldWithHttpInfo(string worldId, } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/worlds/{worldId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2349,11 +2139,10 @@ public VRChat.API.Client.ApiResponse GetWorldWithHttpInfo(string worldId, /// Get World Instance Returns a worlds instance. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Instance - public Instance GetWorldInstance(string worldId, string instanceId, int operationIndex = 0) + public Instance GetWorldInstance(string worldId, string instanceId) { VRChat.API.Client.ApiResponse localVarResponse = GetWorldInstanceWithHttpInfo(worldId, instanceId); return localVarResponse.Data; @@ -2363,23 +2152,18 @@ public Instance GetWorldInstance(string worldId, string instanceId, int operatio /// Get World Instance Returns a worlds instance. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// ApiResponse of Instance - public VRChat.API.Client.ApiResponse GetWorldInstanceWithHttpInfo(string worldId, string instanceId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetWorldInstanceWithHttpInfo(string worldId, string instanceId) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->GetWorldInstance"); - } // verify the required parameter 'instanceId' is set if (instanceId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'instanceId' when calling WorldsApi->GetWorldInstance"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2392,23 +2176,14 @@ public VRChat.API.Client.ApiResponse GetWorldInstanceWithHttpInfo(stri }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.PathParameters.Add("instanceId", VRChat.API.Client.ClientUtils.ParameterToString(instanceId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.GetWorldInstance"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2424,13 +2199,11 @@ public VRChat.API.Client.ApiResponse GetWorldInstanceWithHttpInfo(stri // make the HTTP request var localVarResponse = this.Client.Get("/worlds/{worldId}/{instanceId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetWorldInstance", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2440,14 +2213,13 @@ public VRChat.API.Client.ApiResponse GetWorldInstanceWithHttpInfo(stri /// Get World Instance Returns a worlds instance. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of Instance - public async System.Threading.Tasks.Task GetWorldInstanceAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetWorldInstanceAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetWorldInstanceWithHttpInfoAsync(worldId, instanceId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetWorldInstanceWithHttpInfoAsync(worldId, instanceId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2455,24 +2227,19 @@ public VRChat.API.Client.ApiResponse GetWorldInstanceWithHttpInfo(stri /// Get World Instance Returns a worlds instance. /// /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. + /// Must be a valid world ID. + /// Must be a valid instance ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Instance) - public async System.Threading.Tasks.Task> GetWorldInstanceWithHttpInfoAsync(string worldId, string instanceId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWorldInstanceWithHttpInfoAsync(string worldId, string instanceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->GetWorldInstance"); - } // verify the required parameter 'instanceId' is set if (instanceId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'instanceId' when calling WorldsApi->GetWorldInstance"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2485,24 +2252,16 @@ public VRChat.API.Client.ApiResponse GetWorldInstanceWithHttpInfo(stri "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.PathParameters.Add("instanceId", VRChat.API.Client.ClientUtils.ParameterToString(instanceId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.GetWorldInstance"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2517,15 +2276,13 @@ public VRChat.API.Client.ApiResponse GetWorldInstanceWithHttpInfo(stri } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/worlds/{worldId}/{instanceId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetWorldInstance", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2535,11 +2292,10 @@ public VRChat.API.Client.ApiResponse GetWorldInstanceWithHttpInfo(stri /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// WorldMetadata [Obsolete] - public WorldMetadata GetWorldMetadata(string worldId, int operationIndex = 0) + public WorldMetadata GetWorldMetadata(string worldId) { VRChat.API.Client.ApiResponse localVarResponse = GetWorldMetadataWithHttpInfo(worldId); return localVarResponse.Data; @@ -2549,17 +2305,14 @@ public WorldMetadata GetWorldMetadata(string worldId, int operationIndex = 0) /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of WorldMetadata [Obsolete] - public VRChat.API.Client.ApiResponse GetWorldMetadataWithHttpInfo(string worldId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetWorldMetadataWithHttpInfo(string worldId) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->GetWorldMetadata"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2572,22 +2325,13 @@ public VRChat.API.Client.ApiResponse GetWorldMetadataWithHttpInfo }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.GetWorldMetadata"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2603,13 +2347,11 @@ public VRChat.API.Client.ApiResponse GetWorldMetadataWithHttpInfo // make the HTTP request var localVarResponse = this.Client.Get("/worlds/{worldId}/metadata", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetWorldMetadata", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2619,14 +2361,13 @@ public VRChat.API.Client.ApiResponse GetWorldMetadataWithHttpInfo /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of WorldMetadata [Obsolete] - public async System.Threading.Tasks.Task GetWorldMetadataAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetWorldMetadataAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetWorldMetadataWithHttpInfoAsync(worldId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetWorldMetadataWithHttpInfoAsync(worldId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2634,18 +2375,15 @@ public VRChat.API.Client.ApiResponse GetWorldMetadataWithHttpInfo /// 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. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (WorldMetadata) [Obsolete] - public async System.Threading.Tasks.Task> GetWorldMetadataWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWorldMetadataWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->GetWorldMetadata"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2658,23 +2396,15 @@ public VRChat.API.Client.ApiResponse GetWorldMetadataWithHttpInfo "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.GetWorldMetadata"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2689,15 +2419,13 @@ public VRChat.API.Client.ApiResponse GetWorldMetadataWithHttpInfo } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/worlds/{worldId}/metadata", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetWorldMetadata", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2707,10 +2435,9 @@ public VRChat.API.Client.ApiResponse GetWorldMetadataWithHttpInfo /// Get World Publish Status Returns a worlds publish status. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// WorldPublishStatus - public WorldPublishStatus GetWorldPublishStatus(string worldId, int operationIndex = 0) + public WorldPublishStatus GetWorldPublishStatus(string worldId) { VRChat.API.Client.ApiResponse localVarResponse = GetWorldPublishStatusWithHttpInfo(worldId); return localVarResponse.Data; @@ -2720,16 +2447,13 @@ public WorldPublishStatus GetWorldPublishStatus(string worldId, int operationInd /// Get World Publish Status Returns a worlds publish status. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of WorldPublishStatus - public VRChat.API.Client.ApiResponse GetWorldPublishStatusWithHttpInfo(string worldId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse GetWorldPublishStatusWithHttpInfo(string worldId) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->GetWorldPublishStatus"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2742,22 +2466,13 @@ public VRChat.API.Client.ApiResponse GetWorldPublishStatusWi }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.GetWorldPublishStatus"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2773,13 +2488,11 @@ public VRChat.API.Client.ApiResponse GetWorldPublishStatusWi // make the HTTP request var localVarResponse = this.Client.Get("/worlds/{worldId}/publish", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetWorldPublishStatus", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2789,13 +2502,12 @@ public VRChat.API.Client.ApiResponse GetWorldPublishStatusWi /// Get World Publish Status Returns a worlds publish status. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of WorldPublishStatus - public async System.Threading.Tasks.Task GetWorldPublishStatusAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetWorldPublishStatusAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await GetWorldPublishStatusWithHttpInfoAsync(worldId, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await GetWorldPublishStatusWithHttpInfoAsync(worldId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2803,17 +2515,14 @@ public VRChat.API.Client.ApiResponse GetWorldPublishStatusWi /// Get World Publish Status Returns a worlds publish status. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse (WorldPublishStatus) - public async System.Threading.Tasks.Task> GetWorldPublishStatusWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWorldPublishStatusWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->GetWorldPublishStatus"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2826,23 +2535,15 @@ public VRChat.API.Client.ApiResponse GetWorldPublishStatusWi "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.GetWorldPublishStatus"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2857,15 +2558,13 @@ public VRChat.API.Client.ApiResponse GetWorldPublishStatusWi } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/worlds/{worldId}/publish", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetWorldPublishStatus", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2875,10 +2574,9 @@ public VRChat.API.Client.ApiResponse GetWorldPublishStatusWi /// Publish World Publish a world. You can only publish one world per week. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// - public void PublishWorld(string worldId, int operationIndex = 0) + public void PublishWorld(string worldId) { PublishWorldWithHttpInfo(worldId); } @@ -2887,16 +2585,13 @@ public void PublishWorld(string worldId, int operationIndex = 0) /// Publish World Publish a world. You can only publish one world per week. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of Object(void) - public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string worldId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string worldId) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->PublishWorld"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2909,22 +2604,13 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.PublishWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -2940,13 +2626,11 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor // make the HTTP request var localVarResponse = this.Client.Put("/worlds/{worldId}/publish", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("PublishWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -2956,30 +2640,26 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor /// Publish World Publish a world. You can only publish one world per week. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task PublishWorldAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task PublishWorldAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await PublishWorldWithHttpInfoAsync(worldId, operationIndex, cancellationToken).ConfigureAwait(false); + await PublishWorldWithHttpInfoAsync(worldId, cancellationToken).ConfigureAwait(false); } /// /// Publish World Publish a world. You can only publish one world per week. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> PublishWorldWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PublishWorldWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->PublishWorld"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -2992,23 +2672,15 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.PublishWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -3023,15 +2695,13 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/worlds/{worldId}/publish", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("PublishWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -3042,22 +2712,21 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own worlds. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// List<LimitedWorld> - public List SearchWorlds(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0) + public List SearchWorlds(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)) { VRChat.API.Client.ApiResponse> localVarResponse = SearchWorldsWithHttpInfo(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); return localVarResponse.Data; @@ -3068,22 +2737,21 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own worlds. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// ApiResponse of List<LimitedWorld> - public VRChat.API.Client.ApiResponse> SearchWorldsWithHttpInfo(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0) + public VRChat.API.Client.ApiResponse> SearchWorldsWithHttpInfo(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -3096,16 +2764,10 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -3164,9 +2826,6 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "platform", platform)); } - localVarRequestOptions.Operation = "WorldsApi.SearchWorlds"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -3182,13 +2841,11 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor // make the HTTP request var localVarResponse = this.Client.Get>("/worlds", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SearchWorlds", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -3199,25 +2856,24 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own worlds. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<LimitedWorld> - public async System.Threading.Tasks.Task> SearchWorldsAsync(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SearchWorldsAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse> localVarResponse = await SearchWorldsWithHttpInfoAsync(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse> localVarResponse = await SearchWorldsWithHttpInfoAsync(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3226,23 +2882,22 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor /// /// Thrown when fails to make API call /// Filters on featured results. (optional) - /// (optional, default to popularity) + /// The sort order of the results. (optional) /// Set to `me` for searching own worlds. (optional) /// Filter by UserID. (optional) /// The number of objects to return. (optional, default to 60) - /// (optional, default to descending) + /// Result ordering (optional) /// A zero-based offset from the default object sorting from where search results start. (optional) /// Filters by world name. (optional) /// Tags to include (comma-separated). Any of the tags needs to be present. (optional) /// Tags to exclude (comma-separated). (optional) - /// Filter by ReleaseStatus. (optional, default to public) + /// Filter by ReleaseStatus. (optional) /// The maximum Unity version supported by the asset. (optional) /// The minimum Unity version supported by the asset. (optional) /// The platform the asset supports. (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<LimitedWorld>) - public async System.Threading.Tasks.Task>> SearchWorldsWithHttpInfoAsync(bool? featured = default(bool?), string sort = default(string), string user = default(string), string userId = default(string), int? n = default(int?), string order = default(string), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), string releaseStatus = default(string), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> SearchWorldsWithHttpInfoAsync(bool? featured = default(bool?), SortOption? sort = default(SortOption?), string user = default(string), string userId = default(string), int? n = default(int?), OrderOption? order = default(OrderOption?), int? offset = default(int?), string search = default(string), string tag = default(string), string notag = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), string maxUnityVersion = default(string), string minUnityVersion = default(string), string platform = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -3255,17 +2910,12 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); if (featured != null) { @@ -3324,9 +2974,6 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor localVarRequestOptions.QueryParameters.Add(VRChat.API.Client.ClientUtils.ParameterToMultiMap("", "platform", platform)); } - localVarRequestOptions.Operation = "WorldsApi.SearchWorlds"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -3341,15 +2988,13 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/worlds", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SearchWorlds", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -3359,10 +3004,9 @@ public VRChat.API.Client.ApiResponse PublishWorldWithHttpInfo(string wor /// Unpublish World Unpublish a world. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// - public void UnpublishWorld(string worldId, int operationIndex = 0) + public void UnpublishWorld(string worldId) { UnpublishWorldWithHttpInfo(worldId); } @@ -3371,16 +3015,13 @@ public void UnpublishWorld(string worldId, int operationIndex = 0) /// Unpublish World Unpublish a world. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// ApiResponse of Object(void) - public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string worldId, int operationIndex = 0) + public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string worldId) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->UnpublishWorld"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -3393,22 +3034,13 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.UnpublishWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -3424,13 +3056,11 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w // make the HTTP request var localVarResponse = this.Client.Delete("/worlds/{worldId}/publish", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UnpublishWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -3440,30 +3070,26 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w /// Unpublish World Unpublish a world. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UnpublishWorldAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UnpublishWorldAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UnpublishWorldWithHttpInfoAsync(worldId, operationIndex, cancellationToken).ConfigureAwait(false); + await UnpublishWorldWithHttpInfoAsync(worldId, cancellationToken).ConfigureAwait(false); } /// /// Unpublish World Unpublish a world. /// /// Thrown when fails to make API call - /// - /// Index associated with the operation. + /// Must be a valid world ID. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UnpublishWorldWithHttpInfoAsync(string worldId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UnpublishWorldWithHttpInfoAsync(string worldId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->UnpublishWorld"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -3476,23 +3102,15 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter - localVarRequestOptions.Operation = "WorldsApi.UnpublishWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -3507,15 +3125,13 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/worlds/{worldId}/publish", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UnpublishWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -3525,11 +3141,10 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w /// Update World Update information about a specific World. /// /// Thrown when fails to make API call - /// + /// Must be a valid world ID. /// (optional) - /// Index associated with the operation. /// World - public World UpdateWorld(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), int operationIndex = 0) + public World UpdateWorld(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest)) { VRChat.API.Client.ApiResponse localVarResponse = UpdateWorldWithHttpInfo(worldId, updateWorldRequest); return localVarResponse.Data; @@ -3539,17 +3154,14 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w /// Update World Update information about a specific World. /// /// Thrown when fails to make API call - /// + /// Must be a valid world ID. /// (optional) - /// Index associated with the operation. /// ApiResponse of World - public VRChat.API.Client.ApiResponse UpdateWorldWithHttpInfo(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), int operationIndex = 0) + public VRChat.API.Client.ApiResponse UpdateWorldWithHttpInfo(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->UpdateWorld"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -3563,23 +3175,14 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w }; var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.Data = updateWorldRequest; - localVarRequestOptions.Operation = "WorldsApi.UpdateWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -3595,13 +3198,11 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w // make the HTTP request var localVarResponse = this.Client.Put("/worlds/{worldId}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; @@ -3611,14 +3212,13 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w /// Update World Update information about a specific World. /// /// Thrown when fails to make API call - /// + /// Must be a valid world ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of World - public async System.Threading.Tasks.Task UpdateWorldAsync(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateWorldAsync(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - VRChat.API.Client.ApiResponse localVarResponse = await UpdateWorldWithHttpInfoAsync(worldId, updateWorldRequest, operationIndex, cancellationToken).ConfigureAwait(false); + VRChat.API.Client.ApiResponse localVarResponse = await UpdateWorldWithHttpInfoAsync(worldId, updateWorldRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3626,18 +3226,15 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w /// Update World Update information about a specific World. /// /// Thrown when fails to make API call - /// + /// Must be a valid world ID. /// (optional) - /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (World) - public async System.Threading.Tasks.Task> UpdateWorldWithHttpInfoAsync(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWorldWithHttpInfoAsync(string worldId, UpdateWorldRequest updateWorldRequest = default(UpdateWorldRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'worldId' is set if (worldId == null) - { throw new VRChat.API.Client.ApiException(400, "Missing required parameter 'worldId' when calling WorldsApi->UpdateWorld"); - } VRChat.API.Client.RequestOptions localVarRequestOptions = new VRChat.API.Client.RequestOptions(); @@ -3651,24 +3248,16 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w "application/json" }; + var localVarContentType = VRChat.API.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); var localVarAccept = VRChat.API.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("worldId", VRChat.API.Client.ClientUtils.ParameterToString(worldId)); // path parameter localVarRequestOptions.Data = updateWorldRequest; - localVarRequestOptions.Operation = "WorldsApi.UpdateWorld"; - localVarRequestOptions.OperationIndex = operationIndex; - // authentication (apiKeyCookie) required // cookie parameter support if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("apiKey"))) @@ -3683,15 +3272,13 @@ public VRChat.API.Client.ApiResponse UnpublishWorldWithHttpInfo(string w } // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/worlds/{worldId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateWorld", localVarResponse); - if (_exception != null) - { - throw _exception; - } + if (_exception != null) throw _exception; } return localVarResponse; diff --git a/src/VRChat.API/Client/ApiClient.cs b/src/VRChat.API/Client/ApiClient.cs index 95b8df6a..e5c165dc 100644 --- a/src/VRChat.API/Client/ApiClient.cs +++ b/src/VRChat.API/Client/ApiClient.cs @@ -24,8 +24,9 @@ using System.Threading.Tasks; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; +using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; using RestSharp; -using RestSharp.Serializers; +using RestSharp.Deserializers; using RestSharpMethod = RestSharp.Method; using Polly; @@ -34,7 +35,7 @@ namespace VRChat.API.Client /// /// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. /// - internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer + internal class CustomJsonCodec : RestSharp.Serializers.ISerializer, RestSharp.Deserializers.IDeserializer { private readonly IReadableConfiguration _configuration; private static readonly string _contentType = "application/json"; @@ -80,9 +81,7 @@ public string Serialize(object obj) } } - public string Serialize(Parameter bodyParameter) => Serialize(bodyParameter.Value); - - public T Deserialize(RestResponse response) + public T Deserialize(IRestResponse response) { var result = (T)Deserialize(response, typeof(T)); return result; @@ -94,7 +93,7 @@ public T Deserialize(RestResponse response) /// The HTTP response. /// Object type. /// Object representation of the JSON string. - internal object Deserialize(RestResponse response, Type type) + internal object Deserialize(IRestResponse response, Type type) { if (type == typeof(byte[])) // return byte array { @@ -147,22 +146,15 @@ internal object Deserialize(RestResponse response, Type type) } } - public ISerializer Serializer => this; - public IDeserializer Deserializer => this; - - public string[] AcceptedContentTypes => RestSharp.Serializers.ContentType.JsonAccept; - - public SupportsContentType SupportsContentType => contentType => - contentType.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || - contentType.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); + public string RootElement { get; set; } + public string Namespace { get; set; } + public string DateFormat { get; set; } public string ContentType { get { return _contentType; } set { throw new InvalidOperationException("Not allowed to set content type."); } } - - public DataFormat DataFormat => DataFormat.Json; } /// /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), @@ -195,14 +187,14 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient /// Allows for extending request processing for generated code. /// /// The RestSharp request object - partial void InterceptRequest(RestRequest request); + partial void InterceptRequest(IRestRequest request); /// /// Allows for extending response processing for generated code. /// /// The RestSharp request object /// The RestSharp response object - partial void InterceptResponse(RestRequest request, RestResponse response); + partial void InterceptResponse(IRestRequest request, IRestResponse response); /// /// Initializes a new instance of the , defaulting to the global configurations' base url. @@ -237,25 +229,25 @@ private RestSharpMethod Method(HttpMethod method) switch (method) { case HttpMethod.Get: - other = RestSharpMethod.Get; + other = RestSharpMethod.GET; break; case HttpMethod.Post: - other = RestSharpMethod.Post; + other = RestSharpMethod.POST; break; case HttpMethod.Put: - other = RestSharpMethod.Put; + other = RestSharpMethod.PUT; break; case HttpMethod.Delete: - other = RestSharpMethod.Delete; + other = RestSharpMethod.DELETE; break; case HttpMethod.Head: - other = RestSharpMethod.Head; + other = RestSharpMethod.HEAD; break; case HttpMethod.Options: - other = RestSharpMethod.Options; + other = RestSharpMethod.OPTIONS; break; case HttpMethod.Patch: - other = RestSharpMethod.Patch; + other = RestSharpMethod.PATCH; break; default: throw new ArgumentOutOfRangeException("method", method, null); @@ -286,7 +278,11 @@ private RestRequest NewRequest( if (options == null) throw new ArgumentNullException("options"); if (configuration == null) throw new ArgumentNullException("configuration"); - RestRequest request = new RestRequest(path, Method(method)); + RestRequest request = new RestRequest(Method(method)) + { + Resource = path, + JsonSerializer = new CustomJsonCodec(SerializerSettings, configuration) + }; if (options.PathParameters != null) { @@ -376,22 +372,27 @@ private RestRequest NewRequest( { foreach (var fileParam in options.FileParameters) { - foreach (var file in fileParam.Value) - { - var bytes = ClientUtils.ReadAsBytes(file); - var fileStream = file as FileStream; - if (fileStream != null) - request.AddFile(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)); - else - request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); - } + var bytes = ClientUtils.ReadAsBytes(fileParam.Value); + var fileStream = fileParam.Value as FileStream; + if (fileStream != null) + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + else + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + } + } + + if (options.Cookies != null && options.Cookies.Count > 0) + { + foreach (var cookie in options.Cookies) + { + request.AddCookie(cookie.Name, cookie.Value); } } return request; } - private ApiResponse ToApiResponse(RestResponse response) + private ApiResponse ToApiResponse(IRestResponse response) { T result = response.Data; string rawContent = response.Content; @@ -410,17 +411,9 @@ private ApiResponse ToApiResponse(RestResponse response) } } - if (response.ContentHeaders != null) - { - foreach (var responseHeader in response.ContentHeaders) - { - transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); - } - } - if (response.Cookies != null) { - foreach (var responseCookies in response.Cookies.Cast()) + foreach (var responseCookies in response.Cookies) { transformed.Cookies.Add( new Cookie( @@ -435,37 +428,58 @@ private ApiResponse ToApiResponse(RestResponse response) return transformed; } - private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) { - var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(_baseUrl); + client.CookieContainer = CookieContainer; - var cookies = new CookieContainer(); - if (options.Cookies != null && options.Cookies.Count > 0) + client.ClearHandlers(); + var existingDeserializer = req.JsonSerializer as IDeserializer; + if (existingDeserializer != null) { - foreach (var cookie in options.Cookies) - { - cookies.Add(new Cookie(cookie.Name, cookie.Value)); - } + client.AddHandler("application/json", () => existingDeserializer); + client.AddHandler("text/json", () => existingDeserializer); + client.AddHandler("text/x-json", () => existingDeserializer); + client.AddHandler("text/javascript", () => existingDeserializer); + client.AddHandler("*+json", () => existingDeserializer); } + else + { + var customDeserializer = new CustomJsonCodec(SerializerSettings, configuration); + client.AddHandler("application/json", () => customDeserializer); + client.AddHandler("text/json", () => customDeserializer); + client.AddHandler("text/x-json", () => customDeserializer); + client.AddHandler("text/javascript", () => customDeserializer); + client.AddHandler("*+json", () => customDeserializer); + } + + var xmlDeserializer = new XmlDeserializer(); + client.AddHandler("application/xml", () => xmlDeserializer); + client.AddHandler("text/xml", () => xmlDeserializer); + client.AddHandler("*+xml", () => xmlDeserializer); + client.AddHandler("*", () => xmlDeserializer); - var clientOptions = new RestClientOptions(baseUrl) + client.Timeout = configuration.Timeout; + + if (configuration.Proxy != null) { - ClientCertificates = configuration.ClientCertificates, - CookieContainer = cookies, - MaxTimeout = configuration.Timeout, - Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent - }; + client.Proxy = configuration.Proxy; + } - RestClient client = new RestClient(clientOptions) - client.CookieContainer = CookieContainer; + if (configuration.UserAgent != null) + { + client.UserAgent = configuration.UserAgent; + } - .UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); + if (configuration.ClientCertificates != null) + { + client.ClientCertificates = configuration.ClientCertificates; + } InterceptRequest(req); - RestResponse response; + IRestResponse response; if (RetryConfiguration.RetryPolicy != null) { var policy = RetryConfiguration.RetryPolicy; @@ -497,14 +511,6 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl { response.Data = (T)(object)new MemoryStream(response.RawBytes); } - else if (typeof(T).Name == "Byte[]") // for byte response - { - response.Data = (T)(object)response.RawBytes; - } - else if (typeof(T).Name == "String") // for string response - { - response.Data = (T)(object)response.Content; - } InterceptResponse(req, response); @@ -517,7 +523,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl if (response.Cookies != null && response.Cookies.Count > 0) { if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies.Cast()) + foreach (var restResponseCookie in response.Cookies) { var cookie = new Cookie( restResponseCookie.Name, @@ -544,26 +550,58 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl return result; } - private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + RestClient client = new RestClient(_baseUrl); + client.CookieContainer = CookieContainer; + - var clientOptions = new RestClientOptions(baseUrl) + client.ClearHandlers(); + var existingDeserializer = req.JsonSerializer as IDeserializer; + if (existingDeserializer != null) { - ClientCertificates = configuration.ClientCertificates, - MaxTimeout = configuration.Timeout, - Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent - }; + client.AddHandler("application/json", () => existingDeserializer); + client.AddHandler("text/json", () => existingDeserializer); + client.AddHandler("text/x-json", () => existingDeserializer); + client.AddHandler("text/javascript", () => existingDeserializer); + client.AddHandler("*+json", () => existingDeserializer); + } + else + { + var customDeserializer = new CustomJsonCodec(SerializerSettings, configuration); + client.AddHandler("application/json", () => customDeserializer); + client.AddHandler("text/json", () => customDeserializer); + client.AddHandler("text/x-json", () => customDeserializer); + client.AddHandler("text/javascript", () => customDeserializer); + client.AddHandler("*+json", () => customDeserializer); + } - RestClient client = new RestClient(clientOptions) - client.CookieContainer = CookieContainer; + var xmlDeserializer = new XmlDeserializer(); + client.AddHandler("application/xml", () => xmlDeserializer); + client.AddHandler("text/xml", () => xmlDeserializer); + client.AddHandler("*+xml", () => xmlDeserializer); + client.AddHandler("*", () => xmlDeserializer); - .UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); + client.Timeout = configuration.Timeout; + + if (configuration.Proxy != null) + { + client.Proxy = configuration.Proxy; + } + + if (configuration.UserAgent != null) + { + client.UserAgent = configuration.UserAgent; + } + + if (configuration.ClientCertificates != null) + { + client.ClientCertificates = configuration.ClientCertificates; + } InterceptRequest(req); - RestResponse response; + IRestResponse response; if (RetryConfiguration.AsyncRetryPolicy != null) { var policy = RetryConfiguration.AsyncRetryPolicy; @@ -588,10 +626,6 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl { response.Data = (T)(object)new MemoryStream(response.RawBytes); } - else if (typeof(T).Name == "Byte[]") // for byte response - { - response.Data = (T)(object)response.RawBytes; - } InterceptResponse(req, response); @@ -604,7 +638,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl if (response.Cookies != null && response.Cookies.Count > 0) { if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies.Cast()) + foreach (var restResponseCookie in response.Cookies) { var cookie = new Cookie( restResponseCookie.Name, @@ -644,7 +678,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); } /// @@ -659,7 +693,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); } /// @@ -674,7 +708,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); } /// @@ -689,7 +723,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); } /// @@ -704,7 +738,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); } /// @@ -719,7 +753,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); } /// @@ -734,7 +768,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); } #endregion IAsynchronousClient @@ -750,7 +784,7 @@ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadabl public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), config); } /// @@ -764,7 +798,7 @@ public ApiResponse Get(string path, RequestOptions options, IReadableConfi public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), config); } /// @@ -778,7 +812,7 @@ public ApiResponse Post(string path, RequestOptions options, IReadableConf public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), config); } /// @@ -792,7 +826,7 @@ public ApiResponse Put(string path, RequestOptions options, IReadableConfi public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); } /// @@ -806,7 +840,7 @@ public ApiResponse Delete(string path, RequestOptions options, IReadableCo public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), config); } /// @@ -820,7 +854,7 @@ public ApiResponse Head(string path, RequestOptions options, IReadableConf public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), config); } /// @@ -834,7 +868,7 @@ public ApiResponse Options(string path, RequestOptions options, IReadableC public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); } #endregion ISynchronousClient } diff --git a/src/VRChat.API/Client/ClientUtils.cs b/src/VRChat.API/Client/ClientUtils.cs index b5f77ba9..da578546 100644 --- a/src/VRChat.API/Client/ClientUtils.cs +++ b/src/VRChat.API/Client/ClientUtils.cs @@ -13,7 +13,6 @@ using System.Globalization; using System.IO; using System.Linq; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; @@ -103,20 +102,43 @@ public static string ParameterToString(object obj, IReadableConfiguration config return boolean ? "true" : "false"; if (obj is ICollection collection) return string.Join(",", collection.Cast()); - if (obj is Enum && HasEnumMemberAttrValue(obj)) - return GetEnumMemberAttrValue(obj); return Convert.ToString(obj, CultureInfo.InvariantCulture); } /// - /// Serializes the given object when not null. Otherwise return null. + /// URL encode a string + /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 /// - /// The object to serialize. - /// Serialized string. - public static string Serialize(object obj) + /// string to be URL encoded + /// Byte array + public static string UrlEncode(string input) { - return obj != null ? Newtonsoft.Json.JsonConvert.SerializeObject(obj) : null; + const int maxLength = 32766; + + if (input == null) + { + throw new ArgumentNullException("input"); + } + + if (input.Length <= maxLength) + { + return Uri.EscapeDataString(input); + } + + StringBuilder sb = new StringBuilder(input.Length * 2); + int index = 0; + + while (index < input.Length) + { + int length = Math.Min(input.Length - index, maxLength); + string subString = input.Substring(index, length); + + sb.Append(Uri.EscapeDataString(subString)); + index += subString.Length; + } + + return sb.ToString(); } /// @@ -203,40 +225,5 @@ public static bool IsJsonMime(string mime) return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); } - - /// - /// Is the Enum decorated with EnumMember Attribute - /// - /// - /// true if found - private static bool HasEnumMemberAttrValue(object enumVal) - { - if (enumVal == null) - throw new ArgumentNullException(nameof(enumVal)); - var enumType = enumVal.GetType(); - var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); - var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); - if (attr != null) return true; - return false; - } - - /// - /// Get the EnumMember value - /// - /// - /// EnumMember value as string otherwise null - private static string GetEnumMemberAttrValue(object enumVal) - { - if (enumVal == null) - throw new ArgumentNullException(nameof(enumVal)); - var enumType = enumVal.GetType(); - var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); - var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); - if (attr != null) - { - return attr.Value; - } - return null; - } } } diff --git a/src/VRChat.API/Client/Configuration.cs b/src/VRChat.API/Client/Configuration.cs index 356faa21..0142d4a4 100644 --- a/src/VRChat.API/Client/Configuration.cs +++ b/src/VRChat.API/Client/Configuration.cs @@ -17,7 +17,6 @@ using System.Reflection; using System.Security.Cryptography.X509Certificates; using System.Text; -using System.Net.Http; namespace VRChat.API.Client { @@ -91,13 +90,6 @@ public class Configuration : IReadableConfiguration /// /// The servers private IList> _servers; - - /// - /// Gets or sets the operation servers defined in the OpenAPI spec. - /// - /// The operation servers - private IReadOnlyDictionary>> _operationServers; - #endregion Private Members #region Constructors @@ -109,7 +101,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = WebUtility.UrlEncode("vrchatapi-csharp"); + UserAgent = "vrchatapi-csharp"; BasePath = "https://api.vrchat.cloud/api/1"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -123,9 +115,6 @@ public Configuration() } } }; - OperationServers = new Dictionary>>() - { - }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -385,23 +374,6 @@ public virtual IList> Servers } } - /// - /// Gets or sets the operation servers. - /// - /// The operation servers. - public virtual IReadOnlyDictionary>> OperationServers - { - get { return _operationServers; } - set - { - if (value == null) - { - throw new InvalidOperationException("Operation servers may not be null."); - } - _operationServers = value; - } - } - /// /// Returns URL based on server settings without providing values /// for the variables @@ -410,7 +382,7 @@ public virtual IReadOnlyDictionaryThe server URL. public string GetServerUrl(int index) { - return GetServerUrl(Servers, index, null); + return GetServerUrl(index, null); } /// @@ -421,49 +393,9 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - return GetServerUrl(Servers, index, inputVariables); - } - - /// - /// Returns URL based on operation server settings. - /// - /// Operation associated with the request path. - /// Array index of the server settings. - /// The operation server URL. - public string GetOperationServerUrl(string operation, int index) - { - return GetOperationServerUrl(operation, index, null); - } - - /// - /// Returns URL based on operation server settings. - /// - /// Operation associated with the request path. - /// Array index of the server settings. - /// Dictionary of the variables and the corresponding values. - /// The operation server URL. - public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) - { - if (OperationServers.TryGetValue(operation, out var operationServer)) - { - return GetServerUrl(operationServer, index, inputVariables); - } - - return null; - } - - /// - /// Returns URL based on server settings. - /// - /// Dictionary of server settings. - /// Array index of the server settings. - /// Dictionary of the variables and the corresponding values. - /// The server URL. - private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) - { - if (index < 0 || index >= servers.Count) + if (index < 0 || index >= Servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); } if (inputVariables == null) @@ -471,34 +403,31 @@ private string GetServerUrl(IList> servers, inputVariables = new Dictionary(); } - IReadOnlyDictionary server = servers[index]; + IReadOnlyDictionary server = Servers[index]; string url = (string)server["url"]; - if (server.ContainsKey("variables")) + // go through variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) { - // go through each variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) - { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) + if (inputVariables.ContainsKey(variable.Key)) + { + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) - { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); - } - else - { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); - } + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); } else { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); } } + else + { + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); + } } return url; @@ -577,8 +506,7 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration Password = second.Password ?? first.Password, AccessToken = second.AccessToken ?? first.AccessToken, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, - ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat }; return config; } diff --git a/src/VRChat.API/Client/GlobalConfiguration.cs b/src/VRChat.API/Client/GlobalConfiguration.cs index b277f93e..c3591275 100644 --- a/src/VRChat.API/Client/GlobalConfiguration.cs +++ b/src/VRChat.API/Client/GlobalConfiguration.cs @@ -64,4 +64,4 @@ public static IReadableConfiguration Instance } } } -} +} \ No newline at end of file diff --git a/src/VRChat.API/Client/IReadableConfiguration.cs b/src/VRChat.API/Client/IReadableConfiguration.cs index 542f8de6..0e501159 100644 --- a/src/VRChat.API/Client/IReadableConfiguration.cs +++ b/src/VRChat.API/Client/IReadableConfiguration.cs @@ -99,12 +99,6 @@ public interface IReadableConfiguration /// Password. string Password { get; } - /// - /// Get the servers associated with the operation. - /// - /// Operation servers. - IReadOnlyDictionary>> OperationServers { get; } - /// /// Gets the API key with prefix. /// @@ -112,14 +106,6 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); - /// - /// Gets the Operation server url at the provided index. - /// - /// Operation server name. - /// Index of the operation server settings. - /// - string GetOperationServerUrl(string operation, int index); - /// /// Gets certificate collection to be sent with requests. /// diff --git a/src/VRChat.API/Client/RequestOptions.cs b/src/VRChat.API/Client/RequestOptions.cs index 975ddb80..f63cebcf 100644 --- a/src/VRChat.API/Client/RequestOptions.cs +++ b/src/VRChat.API/Client/RequestOptions.cs @@ -46,23 +46,13 @@ public class RequestOptions /// /// File parameters to be sent along with the request. /// - public Multimap FileParameters { get; set; } + public Dictionary FileParameters { get; set; } /// /// Cookies to be sent along with the request. /// public List Cookies { get; set; } - /// - /// Operation associated with the request path. - /// - public string Operation { get; set; } - - /// - /// Index associated with the operation. - /// - public int OperationIndex { get; set; } - /// /// Any data associated with a request body. /// @@ -77,7 +67,7 @@ public RequestOptions() QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Multimap(); + FileParameters = new Dictionary(); Cookies = new List(); } } diff --git a/src/VRChat.API/Client/RetryConfiguration.cs b/src/VRChat.API/Client/RetryConfiguration.cs index ea2723e6..1739b6d4 100644 --- a/src/VRChat.API/Client/RetryConfiguration.cs +++ b/src/VRChat.API/Client/RetryConfiguration.cs @@ -1,13 +1,3 @@ -/* - * VRChat API Documentation - * - * - * The version of the OpenAPI document: 1.9.1 - * Contact: me@ariesclark.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - using Polly; using RestSharp; @@ -16,16 +6,16 @@ namespace VRChat.API.Client /// /// Configuration class to set the polly retry policies to be applied to the requests. /// - public static class RetryConfiguration + public class RetryConfiguration { /// /// Retry policy /// - public static Policy RetryPolicy { get; set; } + public static Policy RetryPolicy { get; set; } /// /// Async retry policy /// - public static AsyncPolicy AsyncRetryPolicy { get; set; } + public static AsyncPolicy AsyncRetryPolicy { get; set; } } } diff --git a/src/VRChat.API/Model/APIConfig.cs b/src/VRChat.API/Model/APIConfig.cs index cab6604f..83b58271 100644 --- a/src/VRChat.API/Model/APIConfig.cs +++ b/src/VRChat.API/Model/APIConfig.cs @@ -35,7 +35,7 @@ public partial class APIConfig : IEquatable, IValidatableObject /// /// Gets or Sets DeploymentGroup /// - [DataMember(Name = "deploymentGroup", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "deploymentGroup", IsRequired = true, EmitDefaultValue = false)] public DeploymentGroup DeploymentGroup { get; set; } /// /// Initializes a new instance of the class. @@ -125,43 +125,37 @@ protected APIConfig() { } /// Unknown (required). /// Currently used youtube-dl.exe hash in SHA-256-delimited format (required). /// Currently used youtube-dl.exe version (required). - public APIConfig(bool voiceEnableDegradation = false, bool voiceEnableReceiverLimiting = true, string address = default(string), List announcements = default(List), string apiKey = default(string), string appName = "VrChat", string buildVersionTag = default(string), string clientApiKey = default(string), int clientBPSCeiling = 18432, int clientDisconnectTimeout = 30000, int clientReservedPlayerBPS = 7168, int clientSentCountAllowance = 15, string contactEmail = default(string), string copyrightEmail = default(string), int currentTOSVersion = default(int), string defaultAvatar = default(string), DeploymentGroup deploymentGroup = default(DeploymentGroup), string devAppVersionStandalone = default(string), string devDownloadLinkWindows = default(string), string devSdkUrl = default(string), string devSdkVersion = default(string), string devServerVersionStandalone = default(string), DateTime disCountdown = default(DateTime), bool disableAvatarCopying = false, bool disableAvatarGating = false, bool disableCommunityLabs = false, bool disableCommunityLabsPromotion = false, bool disableEmail = false, bool disableEventStream = false, bool disableFeedbackGating = false, bool disableFrontendBuilds = false, bool disableHello = false, bool disableOculusSubs = false, bool disableRegistration = false, bool disableSteamNetworking = true, bool disableTwoFactorAuth = false, bool disableUdon = false, bool disableUpgradeAccount = false, string downloadLinkWindows = default(string), DownloadURLList downloadUrls = default(DownloadURLList), List dynamicWorldRows = default(List), APIEventConfig events = default(APIEventConfig), string gearDemoRoomId = default(string), string homeWorldId = default(string), string homepageRedirectTarget = "https://hello.vrchat.com", string hubWorldId = default(string), string jobsEmail = default(string), string messageOfTheDay = default(string), string moderationEmail = default(string), int moderationQueryPeriod = default(int), string notAllowedToSelectAvatarInPrivateWorldMessage = default(string), string plugin = default(string), string releaseAppVersionStandalone = default(string), string releaseSdkUrl = default(string), string releaseSdkVersion = default(string), string releaseServerVersionStandalone = default(string), string sdkDeveloperFaqUrl = default(string), string sdkDiscordUrl = default(string), string sdkNotAllowedToPublishMessage = default(string), string sdkUnityVersion = default(string), string serverName = default(string), string supportEmail = default(string), string timeOutWorldId = default(string), string tutorialWorldId = default(string), int updateRateMsMaximum = default(int), int updateRateMsMinimum = default(int), int updateRateMsNormal = default(int), int updateRateMsUdonManual = default(int), int uploadAnalysisPercent = default(int), List urlList = default(List), bool useReliableUdpForVoice = false, int userUpdatePeriod = default(int), int userVerificationDelay = default(int), int userVerificationRetry = default(int), int userVerificationTimeout = default(int), string viveWindowsUrl = default(string), List whiteListedAssetUrls = default(List), int worldUpdatePeriod = default(int), string playerUrlResolverHash = default(string), string playerUrlResolverVersion = default(string)) + public APIConfig(bool voiceEnableDegradation = false, bool voiceEnableReceiverLimiting = true, string address = default(string), List announcements = default(List), string apiKey = default(string), string appName = "VrChat", string buildVersionTag = default(string), string clientApiKey = default(string), int clientBPSCeiling = 18432, int clientDisconnectTimeout = 30000, int clientReservedPlayerBPS = 7168, int clientSentCountAllowance = 15, string contactEmail = default(string), string copyrightEmail = default(string), int currentTOSVersion = default(int), string defaultAvatar = default(string), DeploymentGroup deploymentGroup = default(DeploymentGroup), string devAppVersionStandalone = default(string), string devDownloadLinkWindows = default(string), string devSdkUrl = default(string), string devSdkVersion = default(string), string devServerVersionStandalone = default(string), DateTime disCountdown = default(DateTime), bool disableAvatarCopying = false, bool disableAvatarGating = false, bool disableCommunityLabs = false, bool disableCommunityLabsPromotion = false, bool disableEmail = false, bool disableEventStream = false, bool disableFeedbackGating = false, bool disableFrontendBuilds = false, bool disableHello = false, bool disableOculusSubs = false, bool disableRegistration = false, bool disableSteamNetworking = true, bool disableTwoFactorAuth = false, bool disableUdon = false, bool disableUpgradeAccount = false, string downloadLinkWindows = default(string), APIConfigDownloadURLList downloadUrls = default(APIConfigDownloadURLList), List dynamicWorldRows = default(List), APIConfigEvents events = default(APIConfigEvents), string gearDemoRoomId = default(string), string homeWorldId = default(string), string homepageRedirectTarget = "https://hello.vrchat.com", string hubWorldId = default(string), string jobsEmail = default(string), string messageOfTheDay = default(string), string moderationEmail = default(string), int moderationQueryPeriod = default(int), string notAllowedToSelectAvatarInPrivateWorldMessage = default(string), string plugin = default(string), string releaseAppVersionStandalone = default(string), string releaseSdkUrl = default(string), string releaseSdkVersion = default(string), string releaseServerVersionStandalone = default(string), string sdkDeveloperFaqUrl = default(string), string sdkDiscordUrl = default(string), string sdkNotAllowedToPublishMessage = default(string), string sdkUnityVersion = default(string), string serverName = default(string), string supportEmail = default(string), string timeOutWorldId = default(string), string tutorialWorldId = default(string), int updateRateMsMaximum = default(int), int updateRateMsMinimum = default(int), int updateRateMsNormal = default(int), int updateRateMsUdonManual = default(int), int uploadAnalysisPercent = default(int), List urlList = default(List), bool useReliableUdpForVoice = false, int userUpdatePeriod = default(int), int userVerificationDelay = default(int), int userVerificationRetry = default(int), int userVerificationTimeout = default(int), string viveWindowsUrl = default(string), List whiteListedAssetUrls = default(List), int worldUpdatePeriod = default(int), string playerUrlResolverHash = default(string), string playerUrlResolverVersion = default(string)) { this.VoiceEnableDegradation = voiceEnableDegradation; this.VoiceEnableReceiverLimiting = voiceEnableReceiverLimiting; // to ensure "address" is required (not null) - if (address == null) - { + if (address == null) { throw new ArgumentNullException("address is a required property for APIConfig and cannot be null"); } this.Address = address; // to ensure "announcements" is required (not null) - if (announcements == null) - { + if (announcements == null) { throw new ArgumentNullException("announcements is a required property for APIConfig and cannot be null"); } this.Announcements = announcements; // to ensure "apiKey" is required (not null) - if (apiKey == null) - { + if (apiKey == null) { throw new ArgumentNullException("apiKey is a required property for APIConfig and cannot be null"); } this.ApiKey = apiKey; // to ensure "appName" is required (not null) - if (appName == null) - { + if (appName == null) { throw new ArgumentNullException("appName is a required property for APIConfig and cannot be null"); } this.AppName = appName; // to ensure "buildVersionTag" is required (not null) - if (buildVersionTag == null) - { + if (buildVersionTag == null) { throw new ArgumentNullException("buildVersionTag is a required property for APIConfig and cannot be null"); } this.BuildVersionTag = buildVersionTag; // to ensure "clientApiKey" is required (not null) - if (clientApiKey == null) - { + if (clientApiKey == null) { throw new ArgumentNullException("clientApiKey is a required property for APIConfig and cannot be null"); } this.ClientApiKey = clientApiKey; @@ -170,52 +164,44 @@ protected APIConfig() { } this.ClientReservedPlayerBPS = clientReservedPlayerBPS; this.ClientSentCountAllowance = clientSentCountAllowance; // to ensure "contactEmail" is required (not null) - if (contactEmail == null) - { + if (contactEmail == null) { throw new ArgumentNullException("contactEmail is a required property for APIConfig and cannot be null"); } this.ContactEmail = contactEmail; // to ensure "copyrightEmail" is required (not null) - if (copyrightEmail == null) - { + if (copyrightEmail == null) { throw new ArgumentNullException("copyrightEmail is a required property for APIConfig and cannot be null"); } this.CopyrightEmail = copyrightEmail; this.CurrentTOSVersion = currentTOSVersion; // to ensure "defaultAvatar" is required (not null) - if (defaultAvatar == null) - { + if (defaultAvatar == null) { throw new ArgumentNullException("defaultAvatar is a required property for APIConfig and cannot be null"); } this.DefaultAvatar = defaultAvatar; this.DeploymentGroup = deploymentGroup; // to ensure "devAppVersionStandalone" is required (not null) - if (devAppVersionStandalone == null) - { + if (devAppVersionStandalone == null) { throw new ArgumentNullException("devAppVersionStandalone is a required property for APIConfig and cannot be null"); } this.DevAppVersionStandalone = devAppVersionStandalone; // to ensure "devDownloadLinkWindows" is required (not null) - if (devDownloadLinkWindows == null) - { + if (devDownloadLinkWindows == null) { throw new ArgumentNullException("devDownloadLinkWindows is a required property for APIConfig and cannot be null"); } this.DevDownloadLinkWindows = devDownloadLinkWindows; // to ensure "devSdkUrl" is required (not null) - if (devSdkUrl == null) - { + if (devSdkUrl == null) { throw new ArgumentNullException("devSdkUrl is a required property for APIConfig and cannot be null"); } this.DevSdkUrl = devSdkUrl; // to ensure "devSdkVersion" is required (not null) - if (devSdkVersion == null) - { + if (devSdkVersion == null) { throw new ArgumentNullException("devSdkVersion is a required property for APIConfig and cannot be null"); } this.DevSdkVersion = devSdkVersion; // to ensure "devServerVersionStandalone" is required (not null) - if (devServerVersionStandalone == null) - { + if (devServerVersionStandalone == null) { throw new ArgumentNullException("devServerVersionStandalone is a required property for APIConfig and cannot be null"); } this.DevServerVersionStandalone = devServerVersionStandalone; @@ -236,153 +222,128 @@ protected APIConfig() { } this.DisableUdon = disableUdon; this.DisableUpgradeAccount = disableUpgradeAccount; // to ensure "downloadLinkWindows" is required (not null) - if (downloadLinkWindows == null) - { + if (downloadLinkWindows == null) { throw new ArgumentNullException("downloadLinkWindows is a required property for APIConfig and cannot be null"); } this.DownloadLinkWindows = downloadLinkWindows; // to ensure "downloadUrls" is required (not null) - if (downloadUrls == null) - { + if (downloadUrls == null) { throw new ArgumentNullException("downloadUrls is a required property for APIConfig and cannot be null"); } this.DownloadUrls = downloadUrls; // to ensure "dynamicWorldRows" is required (not null) - if (dynamicWorldRows == null) - { + if (dynamicWorldRows == null) { throw new ArgumentNullException("dynamicWorldRows is a required property for APIConfig and cannot be null"); } this.DynamicWorldRows = dynamicWorldRows; // to ensure "events" is required (not null) - if (events == null) - { + if (events == null) { throw new ArgumentNullException("events is a required property for APIConfig and cannot be null"); } this.Events = events; // to ensure "gearDemoRoomId" is required (not null) - if (gearDemoRoomId == null) - { + if (gearDemoRoomId == null) { throw new ArgumentNullException("gearDemoRoomId is a required property for APIConfig and cannot be null"); } this.GearDemoRoomId = gearDemoRoomId; // to ensure "homeWorldId" is required (not null) - if (homeWorldId == null) - { + if (homeWorldId == null) { throw new ArgumentNullException("homeWorldId is a required property for APIConfig and cannot be null"); } this.HomeWorldId = homeWorldId; // to ensure "homepageRedirectTarget" is required (not null) - if (homepageRedirectTarget == null) - { + if (homepageRedirectTarget == null) { throw new ArgumentNullException("homepageRedirectTarget is a required property for APIConfig and cannot be null"); } this.HomepageRedirectTarget = homepageRedirectTarget; // to ensure "hubWorldId" is required (not null) - if (hubWorldId == null) - { + if (hubWorldId == null) { throw new ArgumentNullException("hubWorldId is a required property for APIConfig and cannot be null"); } this.HubWorldId = hubWorldId; // to ensure "jobsEmail" is required (not null) - if (jobsEmail == null) - { + if (jobsEmail == null) { throw new ArgumentNullException("jobsEmail is a required property for APIConfig and cannot be null"); } this.JobsEmail = jobsEmail; // to ensure "messageOfTheDay" is required (not null) - if (messageOfTheDay == null) - { + if (messageOfTheDay == null) { throw new ArgumentNullException("messageOfTheDay is a required property for APIConfig and cannot be null"); } this.MessageOfTheDay = messageOfTheDay; // to ensure "moderationEmail" is required (not null) - if (moderationEmail == null) - { + if (moderationEmail == null) { throw new ArgumentNullException("moderationEmail is a required property for APIConfig and cannot be null"); } this.ModerationEmail = moderationEmail; this.ModerationQueryPeriod = moderationQueryPeriod; // to ensure "notAllowedToSelectAvatarInPrivateWorldMessage" is required (not null) - if (notAllowedToSelectAvatarInPrivateWorldMessage == null) - { + if (notAllowedToSelectAvatarInPrivateWorldMessage == null) { throw new ArgumentNullException("notAllowedToSelectAvatarInPrivateWorldMessage is a required property for APIConfig and cannot be null"); } this.NotAllowedToSelectAvatarInPrivateWorldMessage = notAllowedToSelectAvatarInPrivateWorldMessage; // to ensure "plugin" is required (not null) - if (plugin == null) - { + if (plugin == null) { throw new ArgumentNullException("plugin is a required property for APIConfig and cannot be null"); } this.Plugin = plugin; // to ensure "releaseAppVersionStandalone" is required (not null) - if (releaseAppVersionStandalone == null) - { + if (releaseAppVersionStandalone == null) { throw new ArgumentNullException("releaseAppVersionStandalone is a required property for APIConfig and cannot be null"); } this.ReleaseAppVersionStandalone = releaseAppVersionStandalone; // to ensure "releaseSdkUrl" is required (not null) - if (releaseSdkUrl == null) - { + if (releaseSdkUrl == null) { throw new ArgumentNullException("releaseSdkUrl is a required property for APIConfig and cannot be null"); } this.ReleaseSdkUrl = releaseSdkUrl; // to ensure "releaseSdkVersion" is required (not null) - if (releaseSdkVersion == null) - { + if (releaseSdkVersion == null) { throw new ArgumentNullException("releaseSdkVersion is a required property for APIConfig and cannot be null"); } this.ReleaseSdkVersion = releaseSdkVersion; // to ensure "releaseServerVersionStandalone" is required (not null) - if (releaseServerVersionStandalone == null) - { + if (releaseServerVersionStandalone == null) { throw new ArgumentNullException("releaseServerVersionStandalone is a required property for APIConfig and cannot be null"); } this.ReleaseServerVersionStandalone = releaseServerVersionStandalone; // to ensure "sdkDeveloperFaqUrl" is required (not null) - if (sdkDeveloperFaqUrl == null) - { + if (sdkDeveloperFaqUrl == null) { throw new ArgumentNullException("sdkDeveloperFaqUrl is a required property for APIConfig and cannot be null"); } this.SdkDeveloperFaqUrl = sdkDeveloperFaqUrl; // to ensure "sdkDiscordUrl" is required (not null) - if (sdkDiscordUrl == null) - { + if (sdkDiscordUrl == null) { throw new ArgumentNullException("sdkDiscordUrl is a required property for APIConfig and cannot be null"); } this.SdkDiscordUrl = sdkDiscordUrl; // to ensure "sdkNotAllowedToPublishMessage" is required (not null) - if (sdkNotAllowedToPublishMessage == null) - { + if (sdkNotAllowedToPublishMessage == null) { throw new ArgumentNullException("sdkNotAllowedToPublishMessage is a required property for APIConfig and cannot be null"); } this.SdkNotAllowedToPublishMessage = sdkNotAllowedToPublishMessage; // to ensure "sdkUnityVersion" is required (not null) - if (sdkUnityVersion == null) - { + if (sdkUnityVersion == null) { throw new ArgumentNullException("sdkUnityVersion is a required property for APIConfig and cannot be null"); } this.SdkUnityVersion = sdkUnityVersion; // to ensure "serverName" is required (not null) - if (serverName == null) - { + if (serverName == null) { throw new ArgumentNullException("serverName is a required property for APIConfig and cannot be null"); } this.ServerName = serverName; // to ensure "supportEmail" is required (not null) - if (supportEmail == null) - { + if (supportEmail == null) { throw new ArgumentNullException("supportEmail is a required property for APIConfig and cannot be null"); } this.SupportEmail = supportEmail; // to ensure "timeOutWorldId" is required (not null) - if (timeOutWorldId == null) - { + if (timeOutWorldId == null) { throw new ArgumentNullException("timeOutWorldId is a required property for APIConfig and cannot be null"); } this.TimeOutWorldId = timeOutWorldId; // to ensure "tutorialWorldId" is required (not null) - if (tutorialWorldId == null) - { + if (tutorialWorldId == null) { throw new ArgumentNullException("tutorialWorldId is a required property for APIConfig and cannot be null"); } this.TutorialWorldId = tutorialWorldId; @@ -392,8 +353,7 @@ protected APIConfig() { } this.UpdateRateMsUdonManual = updateRateMsUdonManual; this.UploadAnalysisPercent = uploadAnalysisPercent; // to ensure "urlList" is required (not null) - if (urlList == null) - { + if (urlList == null) { throw new ArgumentNullException("urlList is a required property for APIConfig and cannot be null"); } this.UrlList = urlList; @@ -403,27 +363,23 @@ protected APIConfig() { } this.UserVerificationRetry = userVerificationRetry; this.UserVerificationTimeout = userVerificationTimeout; // to ensure "viveWindowsUrl" is required (not null) - if (viveWindowsUrl == null) - { + if (viveWindowsUrl == null) { throw new ArgumentNullException("viveWindowsUrl is a required property for APIConfig and cannot be null"); } this.ViveWindowsUrl = viveWindowsUrl; // to ensure "whiteListedAssetUrls" is required (not null) - if (whiteListedAssetUrls == null) - { + if (whiteListedAssetUrls == null) { throw new ArgumentNullException("whiteListedAssetUrls is a required property for APIConfig and cannot be null"); } this.WhiteListedAssetUrls = whiteListedAssetUrls; this.WorldUpdatePeriod = worldUpdatePeriod; // to ensure "playerUrlResolverHash" is required (not null) - if (playerUrlResolverHash == null) - { + if (playerUrlResolverHash == null) { throw new ArgumentNullException("playerUrlResolverHash is a required property for APIConfig and cannot be null"); } this.PlayerUrlResolverHash = playerUrlResolverHash; // to ensure "playerUrlResolverVersion" is required (not null) - if (playerUrlResolverVersion == null) - { + if (playerUrlResolverVersion == null) { throw new ArgumentNullException("playerUrlResolverVersion is a required property for APIConfig and cannot be null"); } this.PlayerUrlResolverVersion = playerUrlResolverVersion; @@ -447,28 +403,28 @@ protected APIConfig() { } /// VRChat's office address /// /// VRChat's office address - [DataMember(Name = "address", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "address", IsRequired = true, EmitDefaultValue = false)] public string Address { get; set; } /// /// Public Announcements /// /// Public Announcements - [DataMember(Name = "announcements", IsRequired = true, EmitDefaultValue = true)] - public List Announcements { get; set; } + [DataMember(Name = "announcements", IsRequired = true, EmitDefaultValue = false)] + public List Announcements { get; set; } /// /// apiKey to be used for all other requests /// /// apiKey to be used for all other requests - [DataMember(Name = "apiKey", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "apiKey", IsRequired = true, EmitDefaultValue = false)] public string ApiKey { get; set; } /// /// Game name /// /// Game name - [DataMember(Name = "appName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "appName", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string AppName { get; set; } @@ -476,76 +432,76 @@ protected APIConfig() { } /// Build tag of the API server /// /// Build tag of the API server - [DataMember(Name = "buildVersionTag", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "buildVersionTag", IsRequired = true, EmitDefaultValue = false)] public string BuildVersionTag { get; set; } /// /// apiKey to be used for all other requests /// /// apiKey to be used for all other requests - [DataMember(Name = "clientApiKey", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "clientApiKey", IsRequired = true, EmitDefaultValue = false)] public string ClientApiKey { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "clientBPSCeiling", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "clientBPSCeiling", IsRequired = true, EmitDefaultValue = false)] public int ClientBPSCeiling { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "clientDisconnectTimeout", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "clientDisconnectTimeout", IsRequired = true, EmitDefaultValue = false)] public int ClientDisconnectTimeout { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "clientReservedPlayerBPS", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "clientReservedPlayerBPS", IsRequired = true, EmitDefaultValue = false)] public int ClientReservedPlayerBPS { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "clientSentCountAllowance", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "clientSentCountAllowance", IsRequired = true, EmitDefaultValue = false)] public int ClientSentCountAllowance { get; set; } /// /// VRChat's contact email /// /// VRChat's contact email - [DataMember(Name = "contactEmail", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "contactEmail", IsRequired = true, EmitDefaultValue = false)] public string ContactEmail { get; set; } /// /// VRChat's copyright-issues-related email /// /// VRChat's copyright-issues-related email - [DataMember(Name = "copyrightEmail", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "copyrightEmail", IsRequired = true, EmitDefaultValue = false)] public string CopyrightEmail { get; set; } /// /// Current version number of the Terms of Service /// /// Current version number of the Terms of Service - [DataMember(Name = "currentTOSVersion", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "currentTOSVersion", IsRequired = true, EmitDefaultValue = false)] public int CurrentTOSVersion { get; set; } /// /// Gets or Sets DefaultAvatar /// - [DataMember(Name = "defaultAvatar", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "defaultAvatar", IsRequired = true, EmitDefaultValue = false)] public string DefaultAvatar { get; set; } /// /// Version number for game development build /// /// Version number for game development build - [DataMember(Name = "devAppVersionStandalone", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "devAppVersionStandalone", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string DevAppVersionStandalone { get; set; } @@ -553,7 +509,7 @@ protected APIConfig() { } /// Developer Download link /// /// Developer Download link - [DataMember(Name = "devDownloadLinkWindows", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "devDownloadLinkWindows", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string DevDownloadLinkWindows { get; set; } @@ -561,7 +517,7 @@ protected APIConfig() { } /// Link to download the development SDK, use downloadUrls instead /// /// Link to download the development SDK, use downloadUrls instead - [DataMember(Name = "devSdkUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "devSdkUrl", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string DevSdkUrl { get; set; } @@ -569,7 +525,7 @@ protected APIConfig() { } /// Version of the development SDK /// /// Version of the development SDK - [DataMember(Name = "devSdkVersion", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "devSdkVersion", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string DevSdkVersion { get; set; } @@ -577,7 +533,7 @@ protected APIConfig() { } /// Version number for server development build /// /// Version number for server development build - [DataMember(Name = "devServerVersionStandalone", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "devServerVersionStandalone", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string DevServerVersionStandalone { get; set; } @@ -585,7 +541,7 @@ protected APIConfig() { } /// Unknown, \"dis\" maybe for disconnect? /// /// Unknown, \"dis\" maybe for disconnect? - [DataMember(Name = "dis-countdown", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "dis-countdown", IsRequired = true, EmitDefaultValue = false)] public DateTime DisCountdown { get; set; } /// @@ -698,33 +654,33 @@ protected APIConfig() { } /// Download link for game on the Oculus Rift website. /// /// Download link for game on the Oculus Rift website. - [DataMember(Name = "downloadLinkWindows", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "downloadLinkWindows", IsRequired = true, EmitDefaultValue = false)] public string DownloadLinkWindows { get; set; } /// /// Gets or Sets DownloadUrls /// - [DataMember(Name = "downloadUrls", IsRequired = true, EmitDefaultValue = true)] - public DownloadURLList DownloadUrls { get; set; } + [DataMember(Name = "downloadUrls", IsRequired = true, EmitDefaultValue = false)] + public APIConfigDownloadURLList DownloadUrls { get; set; } /// /// Array of DynamicWorldRow objects, used by the game to display the list of world rows /// /// Array of DynamicWorldRow objects, used by the game to display the list of world rows - [DataMember(Name = "dynamicWorldRows", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "dynamicWorldRows", IsRequired = true, EmitDefaultValue = false)] public List DynamicWorldRows { get; set; } /// /// Gets or Sets Events /// - [DataMember(Name = "events", IsRequired = true, EmitDefaultValue = true)] - public APIEventConfig Events { get; set; } + [DataMember(Name = "events", IsRequired = true, EmitDefaultValue = false)] + public APIConfigEvents Events { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "gearDemoRoomId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "gearDemoRoomId", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string GearDemoRoomId { get; set; } @@ -732,35 +688,35 @@ protected APIConfig() { } /// WorldID be \"offline\" on User profiles if you are not friends with that user. /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. - [DataMember(Name = "homeWorldId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "homeWorldId", IsRequired = true, EmitDefaultValue = false)] public string HomeWorldId { get; set; } /// /// Redirect target if you try to open the base API domain in your browser /// /// Redirect target if you try to open the base API domain in your browser - [DataMember(Name = "homepageRedirectTarget", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "homepageRedirectTarget", IsRequired = true, EmitDefaultValue = false)] public string HomepageRedirectTarget { get; set; } /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. - [DataMember(Name = "hubWorldId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "hubWorldId", IsRequired = true, EmitDefaultValue = false)] public string HubWorldId { get; set; } /// /// VRChat's job application email /// /// VRChat's job application email - [DataMember(Name = "jobsEmail", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "jobsEmail", IsRequired = true, EmitDefaultValue = false)] public string JobsEmail { get; set; } /// /// MOTD /// /// MOTD - [DataMember(Name = "messageOfTheDay", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "messageOfTheDay", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string MessageOfTheDay { get; set; } @@ -768,35 +724,35 @@ protected APIConfig() { } /// VRChat's moderation related email /// /// VRChat's moderation related email - [DataMember(Name = "moderationEmail", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "moderationEmail", IsRequired = true, EmitDefaultValue = false)] public string ModerationEmail { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "moderationQueryPeriod", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "moderationQueryPeriod", IsRequired = true, EmitDefaultValue = false)] public int ModerationQueryPeriod { get; set; } /// /// Used in-game to notify a user they aren't allowed to select avatars in private worlds /// /// Used in-game to notify a user they aren't allowed to select avatars in private worlds - [DataMember(Name = "notAllowedToSelectAvatarInPrivateWorldMessage", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "notAllowedToSelectAvatarInPrivateWorldMessage", IsRequired = true, EmitDefaultValue = false)] public string NotAllowedToSelectAvatarInPrivateWorldMessage { get; set; } /// /// Extra [plugin](https://doc.photonengine.com/en-us/server/current/plugins/manual) to run in each instance /// /// Extra [plugin](https://doc.photonengine.com/en-us/server/current/plugins/manual) to run in each instance - [DataMember(Name = "plugin", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "plugin", IsRequired = true, EmitDefaultValue = false)] public string Plugin { get; set; } /// /// Version number for game release build /// /// Version number for game release build - [DataMember(Name = "releaseAppVersionStandalone", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "releaseAppVersionStandalone", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string ReleaseAppVersionStandalone { get; set; } @@ -804,7 +760,7 @@ protected APIConfig() { } /// Link to download the release SDK /// /// Link to download the release SDK - [DataMember(Name = "releaseSdkUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "releaseSdkUrl", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string ReleaseSdkUrl { get; set; } @@ -812,7 +768,7 @@ protected APIConfig() { } /// Version of the release SDK /// /// Version of the release SDK - [DataMember(Name = "releaseSdkVersion", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "releaseSdkVersion", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string ReleaseSdkVersion { get; set; } @@ -820,7 +776,7 @@ protected APIConfig() { } /// Version number for server release build /// /// Version number for server release build - [DataMember(Name = "releaseServerVersionStandalone", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "releaseServerVersionStandalone", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string ReleaseServerVersionStandalone { get; set; } @@ -828,98 +784,98 @@ protected APIConfig() { } /// Link to the developer FAQ /// /// Link to the developer FAQ - [DataMember(Name = "sdkDeveloperFaqUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sdkDeveloperFaqUrl", IsRequired = true, EmitDefaultValue = false)] public string SdkDeveloperFaqUrl { get; set; } /// /// Link to the official VRChat Discord /// /// Link to the official VRChat Discord - [DataMember(Name = "sdkDiscordUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sdkDiscordUrl", IsRequired = true, EmitDefaultValue = false)] public string SdkDiscordUrl { get; set; } /// /// Used in the SDK to notify a user they aren't allowed to upload avatars/worlds yet /// /// Used in the SDK to notify a user they aren't allowed to upload avatars/worlds yet - [DataMember(Name = "sdkNotAllowedToPublishMessage", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sdkNotAllowedToPublishMessage", IsRequired = true, EmitDefaultValue = false)] public string SdkNotAllowedToPublishMessage { get; set; } /// /// Unity version supported by the SDK /// /// Unity version supported by the SDK - [DataMember(Name = "sdkUnityVersion", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sdkUnityVersion", IsRequired = true, EmitDefaultValue = false)] public string SdkUnityVersion { get; set; } /// /// Server name of the API server currently responding /// /// Server name of the API server currently responding - [DataMember(Name = "serverName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "serverName", IsRequired = true, EmitDefaultValue = false)] public string ServerName { get; set; } /// /// VRChat's support email /// /// VRChat's support email - [DataMember(Name = "supportEmail", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "supportEmail", IsRequired = true, EmitDefaultValue = false)] public string SupportEmail { get; set; } /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. - [DataMember(Name = "timeOutWorldId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "timeOutWorldId", IsRequired = true, EmitDefaultValue = false)] public string TimeOutWorldId { get; set; } /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. - [DataMember(Name = "tutorialWorldId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tutorialWorldId", IsRequired = true, EmitDefaultValue = false)] public string TutorialWorldId { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "updateRateMsMaximum", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updateRateMsMaximum", IsRequired = true, EmitDefaultValue = false)] public int UpdateRateMsMaximum { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "updateRateMsMinimum", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updateRateMsMinimum", IsRequired = true, EmitDefaultValue = false)] public int UpdateRateMsMinimum { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "updateRateMsNormal", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updateRateMsNormal", IsRequired = true, EmitDefaultValue = false)] public int UpdateRateMsNormal { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "updateRateMsUdonManual", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updateRateMsUdonManual", IsRequired = true, EmitDefaultValue = false)] public int UpdateRateMsUdonManual { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "uploadAnalysisPercent", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "uploadAnalysisPercent", IsRequired = true, EmitDefaultValue = false)] public int UploadAnalysisPercent { get; set; } /// /// List of allowed URLs that bypass the \"Allow untrusted URL's\" setting in-game /// /// List of allowed URLs that bypass the \"Allow untrusted URL's\" setting in-game - [DataMember(Name = "urlList", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "urlList", IsRequired = true, EmitDefaultValue = false)] public List UrlList { get; set; } /// @@ -933,63 +889,63 @@ protected APIConfig() { } /// Unknown /// /// Unknown - [DataMember(Name = "userUpdatePeriod", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "userUpdatePeriod", IsRequired = true, EmitDefaultValue = false)] public int UserUpdatePeriod { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "userVerificationDelay", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "userVerificationDelay", IsRequired = true, EmitDefaultValue = false)] public int UserVerificationDelay { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "userVerificationRetry", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "userVerificationRetry", IsRequired = true, EmitDefaultValue = false)] public int UserVerificationRetry { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "userVerificationTimeout", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "userVerificationTimeout", IsRequired = true, EmitDefaultValue = false)] public int UserVerificationTimeout { get; set; } /// /// Download link for game on the Steam website. /// /// Download link for game on the Steam website. - [DataMember(Name = "viveWindowsUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "viveWindowsUrl", IsRequired = true, EmitDefaultValue = false)] public string ViveWindowsUrl { get; set; } /// /// List of allowed URLs that are allowed to host avatar assets /// /// List of allowed URLs that are allowed to host avatar assets - [DataMember(Name = "whiteListedAssetUrls", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "whiteListedAssetUrls", IsRequired = true, EmitDefaultValue = false)] public List WhiteListedAssetUrls { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "worldUpdatePeriod", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "worldUpdatePeriod", IsRequired = true, EmitDefaultValue = false)] public int WorldUpdatePeriod { get; set; } /// /// Currently used youtube-dl.exe hash in SHA-256-delimited format /// /// Currently used youtube-dl.exe hash in SHA-256-delimited format - [DataMember(Name = "player-url-resolver-hash", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "player-url-resolver-hash", IsRequired = true, EmitDefaultValue = false)] public string PlayerUrlResolverHash { get; set; } /// /// Currently used youtube-dl.exe version /// /// Currently used youtube-dl.exe version - [DataMember(Name = "player-url-resolver-version", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "player-url-resolver-version", IsRequired = true, EmitDefaultValue = false)] public string PlayerUrlResolverVersion { get; set; } /// @@ -998,7 +954,7 @@ protected APIConfig() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class APIConfig {\n"); sb.Append(" VoiceEnableDegradation: ").Append(VoiceEnableDegradation).Append("\n"); sb.Append(" VoiceEnableReceiverLimiting: ").Append(VoiceEnableReceiverLimiting).Append("\n"); @@ -1111,9 +1067,8 @@ public override bool Equals(object input) public bool Equals(APIConfig input) { if (input == null) - { return false; - } + return ( this.VoiceEnableDegradation == input.VoiceEnableDegradation || @@ -1495,221 +1450,131 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.VoiceEnableDegradation.GetHashCode(); - hashCode = (hashCode * 59) + this.VoiceEnableReceiverLimiting.GetHashCode(); + hashCode = hashCode * 59 + this.VoiceEnableDegradation.GetHashCode(); + hashCode = hashCode * 59 + this.VoiceEnableReceiverLimiting.GetHashCode(); if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } + hashCode = hashCode * 59 + this.Address.GetHashCode(); if (this.Announcements != null) - { - hashCode = (hashCode * 59) + this.Announcements.GetHashCode(); - } + hashCode = hashCode * 59 + this.Announcements.GetHashCode(); if (this.ApiKey != null) - { - hashCode = (hashCode * 59) + this.ApiKey.GetHashCode(); - } + hashCode = hashCode * 59 + this.ApiKey.GetHashCode(); if (this.AppName != null) - { - hashCode = (hashCode * 59) + this.AppName.GetHashCode(); - } + hashCode = hashCode * 59 + this.AppName.GetHashCode(); if (this.BuildVersionTag != null) - { - hashCode = (hashCode * 59) + this.BuildVersionTag.GetHashCode(); - } + hashCode = hashCode * 59 + this.BuildVersionTag.GetHashCode(); if (this.ClientApiKey != null) - { - hashCode = (hashCode * 59) + this.ClientApiKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ClientBPSCeiling.GetHashCode(); - hashCode = (hashCode * 59) + this.ClientDisconnectTimeout.GetHashCode(); - hashCode = (hashCode * 59) + this.ClientReservedPlayerBPS.GetHashCode(); - hashCode = (hashCode * 59) + this.ClientSentCountAllowance.GetHashCode(); + hashCode = hashCode * 59 + this.ClientApiKey.GetHashCode(); + hashCode = hashCode * 59 + this.ClientBPSCeiling.GetHashCode(); + hashCode = hashCode * 59 + this.ClientDisconnectTimeout.GetHashCode(); + hashCode = hashCode * 59 + this.ClientReservedPlayerBPS.GetHashCode(); + hashCode = hashCode * 59 + this.ClientSentCountAllowance.GetHashCode(); if (this.ContactEmail != null) - { - hashCode = (hashCode * 59) + this.ContactEmail.GetHashCode(); - } + hashCode = hashCode * 59 + this.ContactEmail.GetHashCode(); if (this.CopyrightEmail != null) - { - hashCode = (hashCode * 59) + this.CopyrightEmail.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CurrentTOSVersion.GetHashCode(); + hashCode = hashCode * 59 + this.CopyrightEmail.GetHashCode(); + hashCode = hashCode * 59 + this.CurrentTOSVersion.GetHashCode(); if (this.DefaultAvatar != null) - { - hashCode = (hashCode * 59) + this.DefaultAvatar.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DeploymentGroup.GetHashCode(); + hashCode = hashCode * 59 + this.DefaultAvatar.GetHashCode(); + hashCode = hashCode * 59 + this.DeploymentGroup.GetHashCode(); if (this.DevAppVersionStandalone != null) - { - hashCode = (hashCode * 59) + this.DevAppVersionStandalone.GetHashCode(); - } + hashCode = hashCode * 59 + this.DevAppVersionStandalone.GetHashCode(); if (this.DevDownloadLinkWindows != null) - { - hashCode = (hashCode * 59) + this.DevDownloadLinkWindows.GetHashCode(); - } + hashCode = hashCode * 59 + this.DevDownloadLinkWindows.GetHashCode(); if (this.DevSdkUrl != null) - { - hashCode = (hashCode * 59) + this.DevSdkUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.DevSdkUrl.GetHashCode(); if (this.DevSdkVersion != null) - { - hashCode = (hashCode * 59) + this.DevSdkVersion.GetHashCode(); - } + hashCode = hashCode * 59 + this.DevSdkVersion.GetHashCode(); if (this.DevServerVersionStandalone != null) - { - hashCode = (hashCode * 59) + this.DevServerVersionStandalone.GetHashCode(); - } + hashCode = hashCode * 59 + this.DevServerVersionStandalone.GetHashCode(); if (this.DisCountdown != null) - { - hashCode = (hashCode * 59) + this.DisCountdown.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DisableAvatarCopying.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableAvatarGating.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableCommunityLabs.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableCommunityLabsPromotion.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableEmail.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableEventStream.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableFeedbackGating.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableFrontendBuilds.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableHello.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableOculusSubs.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableRegistration.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableSteamNetworking.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableTwoFactorAuth.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableUdon.GetHashCode(); - hashCode = (hashCode * 59) + this.DisableUpgradeAccount.GetHashCode(); + hashCode = hashCode * 59 + this.DisCountdown.GetHashCode(); + hashCode = hashCode * 59 + this.DisableAvatarCopying.GetHashCode(); + hashCode = hashCode * 59 + this.DisableAvatarGating.GetHashCode(); + hashCode = hashCode * 59 + this.DisableCommunityLabs.GetHashCode(); + hashCode = hashCode * 59 + this.DisableCommunityLabsPromotion.GetHashCode(); + hashCode = hashCode * 59 + this.DisableEmail.GetHashCode(); + hashCode = hashCode * 59 + this.DisableEventStream.GetHashCode(); + hashCode = hashCode * 59 + this.DisableFeedbackGating.GetHashCode(); + hashCode = hashCode * 59 + this.DisableFrontendBuilds.GetHashCode(); + hashCode = hashCode * 59 + this.DisableHello.GetHashCode(); + hashCode = hashCode * 59 + this.DisableOculusSubs.GetHashCode(); + hashCode = hashCode * 59 + this.DisableRegistration.GetHashCode(); + hashCode = hashCode * 59 + this.DisableSteamNetworking.GetHashCode(); + hashCode = hashCode * 59 + this.DisableTwoFactorAuth.GetHashCode(); + hashCode = hashCode * 59 + this.DisableUdon.GetHashCode(); + hashCode = hashCode * 59 + this.DisableUpgradeAccount.GetHashCode(); if (this.DownloadLinkWindows != null) - { - hashCode = (hashCode * 59) + this.DownloadLinkWindows.GetHashCode(); - } + hashCode = hashCode * 59 + this.DownloadLinkWindows.GetHashCode(); if (this.DownloadUrls != null) - { - hashCode = (hashCode * 59) + this.DownloadUrls.GetHashCode(); - } + hashCode = hashCode * 59 + this.DownloadUrls.GetHashCode(); if (this.DynamicWorldRows != null) - { - hashCode = (hashCode * 59) + this.DynamicWorldRows.GetHashCode(); - } + hashCode = hashCode * 59 + this.DynamicWorldRows.GetHashCode(); if (this.Events != null) - { - hashCode = (hashCode * 59) + this.Events.GetHashCode(); - } + hashCode = hashCode * 59 + this.Events.GetHashCode(); if (this.GearDemoRoomId != null) - { - hashCode = (hashCode * 59) + this.GearDemoRoomId.GetHashCode(); - } + hashCode = hashCode * 59 + this.GearDemoRoomId.GetHashCode(); if (this.HomeWorldId != null) - { - hashCode = (hashCode * 59) + this.HomeWorldId.GetHashCode(); - } + hashCode = hashCode * 59 + this.HomeWorldId.GetHashCode(); if (this.HomepageRedirectTarget != null) - { - hashCode = (hashCode * 59) + this.HomepageRedirectTarget.GetHashCode(); - } + hashCode = hashCode * 59 + this.HomepageRedirectTarget.GetHashCode(); if (this.HubWorldId != null) - { - hashCode = (hashCode * 59) + this.HubWorldId.GetHashCode(); - } + hashCode = hashCode * 59 + this.HubWorldId.GetHashCode(); if (this.JobsEmail != null) - { - hashCode = (hashCode * 59) + this.JobsEmail.GetHashCode(); - } + hashCode = hashCode * 59 + this.JobsEmail.GetHashCode(); if (this.MessageOfTheDay != null) - { - hashCode = (hashCode * 59) + this.MessageOfTheDay.GetHashCode(); - } + hashCode = hashCode * 59 + this.MessageOfTheDay.GetHashCode(); if (this.ModerationEmail != null) - { - hashCode = (hashCode * 59) + this.ModerationEmail.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ModerationQueryPeriod.GetHashCode(); + hashCode = hashCode * 59 + this.ModerationEmail.GetHashCode(); + hashCode = hashCode * 59 + this.ModerationQueryPeriod.GetHashCode(); if (this.NotAllowedToSelectAvatarInPrivateWorldMessage != null) - { - hashCode = (hashCode * 59) + this.NotAllowedToSelectAvatarInPrivateWorldMessage.GetHashCode(); - } + hashCode = hashCode * 59 + this.NotAllowedToSelectAvatarInPrivateWorldMessage.GetHashCode(); if (this.Plugin != null) - { - hashCode = (hashCode * 59) + this.Plugin.GetHashCode(); - } + hashCode = hashCode * 59 + this.Plugin.GetHashCode(); if (this.ReleaseAppVersionStandalone != null) - { - hashCode = (hashCode * 59) + this.ReleaseAppVersionStandalone.GetHashCode(); - } + hashCode = hashCode * 59 + this.ReleaseAppVersionStandalone.GetHashCode(); if (this.ReleaseSdkUrl != null) - { - hashCode = (hashCode * 59) + this.ReleaseSdkUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ReleaseSdkUrl.GetHashCode(); if (this.ReleaseSdkVersion != null) - { - hashCode = (hashCode * 59) + this.ReleaseSdkVersion.GetHashCode(); - } + hashCode = hashCode * 59 + this.ReleaseSdkVersion.GetHashCode(); if (this.ReleaseServerVersionStandalone != null) - { - hashCode = (hashCode * 59) + this.ReleaseServerVersionStandalone.GetHashCode(); - } + hashCode = hashCode * 59 + this.ReleaseServerVersionStandalone.GetHashCode(); if (this.SdkDeveloperFaqUrl != null) - { - hashCode = (hashCode * 59) + this.SdkDeveloperFaqUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.SdkDeveloperFaqUrl.GetHashCode(); if (this.SdkDiscordUrl != null) - { - hashCode = (hashCode * 59) + this.SdkDiscordUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.SdkDiscordUrl.GetHashCode(); if (this.SdkNotAllowedToPublishMessage != null) - { - hashCode = (hashCode * 59) + this.SdkNotAllowedToPublishMessage.GetHashCode(); - } + hashCode = hashCode * 59 + this.SdkNotAllowedToPublishMessage.GetHashCode(); if (this.SdkUnityVersion != null) - { - hashCode = (hashCode * 59) + this.SdkUnityVersion.GetHashCode(); - } + hashCode = hashCode * 59 + this.SdkUnityVersion.GetHashCode(); if (this.ServerName != null) - { - hashCode = (hashCode * 59) + this.ServerName.GetHashCode(); - } + hashCode = hashCode * 59 + this.ServerName.GetHashCode(); if (this.SupportEmail != null) - { - hashCode = (hashCode * 59) + this.SupportEmail.GetHashCode(); - } + hashCode = hashCode * 59 + this.SupportEmail.GetHashCode(); if (this.TimeOutWorldId != null) - { - hashCode = (hashCode * 59) + this.TimeOutWorldId.GetHashCode(); - } + hashCode = hashCode * 59 + this.TimeOutWorldId.GetHashCode(); if (this.TutorialWorldId != null) - { - hashCode = (hashCode * 59) + this.TutorialWorldId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UpdateRateMsMaximum.GetHashCode(); - hashCode = (hashCode * 59) + this.UpdateRateMsMinimum.GetHashCode(); - hashCode = (hashCode * 59) + this.UpdateRateMsNormal.GetHashCode(); - hashCode = (hashCode * 59) + this.UpdateRateMsUdonManual.GetHashCode(); - hashCode = (hashCode * 59) + this.UploadAnalysisPercent.GetHashCode(); + hashCode = hashCode * 59 + this.TutorialWorldId.GetHashCode(); + hashCode = hashCode * 59 + this.UpdateRateMsMaximum.GetHashCode(); + hashCode = hashCode * 59 + this.UpdateRateMsMinimum.GetHashCode(); + hashCode = hashCode * 59 + this.UpdateRateMsNormal.GetHashCode(); + hashCode = hashCode * 59 + this.UpdateRateMsUdonManual.GetHashCode(); + hashCode = hashCode * 59 + this.UploadAnalysisPercent.GetHashCode(); if (this.UrlList != null) - { - hashCode = (hashCode * 59) + this.UrlList.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UseReliableUdpForVoice.GetHashCode(); - hashCode = (hashCode * 59) + this.UserUpdatePeriod.GetHashCode(); - hashCode = (hashCode * 59) + this.UserVerificationDelay.GetHashCode(); - hashCode = (hashCode * 59) + this.UserVerificationRetry.GetHashCode(); - hashCode = (hashCode * 59) + this.UserVerificationTimeout.GetHashCode(); + hashCode = hashCode * 59 + this.UrlList.GetHashCode(); + hashCode = hashCode * 59 + this.UseReliableUdpForVoice.GetHashCode(); + hashCode = hashCode * 59 + this.UserUpdatePeriod.GetHashCode(); + hashCode = hashCode * 59 + this.UserVerificationDelay.GetHashCode(); + hashCode = hashCode * 59 + this.UserVerificationRetry.GetHashCode(); + hashCode = hashCode * 59 + this.UserVerificationTimeout.GetHashCode(); if (this.ViveWindowsUrl != null) - { - hashCode = (hashCode * 59) + this.ViveWindowsUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ViveWindowsUrl.GetHashCode(); if (this.WhiteListedAssetUrls != null) - { - hashCode = (hashCode * 59) + this.WhiteListedAssetUrls.GetHashCode(); - } - hashCode = (hashCode * 59) + this.WorldUpdatePeriod.GetHashCode(); + hashCode = hashCode * 59 + this.WhiteListedAssetUrls.GetHashCode(); + hashCode = hashCode * 59 + this.WorldUpdatePeriod.GetHashCode(); if (this.PlayerUrlResolverHash != null) - { - hashCode = (hashCode * 59) + this.PlayerUrlResolverHash.GetHashCode(); - } + hashCode = hashCode * 59 + this.PlayerUrlResolverHash.GetHashCode(); if (this.PlayerUrlResolverVersion != null) - { - hashCode = (hashCode * 59) + this.PlayerUrlResolverVersion.GetHashCode(); - } + hashCode = hashCode * 59 + this.PlayerUrlResolverVersion.GetHashCode(); return hashCode; } } @@ -1722,49 +1587,49 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Address (string) minLength - if (this.Address != null && this.Address.Length < 1) + if(this.Address != null && this.Address.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Address, length must be greater than 1.", new [] { "Address" }); } // ApiKey (string) minLength - if (this.ApiKey != null && this.ApiKey.Length < 1) + if(this.ApiKey != null && this.ApiKey.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ApiKey, length must be greater than 1.", new [] { "ApiKey" }); } // AppName (string) minLength - if (this.AppName != null && this.AppName.Length < 1) + if(this.AppName != null && this.AppName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AppName, length must be greater than 1.", new [] { "AppName" }); } // BuildVersionTag (string) minLength - if (this.BuildVersionTag != null && this.BuildVersionTag.Length < 1) + if(this.BuildVersionTag != null && this.BuildVersionTag.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BuildVersionTag, length must be greater than 1.", new [] { "BuildVersionTag" }); } // ClientApiKey (string) minLength - if (this.ClientApiKey != null && this.ClientApiKey.Length < 1) + if(this.ClientApiKey != null && this.ClientApiKey.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClientApiKey, length must be greater than 1.", new [] { "ClientApiKey" }); } // ContactEmail (string) minLength - if (this.ContactEmail != null && this.ContactEmail.Length < 1) + if(this.ContactEmail != null && this.ContactEmail.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ContactEmail, length must be greater than 1.", new [] { "ContactEmail" }); } // CopyrightEmail (string) minLength - if (this.CopyrightEmail != null && this.CopyrightEmail.Length < 1) + if(this.CopyrightEmail != null && this.CopyrightEmail.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CopyrightEmail, length must be greater than 1.", new [] { "CopyrightEmail" }); } // CurrentTOSVersion (int) minimum - if (this.CurrentTOSVersion < (int)0) + if(this.CurrentTOSVersion < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CurrentTOSVersion, must be a value greater than or equal to 0.", new [] { "CurrentTOSVersion" }); } @@ -1777,43 +1642,43 @@ public override int GetHashCode() } // DevAppVersionStandalone (string) minLength - if (this.DevAppVersionStandalone != null && this.DevAppVersionStandalone.Length < 1) + if(this.DevAppVersionStandalone != null && this.DevAppVersionStandalone.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DevAppVersionStandalone, length must be greater than 1.", new [] { "DevAppVersionStandalone" }); } // DevDownloadLinkWindows (string) minLength - if (this.DevDownloadLinkWindows != null && this.DevDownloadLinkWindows.Length < 1) + if(this.DevDownloadLinkWindows != null && this.DevDownloadLinkWindows.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DevDownloadLinkWindows, length must be greater than 1.", new [] { "DevDownloadLinkWindows" }); } // DevSdkUrl (string) minLength - if (this.DevSdkUrl != null && this.DevSdkUrl.Length < 1) + if(this.DevSdkUrl != null && this.DevSdkUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DevSdkUrl, length must be greater than 1.", new [] { "DevSdkUrl" }); } // DevSdkVersion (string) minLength - if (this.DevSdkVersion != null && this.DevSdkVersion.Length < 1) + if(this.DevSdkVersion != null && this.DevSdkVersion.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DevSdkVersion, length must be greater than 1.", new [] { "DevSdkVersion" }); } // DevServerVersionStandalone (string) minLength - if (this.DevServerVersionStandalone != null && this.DevServerVersionStandalone.Length < 1) + if(this.DevServerVersionStandalone != null && this.DevServerVersionStandalone.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DevServerVersionStandalone, length must be greater than 1.", new [] { "DevServerVersionStandalone" }); } // DownloadLinkWindows (string) minLength - if (this.DownloadLinkWindows != null && this.DownloadLinkWindows.Length < 1) + if(this.DownloadLinkWindows != null && this.DownloadLinkWindows.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DownloadLinkWindows, length must be greater than 1.", new [] { "DownloadLinkWindows" }); } // GearDemoRoomId (string) minLength - if (this.GearDemoRoomId != null && this.GearDemoRoomId.Length < 1) + if(this.GearDemoRoomId != null && this.GearDemoRoomId.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GearDemoRoomId, length must be greater than 1.", new [] { "GearDemoRoomId" }); } @@ -1826,7 +1691,7 @@ public override int GetHashCode() } // HomepageRedirectTarget (string) minLength - if (this.HomepageRedirectTarget != null && this.HomepageRedirectTarget.Length < 1) + if(this.HomepageRedirectTarget != null && this.HomepageRedirectTarget.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HomepageRedirectTarget, length must be greater than 1.", new [] { "HomepageRedirectTarget" }); } @@ -1839,91 +1704,91 @@ public override int GetHashCode() } // JobsEmail (string) minLength - if (this.JobsEmail != null && this.JobsEmail.Length < 1) + if(this.JobsEmail != null && this.JobsEmail.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for JobsEmail, length must be greater than 1.", new [] { "JobsEmail" }); } // MessageOfTheDay (string) minLength - if (this.MessageOfTheDay != null && this.MessageOfTheDay.Length < 1) + if(this.MessageOfTheDay != null && this.MessageOfTheDay.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MessageOfTheDay, length must be greater than 1.", new [] { "MessageOfTheDay" }); } // ModerationEmail (string) minLength - if (this.ModerationEmail != null && this.ModerationEmail.Length < 1) + if(this.ModerationEmail != null && this.ModerationEmail.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ModerationEmail, length must be greater than 1.", new [] { "ModerationEmail" }); } // NotAllowedToSelectAvatarInPrivateWorldMessage (string) minLength - if (this.NotAllowedToSelectAvatarInPrivateWorldMessage != null && this.NotAllowedToSelectAvatarInPrivateWorldMessage.Length < 1) + if(this.NotAllowedToSelectAvatarInPrivateWorldMessage != null && this.NotAllowedToSelectAvatarInPrivateWorldMessage.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for NotAllowedToSelectAvatarInPrivateWorldMessage, length must be greater than 1.", new [] { "NotAllowedToSelectAvatarInPrivateWorldMessage" }); } // Plugin (string) minLength - if (this.Plugin != null && this.Plugin.Length < 1) + if(this.Plugin != null && this.Plugin.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Plugin, length must be greater than 1.", new [] { "Plugin" }); } // ReleaseAppVersionStandalone (string) minLength - if (this.ReleaseAppVersionStandalone != null && this.ReleaseAppVersionStandalone.Length < 1) + if(this.ReleaseAppVersionStandalone != null && this.ReleaseAppVersionStandalone.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReleaseAppVersionStandalone, length must be greater than 1.", new [] { "ReleaseAppVersionStandalone" }); } // ReleaseSdkUrl (string) minLength - if (this.ReleaseSdkUrl != null && this.ReleaseSdkUrl.Length < 1) + if(this.ReleaseSdkUrl != null && this.ReleaseSdkUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReleaseSdkUrl, length must be greater than 1.", new [] { "ReleaseSdkUrl" }); } // ReleaseSdkVersion (string) minLength - if (this.ReleaseSdkVersion != null && this.ReleaseSdkVersion.Length < 1) + if(this.ReleaseSdkVersion != null && this.ReleaseSdkVersion.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReleaseSdkVersion, length must be greater than 1.", new [] { "ReleaseSdkVersion" }); } // ReleaseServerVersionStandalone (string) minLength - if (this.ReleaseServerVersionStandalone != null && this.ReleaseServerVersionStandalone.Length < 1) + if(this.ReleaseServerVersionStandalone != null && this.ReleaseServerVersionStandalone.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReleaseServerVersionStandalone, length must be greater than 1.", new [] { "ReleaseServerVersionStandalone" }); } // SdkDeveloperFaqUrl (string) minLength - if (this.SdkDeveloperFaqUrl != null && this.SdkDeveloperFaqUrl.Length < 1) + if(this.SdkDeveloperFaqUrl != null && this.SdkDeveloperFaqUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SdkDeveloperFaqUrl, length must be greater than 1.", new [] { "SdkDeveloperFaqUrl" }); } // SdkDiscordUrl (string) minLength - if (this.SdkDiscordUrl != null && this.SdkDiscordUrl.Length < 1) + if(this.SdkDiscordUrl != null && this.SdkDiscordUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SdkDiscordUrl, length must be greater than 1.", new [] { "SdkDiscordUrl" }); } // SdkNotAllowedToPublishMessage (string) minLength - if (this.SdkNotAllowedToPublishMessage != null && this.SdkNotAllowedToPublishMessage.Length < 1) + if(this.SdkNotAllowedToPublishMessage != null && this.SdkNotAllowedToPublishMessage.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SdkNotAllowedToPublishMessage, length must be greater than 1.", new [] { "SdkNotAllowedToPublishMessage" }); } // SdkUnityVersion (string) minLength - if (this.SdkUnityVersion != null && this.SdkUnityVersion.Length < 1) + if(this.SdkUnityVersion != null && this.SdkUnityVersion.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SdkUnityVersion, length must be greater than 1.", new [] { "SdkUnityVersion" }); } // ServerName (string) minLength - if (this.ServerName != null && this.ServerName.Length < 1) + if(this.ServerName != null && this.ServerName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ServerName, length must be greater than 1.", new [] { "ServerName" }); } // SupportEmail (string) minLength - if (this.SupportEmail != null && this.SupportEmail.Length < 1) + if(this.SupportEmail != null && this.SupportEmail.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SupportEmail, length must be greater than 1.", new [] { "SupportEmail" }); } @@ -1943,19 +1808,19 @@ public override int GetHashCode() } // ViveWindowsUrl (string) minLength - if (this.ViveWindowsUrl != null && this.ViveWindowsUrl.Length < 1) + if(this.ViveWindowsUrl != null && this.ViveWindowsUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ViveWindowsUrl, length must be greater than 1.", new [] { "ViveWindowsUrl" }); } // PlayerUrlResolverHash (string) minLength - if (this.PlayerUrlResolverHash != null && this.PlayerUrlResolverHash.Length < 1) + if(this.PlayerUrlResolverHash != null && this.PlayerUrlResolverHash.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PlayerUrlResolverHash, length must be greater than 1.", new [] { "PlayerUrlResolverHash" }); } // PlayerUrlResolverVersion (string) minLength - if (this.PlayerUrlResolverVersion != null && this.PlayerUrlResolverVersion.Length < 1) + if(this.PlayerUrlResolverVersion != null && this.PlayerUrlResolverVersion.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PlayerUrlResolverVersion, length must be greater than 1.", new [] { "PlayerUrlResolverVersion" }); } diff --git a/src/VRChat.API/Model/PublicAnnouncement.cs b/src/VRChat.API/Model/APIConfigAnnouncement.cs similarity index 76% rename from src/VRChat.API/Model/PublicAnnouncement.cs rename to src/VRChat.API/Model/APIConfigAnnouncement.cs index d01d6f5c..7316a0b0 100644 --- a/src/VRChat.API/Model/PublicAnnouncement.cs +++ b/src/VRChat.API/Model/APIConfigAnnouncement.cs @@ -28,31 +28,29 @@ namespace VRChat.API.Model /// /// Public Announcement /// - [DataContract(Name = "Public_Announcement")] - public partial class PublicAnnouncement : IEquatable, IValidatableObject + [DataContract(Name = "APIConfigAnnouncement")] + public partial class APIConfigAnnouncement : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected PublicAnnouncement() { } + protected APIConfigAnnouncement() { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Announcement name (required). /// Announcement text (required). - public PublicAnnouncement(string name = default(string), string text = default(string)) + public APIConfigAnnouncement(string name = default(string), string text = default(string)) { // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for PublicAnnouncement and cannot be null"); + if (name == null) { + throw new ArgumentNullException("name is a required property for APIConfigAnnouncement and cannot be null"); } this.Name = name; // to ensure "text" is required (not null) - if (text == null) - { - throw new ArgumentNullException("text is a required property for PublicAnnouncement and cannot be null"); + if (text == null) { + throw new ArgumentNullException("text is a required property for APIConfigAnnouncement and cannot be null"); } this.Text = text; } @@ -61,14 +59,14 @@ protected PublicAnnouncement() { } /// Announcement name /// /// Announcement name - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// /// Announcement text /// /// Announcement text - [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = false)] public string Text { get; set; } /// @@ -77,8 +75,8 @@ protected PublicAnnouncement() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); - sb.Append("class PublicAnnouncement {\n"); + var sb = new StringBuilder(); + sb.Append("class APIConfigAnnouncement {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); sb.Append("}\n"); @@ -101,20 +99,19 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as PublicAnnouncement); + return this.Equals(input as APIConfigAnnouncement); } /// - /// Returns true if PublicAnnouncement instances are equal + /// Returns true if APIConfigAnnouncement instances are equal /// - /// Instance of PublicAnnouncement to be compared + /// Instance of APIConfigAnnouncement to be compared /// Boolean - public bool Equals(PublicAnnouncement input) + public bool Equals(APIConfigAnnouncement input) { if (input == null) - { return false; - } + return ( this.Name == input.Name || @@ -138,13 +135,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } + hashCode = hashCode * 59 + this.Text.GetHashCode(); return hashCode; } } @@ -157,13 +150,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // Text (string) minLength - if (this.Text != null && this.Text.Length < 1) + if(this.Text != null && this.Text.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Text, length must be greater than 1.", new [] { "Text" }); } diff --git a/src/VRChat.API/Model/DownloadURLList.cs b/src/VRChat.API/Model/APIConfigDownloadURLList.cs similarity index 76% rename from src/VRChat.API/Model/DownloadURLList.cs rename to src/VRChat.API/Model/APIConfigDownloadURLList.cs index 71fee5c7..19b56c3e 100644 --- a/src/VRChat.API/Model/DownloadURLList.cs +++ b/src/VRChat.API/Model/APIConfigDownloadURLList.cs @@ -28,38 +28,35 @@ namespace VRChat.API.Model /// /// Download links for various development assets. /// - [DataContract(Name = "DownloadURLList")] - public partial class DownloadURLList : IEquatable, IValidatableObject + [DataContract(Name = "APIConfigDownloadURLList")] + public partial class APIConfigDownloadURLList : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected DownloadURLList() { } + protected APIConfigDownloadURLList() { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Download link for legacy SDK2 (required). /// Download link for SDK3 for Avatars (required). /// Download link for SDK3 for Worlds (required). - public DownloadURLList(string sdk2 = default(string), string sdk3Avatars = default(string), string sdk3Worlds = default(string)) + public APIConfigDownloadURLList(string sdk2 = default(string), string sdk3Avatars = default(string), string sdk3Worlds = default(string)) { // to ensure "sdk2" is required (not null) - if (sdk2 == null) - { - throw new ArgumentNullException("sdk2 is a required property for DownloadURLList and cannot be null"); + if (sdk2 == null) { + throw new ArgumentNullException("sdk2 is a required property for APIConfigDownloadURLList and cannot be null"); } this.Sdk2 = sdk2; // to ensure "sdk3Avatars" is required (not null) - if (sdk3Avatars == null) - { - throw new ArgumentNullException("sdk3Avatars is a required property for DownloadURLList and cannot be null"); + if (sdk3Avatars == null) { + throw new ArgumentNullException("sdk3Avatars is a required property for APIConfigDownloadURLList and cannot be null"); } this.Sdk3Avatars = sdk3Avatars; // to ensure "sdk3Worlds" is required (not null) - if (sdk3Worlds == null) - { - throw new ArgumentNullException("sdk3Worlds is a required property for DownloadURLList and cannot be null"); + if (sdk3Worlds == null) { + throw new ArgumentNullException("sdk3Worlds is a required property for APIConfigDownloadURLList and cannot be null"); } this.Sdk3Worlds = sdk3Worlds; } @@ -68,7 +65,7 @@ protected DownloadURLList() { } /// Download link for legacy SDK2 /// /// Download link for legacy SDK2 - [DataMember(Name = "sdk2", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sdk2", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string Sdk2 { get; set; } @@ -76,14 +73,14 @@ protected DownloadURLList() { } /// Download link for SDK3 for Avatars /// /// Download link for SDK3 for Avatars - [DataMember(Name = "sdk3-avatars", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sdk3-avatars", IsRequired = true, EmitDefaultValue = false)] public string Sdk3Avatars { get; set; } /// /// Download link for SDK3 for Worlds /// /// Download link for SDK3 for Worlds - [DataMember(Name = "sdk3-worlds", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sdk3-worlds", IsRequired = true, EmitDefaultValue = false)] public string Sdk3Worlds { get; set; } /// @@ -92,8 +89,8 @@ protected DownloadURLList() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); - sb.Append("class DownloadURLList {\n"); + var sb = new StringBuilder(); + sb.Append("class APIConfigDownloadURLList {\n"); sb.Append(" Sdk2: ").Append(Sdk2).Append("\n"); sb.Append(" Sdk3Avatars: ").Append(Sdk3Avatars).Append("\n"); sb.Append(" Sdk3Worlds: ").Append(Sdk3Worlds).Append("\n"); @@ -117,20 +114,19 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as DownloadURLList); + return this.Equals(input as APIConfigDownloadURLList); } /// - /// Returns true if DownloadURLList instances are equal + /// Returns true if APIConfigDownloadURLList instances are equal /// - /// Instance of DownloadURLList to be compared + /// Instance of APIConfigDownloadURLList to be compared /// Boolean - public bool Equals(DownloadURLList input) + public bool Equals(APIConfigDownloadURLList input) { if (input == null) - { return false; - } + return ( this.Sdk2 == input.Sdk2 || @@ -159,17 +155,11 @@ public override int GetHashCode() { int hashCode = 41; if (this.Sdk2 != null) - { - hashCode = (hashCode * 59) + this.Sdk2.GetHashCode(); - } + hashCode = hashCode * 59 + this.Sdk2.GetHashCode(); if (this.Sdk3Avatars != null) - { - hashCode = (hashCode * 59) + this.Sdk3Avatars.GetHashCode(); - } + hashCode = hashCode * 59 + this.Sdk3Avatars.GetHashCode(); if (this.Sdk3Worlds != null) - { - hashCode = (hashCode * 59) + this.Sdk3Worlds.GetHashCode(); - } + hashCode = hashCode * 59 + this.Sdk3Worlds.GetHashCode(); return hashCode; } } @@ -182,19 +172,19 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Sdk2 (string) minLength - if (this.Sdk2 != null && this.Sdk2.Length < 1) + if(this.Sdk2 != null && this.Sdk2.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sdk2, length must be greater than 1.", new [] { "Sdk2" }); } // Sdk3Avatars (string) minLength - if (this.Sdk3Avatars != null && this.Sdk3Avatars.Length < 1) + if(this.Sdk3Avatars != null && this.Sdk3Avatars.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sdk3Avatars, length must be greater than 1.", new [] { "Sdk3Avatars" }); } // Sdk3Worlds (string) minLength - if (this.Sdk3Worlds != null && this.Sdk3Worlds.Length < 1) + if(this.Sdk3Worlds != null && this.Sdk3Worlds.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sdk3Worlds, length must be greater than 1.", new [] { "Sdk3Worlds" }); } diff --git a/src/VRChat.API/Model/APIEventConfig.cs b/src/VRChat.API/Model/APIConfigEvents.cs similarity index 79% rename from src/VRChat.API/Model/APIEventConfig.cs rename to src/VRChat.API/Model/APIConfigEvents.cs index d8039e7c..4c763d70 100644 --- a/src/VRChat.API/Model/APIEventConfig.cs +++ b/src/VRChat.API/Model/APIConfigEvents.cs @@ -26,18 +26,18 @@ namespace VRChat.API.Model { /// - /// APIEventConfig + /// APIConfigEvents /// - [DataContract(Name = "APIEventConfig")] - public partial class APIEventConfig : IEquatable, IValidatableObject + [DataContract(Name = "APIConfigEvents")] + public partial class APIConfigEvents : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected APIEventConfig() { } + protected APIConfigEvents() { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Unknown (required). /// Unknown (required). @@ -49,7 +49,7 @@ protected APIEventConfig() { } /// Unknown (required). /// Unknown (required). /// Unknown (required). - public APIEventConfig(int distanceClose = default(int), int distanceFactor = default(int), int distanceFar = default(int), int groupDistance = default(int), int maximumBunchSize = default(int), int notVisibleFactor = default(int), int playerOrderBucketSize = default(int), int playerOrderFactor = default(int), int slowUpdateFactorThreshold = default(int), int viewSegmentLength = default(int)) + public APIConfigEvents(int distanceClose = default(int), int distanceFactor = default(int), int distanceFar = default(int), int groupDistance = default(int), int maximumBunchSize = default(int), int notVisibleFactor = default(int), int playerOrderBucketSize = default(int), int playerOrderFactor = default(int), int slowUpdateFactorThreshold = default(int), int viewSegmentLength = default(int)) { this.DistanceClose = distanceClose; this.DistanceFactor = distanceFactor; @@ -67,70 +67,70 @@ protected APIEventConfig() { } /// Unknown /// /// Unknown - [DataMember(Name = "distanceClose", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "distanceClose", IsRequired = true, EmitDefaultValue = false)] public int DistanceClose { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "distanceFactor", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "distanceFactor", IsRequired = true, EmitDefaultValue = false)] public int DistanceFactor { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "distanceFar", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "distanceFar", IsRequired = true, EmitDefaultValue = false)] public int DistanceFar { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "groupDistance", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "groupDistance", IsRequired = true, EmitDefaultValue = false)] public int GroupDistance { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "maximumBunchSize", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "maximumBunchSize", IsRequired = true, EmitDefaultValue = false)] public int MaximumBunchSize { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "notVisibleFactor", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "notVisibleFactor", IsRequired = true, EmitDefaultValue = false)] public int NotVisibleFactor { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "playerOrderBucketSize", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "playerOrderBucketSize", IsRequired = true, EmitDefaultValue = false)] public int PlayerOrderBucketSize { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "playerOrderFactor", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "playerOrderFactor", IsRequired = true, EmitDefaultValue = false)] public int PlayerOrderFactor { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "slowUpdateFactorThreshold", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "slowUpdateFactorThreshold", IsRequired = true, EmitDefaultValue = false)] public int SlowUpdateFactorThreshold { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "viewSegmentLength", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "viewSegmentLength", IsRequired = true, EmitDefaultValue = false)] public int ViewSegmentLength { get; set; } /// @@ -139,8 +139,8 @@ protected APIEventConfig() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); - sb.Append("class APIEventConfig {\n"); + var sb = new StringBuilder(); + sb.Append("class APIConfigEvents {\n"); sb.Append(" DistanceClose: ").Append(DistanceClose).Append("\n"); sb.Append(" DistanceFactor: ").Append(DistanceFactor).Append("\n"); sb.Append(" DistanceFar: ").Append(DistanceFar).Append("\n"); @@ -171,20 +171,19 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as APIEventConfig); + return this.Equals(input as APIConfigEvents); } /// - /// Returns true if APIEventConfig instances are equal + /// Returns true if APIConfigEvents instances are equal /// - /// Instance of APIEventConfig to be compared + /// Instance of APIConfigEvents to be compared /// Boolean - public bool Equals(APIEventConfig input) + public bool Equals(APIConfigEvents input) { if (input == null) - { return false; - } + return ( this.DistanceClose == input.DistanceClose || @@ -237,16 +236,16 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.DistanceClose.GetHashCode(); - hashCode = (hashCode * 59) + this.DistanceFactor.GetHashCode(); - hashCode = (hashCode * 59) + this.DistanceFar.GetHashCode(); - hashCode = (hashCode * 59) + this.GroupDistance.GetHashCode(); - hashCode = (hashCode * 59) + this.MaximumBunchSize.GetHashCode(); - hashCode = (hashCode * 59) + this.NotVisibleFactor.GetHashCode(); - hashCode = (hashCode * 59) + this.PlayerOrderBucketSize.GetHashCode(); - hashCode = (hashCode * 59) + this.PlayerOrderFactor.GetHashCode(); - hashCode = (hashCode * 59) + this.SlowUpdateFactorThreshold.GetHashCode(); - hashCode = (hashCode * 59) + this.ViewSegmentLength.GetHashCode(); + hashCode = hashCode * 59 + this.DistanceClose.GetHashCode(); + hashCode = hashCode * 59 + this.DistanceFactor.GetHashCode(); + hashCode = hashCode * 59 + this.DistanceFar.GetHashCode(); + hashCode = hashCode * 59 + this.GroupDistance.GetHashCode(); + hashCode = hashCode * 59 + this.MaximumBunchSize.GetHashCode(); + hashCode = hashCode * 59 + this.NotVisibleFactor.GetHashCode(); + hashCode = hashCode * 59 + this.PlayerOrderBucketSize.GetHashCode(); + hashCode = hashCode * 59 + this.PlayerOrderFactor.GetHashCode(); + hashCode = hashCode * 59 + this.SlowUpdateFactorThreshold.GetHashCode(); + hashCode = hashCode * 59 + this.ViewSegmentLength.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/APIHealth.cs b/src/VRChat.API/Model/APIHealth.cs index a4afb5e6..3a26f036 100644 --- a/src/VRChat.API/Model/APIHealth.cs +++ b/src/VRChat.API/Model/APIHealth.cs @@ -46,14 +46,12 @@ protected APIHealth() { } { this.Ok = ok; // to ensure "serverName" is required (not null) - if (serverName == null) - { + if (serverName == null) { throw new ArgumentNullException("serverName is a required property for APIHealth and cannot be null"); } this.ServerName = serverName; // to ensure "buildVersionTag" is required (not null) - if (buildVersionTag == null) - { + if (buildVersionTag == null) { throw new ArgumentNullException("buildVersionTag is a required property for APIHealth and cannot be null"); } this.BuildVersionTag = buildVersionTag; @@ -68,13 +66,13 @@ protected APIHealth() { } /// /// Gets or Sets ServerName /// - [DataMember(Name = "serverName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "serverName", IsRequired = true, EmitDefaultValue = false)] public string ServerName { get; set; } /// /// Gets or Sets BuildVersionTag /// - [DataMember(Name = "buildVersionTag", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "buildVersionTag", IsRequired = true, EmitDefaultValue = false)] public string BuildVersionTag { get; set; } /// @@ -83,7 +81,7 @@ protected APIHealth() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class APIHealth {\n"); sb.Append(" Ok: ").Append(Ok).Append("\n"); sb.Append(" ServerName: ").Append(ServerName).Append("\n"); @@ -119,9 +117,8 @@ public override bool Equals(object input) public bool Equals(APIHealth input) { if (input == null) - { return false; - } + return ( this.Ok == input.Ok || @@ -148,15 +145,11 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Ok.GetHashCode(); + hashCode = hashCode * 59 + this.Ok.GetHashCode(); if (this.ServerName != null) - { - hashCode = (hashCode * 59) + this.ServerName.GetHashCode(); - } + hashCode = hashCode * 59 + this.ServerName.GetHashCode(); if (this.BuildVersionTag != null) - { - hashCode = (hashCode * 59) + this.BuildVersionTag.GetHashCode(); - } + hashCode = hashCode * 59 + this.BuildVersionTag.GetHashCode(); return hashCode; } } @@ -169,13 +162,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // ServerName (string) minLength - if (this.ServerName != null && this.ServerName.Length < 1) + if(this.ServerName != null && this.ServerName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ServerName, length must be greater than 1.", new [] { "ServerName" }); } // BuildVersionTag (string) minLength - if (this.BuildVersionTag != null && this.BuildVersionTag.Length < 1) + if(this.BuildVersionTag != null && this.BuildVersionTag.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BuildVersionTag, length must be greater than 1.", new [] { "BuildVersionTag" }); } diff --git a/src/VRChat.API/Model/AddFavoriteRequest.cs b/src/VRChat.API/Model/AddFavoriteRequest.cs index 41d935b2..4d584efa 100644 --- a/src/VRChat.API/Model/AddFavoriteRequest.cs +++ b/src/VRChat.API/Model/AddFavoriteRequest.cs @@ -35,7 +35,7 @@ public partial class AddFavoriteRequest : IEquatable, IValid /// /// Gets or Sets Type /// - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] public FavoriteType Type { get; set; } /// /// Initializes a new instance of the class. @@ -52,14 +52,12 @@ protected AddFavoriteRequest() { } { this.Type = type; // to ensure "favoriteId" is required (not null) - if (favoriteId == null) - { + if (favoriteId == null) { throw new ArgumentNullException("favoriteId is a required property for AddFavoriteRequest and cannot be null"); } this.FavoriteId = favoriteId; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for AddFavoriteRequest and cannot be null"); } this.Tags = tags; @@ -69,14 +67,14 @@ protected AddFavoriteRequest() { } /// Must be either AvatarID, WorldID or UserID. /// /// Must be either AvatarID, WorldID or UserID. - [DataMember(Name = "favoriteId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "favoriteId", IsRequired = true, EmitDefaultValue = false)] public string FavoriteId { get; set; } /// /// 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. /// /// 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. - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// @@ -85,7 +83,7 @@ protected AddFavoriteRequest() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class AddFavoriteRequest {\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" FavoriteId: ").Append(FavoriteId).Append("\n"); @@ -121,9 +119,8 @@ public override bool Equals(object input) public bool Equals(AddFavoriteRequest input) { if (input == null) - { return false; - } + return ( this.Type == input.Type || @@ -151,15 +148,11 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = hashCode * 59 + this.Type.GetHashCode(); if (this.FavoriteId != null) - { - hashCode = (hashCode * 59) + this.FavoriteId.GetHashCode(); - } + hashCode = hashCode * 59 + this.FavoriteId.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/AddGroupGalleryImageRequest.cs b/src/VRChat.API/Model/AddGroupGalleryImageRequest.cs new file mode 100644 index 00000000..9e8cff70 --- /dev/null +++ b/src/VRChat.API/Model/AddGroupGalleryImageRequest.cs @@ -0,0 +1,141 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// AddGroupGalleryImageRequest + /// + [DataContract(Name = "AddGroupGalleryImageRequest")] + public partial class AddGroupGalleryImageRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AddGroupGalleryImageRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// fileId (required). + public AddGroupGalleryImageRequest(string fileId = default(string)) + { + // to ensure "fileId" is required (not null) + if (fileId == null) { + throw new ArgumentNullException("fileId is a required property for AddGroupGalleryImageRequest and cannot be null"); + } + this.FileId = fileId; + } + + /// + /// Gets or Sets FileId + /// + [DataMember(Name = "fileId", IsRequired = true, EmitDefaultValue = false)] + public string FileId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AddGroupGalleryImageRequest {\n"); + sb.Append(" FileId: ").Append(FileId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AddGroupGalleryImageRequest); + } + + /// + /// Returns true if AddGroupGalleryImageRequest instances are equal + /// + /// Instance of AddGroupGalleryImageRequest to be compared + /// Boolean + public bool Equals(AddGroupGalleryImageRequest input) + { + if (input == null) + return false; + + return + ( + this.FileId == input.FileId || + (this.FileId != null && + this.FileId.Equals(input.FileId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.FileId != null) + hashCode = hashCode * 59 + this.FileId.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // FileId (string) pattern + Regex regexFileId = new Regex(@"file_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexFileId.Match(this.FileId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FileId, must match a pattern of " + regexFileId, new [] { "FileId" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/Avatar.cs b/src/VRChat.API/Model/Avatar.cs index 0cfccf40..3ef12421 100644 --- a/src/VRChat.API/Model/Avatar.cs +++ b/src/VRChat.API/Model/Avatar.cs @@ -35,7 +35,7 @@ public partial class Avatar : IEquatable, IValidatableObject /// /// Gets or Sets ReleaseStatus /// - [DataMember(Name = "releaseStatus", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "releaseStatus", IsRequired = true, EmitDefaultValue = false)] public ReleaseStatus ReleaseStatus { get; set; } /// /// Initializes a new instance of the class. @@ -56,7 +56,7 @@ protected Avatar() { } /// imageUrl (required). /// name (required). /// releaseStatus (required). - /// (required). + /// tags (required). /// thumbnailImageUrl (required). /// unityPackageUrl (required). /// unityPackageUrlObject (required). @@ -66,71 +66,60 @@ protected Avatar() { } public Avatar(string assetUrl = default(string), Object assetUrlObject = default(Object), string authorId = default(string), string authorName = default(string), DateTime createdAt = default(DateTime), string description = default(string), bool featured = false, string id = default(string), string imageUrl = default(string), string name = default(string), ReleaseStatus releaseStatus = default(ReleaseStatus), List tags = default(List), string thumbnailImageUrl = default(string), string unityPackageUrl = default(string), AvatarUnityPackageUrlObject unityPackageUrlObject = default(AvatarUnityPackageUrlObject), List unityPackages = default(List), DateTime updatedAt = default(DateTime), int version = 0) { // to ensure "authorId" is required (not null) - if (authorId == null) - { + if (authorId == null) { throw new ArgumentNullException("authorId is a required property for Avatar and cannot be null"); } this.AuthorId = authorId; // to ensure "authorName" is required (not null) - if (authorName == null) - { + if (authorName == null) { throw new ArgumentNullException("authorName is a required property for Avatar and cannot be null"); } this.AuthorName = authorName; this.CreatedAt = createdAt; // to ensure "description" is required (not null) - if (description == null) - { + if (description == null) { throw new ArgumentNullException("description is a required property for Avatar and cannot be null"); } this.Description = description; this.Featured = featured; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for Avatar and cannot be null"); } this.Id = id; // to ensure "imageUrl" is required (not null) - if (imageUrl == null) - { + if (imageUrl == null) { throw new ArgumentNullException("imageUrl is a required property for Avatar and cannot be null"); } this.ImageUrl = imageUrl; // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for Avatar and cannot be null"); } this.Name = name; this.ReleaseStatus = releaseStatus; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for Avatar and cannot be null"); } this.Tags = tags; // to ensure "thumbnailImageUrl" is required (not null) - if (thumbnailImageUrl == null) - { + if (thumbnailImageUrl == null) { throw new ArgumentNullException("thumbnailImageUrl is a required property for Avatar and cannot be null"); } this.ThumbnailImageUrl = thumbnailImageUrl; // to ensure "unityPackageUrl" is required (not null) - if (unityPackageUrl == null) - { + if (unityPackageUrl == null) { throw new ArgumentNullException("unityPackageUrl is a required property for Avatar and cannot be null"); } this.UnityPackageUrl = unityPackageUrl; // to ensure "unityPackageUrlObject" is required (not null) - if (unityPackageUrlObject == null) - { + if (unityPackageUrlObject == null) { throw new ArgumentNullException("unityPackageUrlObject is a required property for Avatar and cannot be null"); } this.UnityPackageUrlObject = unityPackageUrlObject; // to ensure "unityPackages" is required (not null) - if (unityPackages == null) - { + if (unityPackages == null) { throw new ArgumentNullException("unityPackages is a required property for Avatar and cannot be null"); } this.UnityPackages = unityPackages; @@ -158,25 +147,25 @@ protected Avatar() { } /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "authorId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "authorId", IsRequired = true, EmitDefaultValue = false)] public string AuthorId { get; set; } /// /// Gets or Sets AuthorName /// - [DataMember(Name = "authorName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "authorName", IsRequired = true, EmitDefaultValue = false)] public string AuthorName { get; set; } /// /// Gets or Sets CreatedAt /// - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] public DateTime CreatedAt { get; set; } /// /// Gets or Sets Description /// - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = false)] public string Description { get; set; } /// @@ -188,63 +177,62 @@ protected Avatar() { } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets ImageUrl /// - [DataMember(Name = "imageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "imageUrl", IsRequired = true, EmitDefaultValue = false)] public string ImageUrl { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// - /// + /// Gets or Sets Tags /// - /// - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// /// Gets or Sets ThumbnailImageUrl /// - [DataMember(Name = "thumbnailImageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "thumbnailImageUrl", IsRequired = true, EmitDefaultValue = false)] public string ThumbnailImageUrl { get; set; } /// /// Gets or Sets UnityPackageUrl /// - [DataMember(Name = "unityPackageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "unityPackageUrl", IsRequired = true, EmitDefaultValue = false)] public string UnityPackageUrl { get; set; } /// /// Gets or Sets UnityPackageUrlObject /// - [DataMember(Name = "unityPackageUrlObject", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "unityPackageUrlObject", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public AvatarUnityPackageUrlObject UnityPackageUrlObject { get; set; } /// /// Gets or Sets UnityPackages /// - [DataMember(Name = "unityPackages", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "unityPackages", IsRequired = true, EmitDefaultValue = false)] public List UnityPackages { get; set; } /// /// Gets or Sets UpdatedAt /// - [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } /// /// Gets or Sets _Version /// - [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = false)] public int _Version { get; set; } /// @@ -253,7 +241,7 @@ protected Avatar() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class Avatar {\n"); sb.Append(" AssetUrl: ").Append(AssetUrl).Append("\n"); sb.Append(" AssetUrlObject: ").Append(AssetUrlObject).Append("\n"); @@ -304,9 +292,8 @@ public override bool Equals(object input) public bool Equals(Avatar input) { if (input == null) - { return false; - } + return ( this.AssetUrl == input.AssetUrl || @@ -409,68 +396,38 @@ public override int GetHashCode() { int hashCode = 41; if (this.AssetUrl != null) - { - hashCode = (hashCode * 59) + this.AssetUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.AssetUrl.GetHashCode(); if (this.AssetUrlObject != null) - { - hashCode = (hashCode * 59) + this.AssetUrlObject.GetHashCode(); - } + hashCode = hashCode * 59 + this.AssetUrlObject.GetHashCode(); if (this.AuthorId != null) - { - hashCode = (hashCode * 59) + this.AuthorId.GetHashCode(); - } + hashCode = hashCode * 59 + this.AuthorId.GetHashCode(); if (this.AuthorName != null) - { - hashCode = (hashCode * 59) + this.AuthorName.GetHashCode(); - } + hashCode = hashCode * 59 + this.AuthorName.GetHashCode(); if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Featured.GetHashCode(); + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.Featured.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.ImageUrl != null) - { - hashCode = (hashCode * 59) + this.ImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReleaseStatus.GetHashCode(); + hashCode = hashCode * 59 + this.Name.GetHashCode(); + hashCode = hashCode * 59 + this.ReleaseStatus.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); if (this.ThumbnailImageUrl != null) - { - hashCode = (hashCode * 59) + this.ThumbnailImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ThumbnailImageUrl.GetHashCode(); if (this.UnityPackageUrl != null) - { - hashCode = (hashCode * 59) + this.UnityPackageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityPackageUrl.GetHashCode(); if (this.UnityPackageUrlObject != null) - { - hashCode = (hashCode * 59) + this.UnityPackageUrlObject.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityPackageUrlObject.GetHashCode(); if (this.UnityPackages != null) - { - hashCode = (hashCode * 59) + this.UnityPackages.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityPackages.GetHashCode(); if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this._Version.GetHashCode(); + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); + hashCode = hashCode * 59 + this._Version.GetHashCode(); return hashCode; } } @@ -483,19 +440,19 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AssetUrl (string) minLength - if (this.AssetUrl != null && this.AssetUrl.Length < 1) + if(this.AssetUrl != null && this.AssetUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AssetUrl, length must be greater than 1.", new [] { "AssetUrl" }); } // AuthorName (string) minLength - if (this.AuthorName != null && this.AuthorName.Length < 1) + if(this.AuthorName != null && this.AuthorName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorName, length must be greater than 1.", new [] { "AuthorName" }); } // Description (string) minLength - if (this.Description != null && this.Description.Length < 0) + if(this.Description != null && this.Description.Length < 0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 0.", new [] { "Description" }); } @@ -508,25 +465,25 @@ public override int GetHashCode() } // ImageUrl (string) minLength - if (this.ImageUrl != null && this.ImageUrl.Length < 1) + if(this.ImageUrl != null && this.ImageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImageUrl, length must be greater than 1.", new [] { "ImageUrl" }); } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // ThumbnailImageUrl (string) minLength - if (this.ThumbnailImageUrl != null && this.ThumbnailImageUrl.Length < 1) + if(this.ThumbnailImageUrl != null && this.ThumbnailImageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThumbnailImageUrl, length must be greater than 1.", new [] { "ThumbnailImageUrl" }); } // _Version (int) minimum - if (this._Version < (int)0) + if(this._Version < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Version, must be a value greater than or equal to 0.", new [] { "_Version" }); } diff --git a/src/VRChat.API/Model/AvatarUnityPackageUrlObject.cs b/src/VRChat.API/Model/AvatarUnityPackageUrlObject.cs index 52171ab9..00eaec12 100644 --- a/src/VRChat.API/Model/AvatarUnityPackageUrlObject.cs +++ b/src/VRChat.API/Model/AvatarUnityPackageUrlObject.cs @@ -52,7 +52,7 @@ public partial class AvatarUnityPackageUrlObject : IEquatableString presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class AvatarUnityPackageUrlObject {\n"); sb.Append(" UnityPackageUrl: ").Append(UnityPackageUrl).Append("\n"); sb.Append("}\n"); @@ -86,9 +86,8 @@ public override bool Equals(object input) public bool Equals(AvatarUnityPackageUrlObject input) { if (input == null) - { return false; - } + return ( this.UnityPackageUrl == input.UnityPackageUrl || @@ -107,9 +106,7 @@ public override int GetHashCode() { int hashCode = 41; if (this.UnityPackageUrl != null) - { - hashCode = (hashCode * 59) + this.UnityPackageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityPackageUrl.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/BanGroupMemberRequest.cs b/src/VRChat.API/Model/BanGroupMemberRequest.cs new file mode 100644 index 00000000..6122fda8 --- /dev/null +++ b/src/VRChat.API/Model/BanGroupMemberRequest.cs @@ -0,0 +1,135 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// BanGroupMemberRequest + /// + [DataContract(Name = "BanGroupMemberRequest")] + public partial class BanGroupMemberRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BanGroupMemberRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. (required). + public BanGroupMemberRequest(string userId = default(string)) + { + // to ensure "userId" is required (not null) + if (userId == null) { + throw new ArgumentNullException("userId is a required property for BanGroupMemberRequest and cannot be null"); + } + this.UserId = userId; + } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = false)] + public string UserId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BanGroupMemberRequest {\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BanGroupMemberRequest); + } + + /// + /// Returns true if BanGroupMemberRequest instances are equal + /// + /// Instance of BanGroupMemberRequest to be compared + /// Boolean + public bool Equals(BanGroupMemberRequest input) + { + if (input == null) + return false; + + return + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/CreateAvatarRequest.cs b/src/VRChat.API/Model/CreateAvatarRequest.cs index e7735a18..99e89c54 100644 --- a/src/VRChat.API/Model/CreateAvatarRequest.cs +++ b/src/VRChat.API/Model/CreateAvatarRequest.cs @@ -49,7 +49,7 @@ protected CreateAvatarRequest() { } /// id. /// name (required). /// description. - /// . + /// tags. /// imageUrl (required). /// releaseStatus. /// version (default to 1M). @@ -57,14 +57,12 @@ protected CreateAvatarRequest() { } public CreateAvatarRequest(string assetUrl = default(string), string id = default(string), string name = default(string), string description = default(string), List tags = default(List), string imageUrl = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), decimal version = 1M, string unityPackageUrl = default(string)) { // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for CreateAvatarRequest and cannot be null"); } this.Name = name; // to ensure "imageUrl" is required (not null) - if (imageUrl == null) - { + if (imageUrl == null) { throw new ArgumentNullException("imageUrl is a required property for CreateAvatarRequest and cannot be null"); } this.ImageUrl = imageUrl; @@ -92,7 +90,7 @@ protected CreateAvatarRequest() { } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// @@ -102,16 +100,15 @@ protected CreateAvatarRequest() { } public string Description { get; set; } /// - /// + /// Gets or Sets Tags /// - /// [DataMember(Name = "tags", EmitDefaultValue = false)] public List Tags { get; set; } /// /// Gets or Sets ImageUrl /// - [DataMember(Name = "imageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "imageUrl", IsRequired = true, EmitDefaultValue = false)] public string ImageUrl { get; set; } /// @@ -132,7 +129,7 @@ protected CreateAvatarRequest() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class CreateAvatarRequest {\n"); sb.Append(" AssetUrl: ").Append(AssetUrl).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); @@ -174,9 +171,8 @@ public override bool Equals(object input) public bool Equals(CreateAvatarRequest input) { if (input == null) - { return false; - } + return ( this.AssetUrl == input.AssetUrl || @@ -234,35 +230,21 @@ public override int GetHashCode() { int hashCode = 41; if (this.AssetUrl != null) - { - hashCode = (hashCode * 59) + this.AssetUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.AssetUrl.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } + hashCode = hashCode * 59 + this.Description.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); if (this.ImageUrl != null) - { - hashCode = (hashCode * 59) + this.ImageUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReleaseStatus.GetHashCode(); - hashCode = (hashCode * 59) + this._Version.GetHashCode(); + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); + hashCode = hashCode * 59 + this.ReleaseStatus.GetHashCode(); + hashCode = hashCode * 59 + this._Version.GetHashCode(); if (this.UnityPackageUrl != null) - { - hashCode = (hashCode * 59) + this.UnityPackageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityPackageUrl.GetHashCode(); return hashCode; } } @@ -282,25 +264,25 @@ public override int GetHashCode() } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // Description (string) minLength - if (this.Description != null && this.Description.Length < 1) + if(this.Description != null && this.Description.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); } // ImageUrl (string) minLength - if (this.ImageUrl != null && this.ImageUrl.Length < 1) + if(this.ImageUrl != null && this.ImageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImageUrl, length must be greater than 1.", new [] { "ImageUrl" }); } // _Version (decimal) minimum - if (this._Version < (decimal)0) + if(this._Version < (decimal)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Version, must be a value greater than or equal to 0.", new [] { "_Version" }); } diff --git a/src/VRChat.API/Model/CreateFileRequest.cs b/src/VRChat.API/Model/CreateFileRequest.cs index 04838ce4..e175dc68 100644 --- a/src/VRChat.API/Model/CreateFileRequest.cs +++ b/src/VRChat.API/Model/CreateFileRequest.cs @@ -35,7 +35,7 @@ public partial class CreateFileRequest : IEquatable, IValidat /// /// Gets or Sets MimeType /// - [DataMember(Name = "mimeType", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "mimeType", IsRequired = true, EmitDefaultValue = false)] public MIMEType MimeType { get; set; } /// /// Initializes a new instance of the class. @@ -48,19 +48,17 @@ protected CreateFileRequest() { } /// name (required). /// mimeType (required). /// extension (required). - /// . + /// tags. public CreateFileRequest(string name = default(string), MIMEType mimeType = default(MIMEType), string extension = default(string), List tags = default(List)) { // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for CreateFileRequest and cannot be null"); } this.Name = name; this.MimeType = mimeType; // to ensure "extension" is required (not null) - if (extension == null) - { + if (extension == null) { throw new ArgumentNullException("extension is a required property for CreateFileRequest and cannot be null"); } this.Extension = extension; @@ -70,19 +68,18 @@ protected CreateFileRequest() { } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// /// Gets or Sets Extension /// - [DataMember(Name = "extension", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "extension", IsRequired = true, EmitDefaultValue = false)] public string Extension { get; set; } /// - /// + /// Gets or Sets Tags /// - /// [DataMember(Name = "tags", EmitDefaultValue = false)] public List Tags { get; set; } @@ -92,7 +89,7 @@ protected CreateFileRequest() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class CreateFileRequest {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" MimeType: ").Append(MimeType).Append("\n"); @@ -129,9 +126,8 @@ public override bool Equals(object input) public bool Equals(CreateFileRequest input) { if (input == null) - { return false; - } + return ( this.Name == input.Name || @@ -165,18 +161,12 @@ public override int GetHashCode() { int hashCode = 41; if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MimeType.GetHashCode(); + hashCode = hashCode * 59 + this.Name.GetHashCode(); + hashCode = hashCode * 59 + this.MimeType.GetHashCode(); if (this.Extension != null) - { - hashCode = (hashCode * 59) + this.Extension.GetHashCode(); - } + hashCode = hashCode * 59 + this.Extension.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); return hashCode; } } @@ -189,13 +179,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Name (string) minLength - if (this.Name != null && this.Name.Length < 0) + if(this.Name != null && this.Name.Length < 0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 0.", new [] { "Name" }); } // Extension (string) minLength - if (this.Extension != null && this.Extension.Length < 1) + if(this.Extension != null && this.Extension.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Extension, length must be greater than 1.", new [] { "Extension" }); } diff --git a/src/VRChat.API/Model/CreateFileVersionRequest.cs b/src/VRChat.API/Model/CreateFileVersionRequest.cs index 9bde449e..f53bdf8f 100644 --- a/src/VRChat.API/Model/CreateFileVersionRequest.cs +++ b/src/VRChat.API/Model/CreateFileVersionRequest.cs @@ -46,8 +46,7 @@ protected CreateFileVersionRequest() { } public CreateFileVersionRequest(string signatureMd5 = default(string), decimal signatureSizeInBytes = default(decimal), string fileMd5 = default(string), decimal fileSizeInBytes = default(decimal)) { // to ensure "signatureMd5" is required (not null) - if (signatureMd5 == null) - { + if (signatureMd5 == null) { throw new ArgumentNullException("signatureMd5 is a required property for CreateFileVersionRequest and cannot be null"); } this.SignatureMd5 = signatureMd5; @@ -59,13 +58,13 @@ protected CreateFileVersionRequest() { } /// /// Gets or Sets SignatureMd5 /// - [DataMember(Name = "signatureMd5", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "signatureMd5", IsRequired = true, EmitDefaultValue = false)] public string SignatureMd5 { get; set; } /// /// Gets or Sets SignatureSizeInBytes /// - [DataMember(Name = "signatureSizeInBytes", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "signatureSizeInBytes", IsRequired = true, EmitDefaultValue = false)] public decimal SignatureSizeInBytes { get; set; } /// @@ -86,7 +85,7 @@ protected CreateFileVersionRequest() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class CreateFileVersionRequest {\n"); sb.Append(" SignatureMd5: ").Append(SignatureMd5).Append("\n"); sb.Append(" SignatureSizeInBytes: ").Append(SignatureSizeInBytes).Append("\n"); @@ -123,9 +122,8 @@ public override bool Equals(object input) public bool Equals(CreateFileVersionRequest input) { if (input == null) - { return false; - } + return ( this.SignatureMd5 == input.SignatureMd5 || @@ -157,15 +155,11 @@ public override int GetHashCode() { int hashCode = 41; if (this.SignatureMd5 != null) - { - hashCode = (hashCode * 59) + this.SignatureMd5.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SignatureSizeInBytes.GetHashCode(); + hashCode = hashCode * 59 + this.SignatureMd5.GetHashCode(); + hashCode = hashCode * 59 + this.SignatureSizeInBytes.GetHashCode(); if (this.FileMd5 != null) - { - hashCode = (hashCode * 59) + this.FileMd5.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FileSizeInBytes.GetHashCode(); + hashCode = hashCode * 59 + this.FileMd5.GetHashCode(); + hashCode = hashCode * 59 + this.FileSizeInBytes.GetHashCode(); return hashCode; } } @@ -178,13 +172,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // SignatureMd5 (string) minLength - if (this.SignatureMd5 != null && this.SignatureMd5.Length < 1) + if(this.SignatureMd5 != null && this.SignatureMd5.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SignatureMd5, length must be greater than 1.", new [] { "SignatureMd5" }); } // FileMd5 (string) minLength - if (this.FileMd5 != null && this.FileMd5.Length < 1) + if(this.FileMd5 != null && this.FileMd5.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FileMd5, length must be greater than 1.", new [] { "FileMd5" }); } diff --git a/src/VRChat.API/Model/CreateGroupAnnouncementRequest.cs b/src/VRChat.API/Model/CreateGroupAnnouncementRequest.cs new file mode 100644 index 00000000..e4fe6715 --- /dev/null +++ b/src/VRChat.API/Model/CreateGroupAnnouncementRequest.cs @@ -0,0 +1,202 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// CreateGroupAnnouncementRequest + /// + [DataContract(Name = "CreateGroupAnnouncementRequest")] + public partial class CreateGroupAnnouncementRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateGroupAnnouncementRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Announcement title (required). + /// Announcement text. + /// imageId. + /// Send notification to group members. (default to false). + public CreateGroupAnnouncementRequest(string title = default(string), string text = default(string), string imageId = default(string), bool sendNotification = false) + { + // to ensure "title" is required (not null) + if (title == null) { + throw new ArgumentNullException("title is a required property for CreateGroupAnnouncementRequest and cannot be null"); + } + this.Title = title; + this.Text = text; + this.ImageId = imageId; + this.SendNotification = sendNotification; + } + + /// + /// Announcement title + /// + /// Announcement title + [DataMember(Name = "title", IsRequired = true, EmitDefaultValue = false)] + public string Title { get; set; } + + /// + /// Announcement text + /// + /// Announcement text + [DataMember(Name = "text", EmitDefaultValue = false)] + public string Text { get; set; } + + /// + /// Gets or Sets ImageId + /// + [DataMember(Name = "imageId", EmitDefaultValue = false)] + public string ImageId { get; set; } + + /// + /// Send notification to group members. + /// + /// Send notification to group members. + [DataMember(Name = "sendNotification", EmitDefaultValue = true)] + public bool SendNotification { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateGroupAnnouncementRequest {\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" ImageId: ").Append(ImageId).Append("\n"); + sb.Append(" SendNotification: ").Append(SendNotification).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateGroupAnnouncementRequest); + } + + /// + /// Returns true if CreateGroupAnnouncementRequest instances are equal + /// + /// Instance of CreateGroupAnnouncementRequest to be compared + /// Boolean + public bool Equals(CreateGroupAnnouncementRequest input) + { + if (input == null) + return false; + + return + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.Text == input.Text || + (this.Text != null && + this.Text.Equals(input.Text)) + ) && + ( + this.ImageId == input.ImageId || + (this.ImageId != null && + this.ImageId.Equals(input.ImageId)) + ) && + ( + this.SendNotification == input.SendNotification || + this.SendNotification.Equals(input.SendNotification) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Title != null) + hashCode = hashCode * 59 + this.Title.GetHashCode(); + if (this.Text != null) + hashCode = hashCode * 59 + this.Text.GetHashCode(); + if (this.ImageId != null) + hashCode = hashCode * 59 + this.ImageId.GetHashCode(); + hashCode = hashCode * 59 + this.SendNotification.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Title (string) minLength + if(this.Title != null && this.Title.Length < 1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Title, length must be greater than 1.", new [] { "Title" }); + } + + // Text (string) minLength + if(this.Text != null && this.Text.Length < 1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Text, length must be greater than 1.", new [] { "Text" }); + } + + // ImageId (string) pattern + Regex regexImageId = new Regex(@"file_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexImageId.Match(this.ImageId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImageId, must match a pattern of " + regexImageId, new [] { "ImageId" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/CreateGroupGalleryRequest.cs b/src/VRChat.API/Model/CreateGroupGalleryRequest.cs new file mode 100644 index 00000000..cebae2b1 --- /dev/null +++ b/src/VRChat.API/Model/CreateGroupGalleryRequest.cs @@ -0,0 +1,247 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// CreateGroupGalleryRequest + /// + [DataContract(Name = "CreateGroupGalleryRequest")] + public partial class CreateGroupGalleryRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateGroupGalleryRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of the gallery. (required). + /// Description of the gallery.. + /// Whether the gallery is members only. (default to false). + /// roleIdsToView. + /// roleIdsToSubmit. + /// roleIdsToAutoApprove. + /// roleIdsToManage. + public CreateGroupGalleryRequest(string name = default(string), string description = default(string), bool membersOnly = false, List roleIdsToView = default(List), List roleIdsToSubmit = default(List), List roleIdsToAutoApprove = default(List), List roleIdsToManage = default(List)) + { + // to ensure "name" is required (not null) + if (name == null) { + throw new ArgumentNullException("name is a required property for CreateGroupGalleryRequest and cannot be null"); + } + this.Name = name; + this.Description = description; + this.MembersOnly = membersOnly; + this.RoleIdsToView = roleIdsToView; + this.RoleIdsToSubmit = roleIdsToSubmit; + this.RoleIdsToAutoApprove = roleIdsToAutoApprove; + this.RoleIdsToManage = roleIdsToManage; + } + + /// + /// Name of the gallery. + /// + /// Name of the gallery. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Description of the gallery. + /// + /// Description of the gallery. + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Whether the gallery is members only. + /// + /// Whether the gallery is members only. + [DataMember(Name = "membersOnly", EmitDefaultValue = true)] + public bool MembersOnly { get; set; } + + /// + /// Gets or Sets RoleIdsToView + /// + [DataMember(Name = "roleIdsToView", EmitDefaultValue = true)] + public List RoleIdsToView { get; set; } + + /// + /// Gets or Sets RoleIdsToSubmit + /// + [DataMember(Name = "roleIdsToSubmit", EmitDefaultValue = true)] + public List RoleIdsToSubmit { get; set; } + + /// + /// Gets or Sets RoleIdsToAutoApprove + /// + [DataMember(Name = "roleIdsToAutoApprove", EmitDefaultValue = true)] + public List RoleIdsToAutoApprove { get; set; } + + /// + /// Gets or Sets RoleIdsToManage + /// + [DataMember(Name = "roleIdsToManage", EmitDefaultValue = true)] + public List RoleIdsToManage { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateGroupGalleryRequest {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" MembersOnly: ").Append(MembersOnly).Append("\n"); + sb.Append(" RoleIdsToView: ").Append(RoleIdsToView).Append("\n"); + sb.Append(" RoleIdsToSubmit: ").Append(RoleIdsToSubmit).Append("\n"); + sb.Append(" RoleIdsToAutoApprove: ").Append(RoleIdsToAutoApprove).Append("\n"); + sb.Append(" RoleIdsToManage: ").Append(RoleIdsToManage).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateGroupGalleryRequest); + } + + /// + /// Returns true if CreateGroupGalleryRequest instances are equal + /// + /// Instance of CreateGroupGalleryRequest to be compared + /// Boolean + public bool Equals(CreateGroupGalleryRequest input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.MembersOnly == input.MembersOnly || + this.MembersOnly.Equals(input.MembersOnly) + ) && + ( + this.RoleIdsToView == input.RoleIdsToView || + this.RoleIdsToView != null && + input.RoleIdsToView != null && + this.RoleIdsToView.SequenceEqual(input.RoleIdsToView) + ) && + ( + this.RoleIdsToSubmit == input.RoleIdsToSubmit || + this.RoleIdsToSubmit != null && + input.RoleIdsToSubmit != null && + this.RoleIdsToSubmit.SequenceEqual(input.RoleIdsToSubmit) + ) && + ( + this.RoleIdsToAutoApprove == input.RoleIdsToAutoApprove || + this.RoleIdsToAutoApprove != null && + input.RoleIdsToAutoApprove != null && + this.RoleIdsToAutoApprove.SequenceEqual(input.RoleIdsToAutoApprove) + ) && + ( + this.RoleIdsToManage == input.RoleIdsToManage || + this.RoleIdsToManage != null && + input.RoleIdsToManage != null && + this.RoleIdsToManage.SequenceEqual(input.RoleIdsToManage) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.MembersOnly.GetHashCode(); + if (this.RoleIdsToView != null) + hashCode = hashCode * 59 + this.RoleIdsToView.GetHashCode(); + if (this.RoleIdsToSubmit != null) + hashCode = hashCode * 59 + this.RoleIdsToSubmit.GetHashCode(); + if (this.RoleIdsToAutoApprove != null) + hashCode = hashCode * 59 + this.RoleIdsToAutoApprove.GetHashCode(); + if (this.RoleIdsToManage != null) + hashCode = hashCode * 59 + this.RoleIdsToManage.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Name (string) minLength + if(this.Name != null && this.Name.Length < 1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); + } + + // Description (string) minLength + if(this.Description != null && this.Description.Length < 0) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 0.", new [] { "Description" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/CreateGroupInviteRequest.cs b/src/VRChat.API/Model/CreateGroupInviteRequest.cs new file mode 100644 index 00000000..2e66c58d --- /dev/null +++ b/src/VRChat.API/Model/CreateGroupInviteRequest.cs @@ -0,0 +1,149 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// CreateGroupInviteRequest + /// + [DataContract(Name = "CreateGroupInviteRequest")] + public partial class CreateGroupInviteRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateGroupInviteRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. (required). + /// confirmOverrideBlock (default to true). + public CreateGroupInviteRequest(string userId = default(string), bool confirmOverrideBlock = true) + { + // to ensure "userId" is required (not null) + if (userId == null) { + throw new ArgumentNullException("userId is a required property for CreateGroupInviteRequest and cannot be null"); + } + this.UserId = userId; + this.ConfirmOverrideBlock = confirmOverrideBlock; + } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = false)] + public string UserId { get; set; } + + /// + /// Gets or Sets ConfirmOverrideBlock + /// + [DataMember(Name = "confirmOverrideBlock", EmitDefaultValue = true)] + public bool ConfirmOverrideBlock { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateGroupInviteRequest {\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" ConfirmOverrideBlock: ").Append(ConfirmOverrideBlock).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateGroupInviteRequest); + } + + /// + /// Returns true if CreateGroupInviteRequest instances are equal + /// + /// Instance of CreateGroupInviteRequest to be compared + /// Boolean + public bool Equals(CreateGroupInviteRequest input) + { + if (input == null) + return false; + + return + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.ConfirmOverrideBlock == input.ConfirmOverrideBlock || + this.ConfirmOverrideBlock.Equals(input.ConfirmOverrideBlock) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + hashCode = hashCode * 59 + this.ConfirmOverrideBlock.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/CreateGroupRequest.cs b/src/VRChat.API/Model/CreateGroupRequest.cs new file mode 100644 index 00000000..c8a3980e --- /dev/null +++ b/src/VRChat.API/Model/CreateGroupRequest.cs @@ -0,0 +1,282 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// CreateGroupRequest + /// + [DataContract(Name = "CreateGroupRequest")] + public partial class CreateGroupRequest : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets JoinState + /// + [DataMember(Name = "joinState", EmitDefaultValue = false)] + public GroupJoinState? JoinState { get; set; } + + /// + /// Gets or Sets Privacy + /// + [DataMember(Name = "privacy", EmitDefaultValue = false)] + public GroupPrivacy? Privacy { get; set; } + + /// + /// Gets or Sets RoleTemplate + /// + [DataMember(Name = "roleTemplate", IsRequired = true, EmitDefaultValue = false)] + public GroupRoleTemplate RoleTemplate { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateGroupRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// name (required). + /// shortCode (required). + /// description. + /// joinState. + /// iconId (default to "null"). + /// bannerId (default to "null"). + /// privacy. + /// roleTemplate (required). + public CreateGroupRequest(string name = default(string), string shortCode = default(string), string description = default(string), GroupJoinState? joinState = default(GroupJoinState?), string iconId = "null", string bannerId = "null", GroupPrivacy? privacy = default(GroupPrivacy?), GroupRoleTemplate roleTemplate = default(GroupRoleTemplate)) + { + // to ensure "name" is required (not null) + if (name == null) { + throw new ArgumentNullException("name is a required property for CreateGroupRequest and cannot be null"); + } + this.Name = name; + // to ensure "shortCode" is required (not null) + if (shortCode == null) { + throw new ArgumentNullException("shortCode is a required property for CreateGroupRequest and cannot be null"); + } + this.ShortCode = shortCode; + this.RoleTemplate = roleTemplate; + this.Description = description; + this.JoinState = joinState; + // use default value if no "iconId" provided + this.IconId = iconId ?? "null"; + // use default value if no "bannerId" provided + this.BannerId = bannerId ?? "null"; + this.Privacy = privacy; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets ShortCode + /// + [DataMember(Name = "shortCode", IsRequired = true, EmitDefaultValue = false)] + public string ShortCode { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Gets or Sets IconId + /// + [DataMember(Name = "iconId", EmitDefaultValue = true)] + public string IconId { get; set; } + + /// + /// Gets or Sets BannerId + /// + [DataMember(Name = "bannerId", EmitDefaultValue = true)] + public string BannerId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateGroupRequest {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" ShortCode: ").Append(ShortCode).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" JoinState: ").Append(JoinState).Append("\n"); + sb.Append(" IconId: ").Append(IconId).Append("\n"); + sb.Append(" BannerId: ").Append(BannerId).Append("\n"); + sb.Append(" Privacy: ").Append(Privacy).Append("\n"); + sb.Append(" RoleTemplate: ").Append(RoleTemplate).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateGroupRequest); + } + + /// + /// Returns true if CreateGroupRequest instances are equal + /// + /// Instance of CreateGroupRequest to be compared + /// Boolean + public bool Equals(CreateGroupRequest input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.ShortCode == input.ShortCode || + (this.ShortCode != null && + this.ShortCode.Equals(input.ShortCode)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.JoinState == input.JoinState || + this.JoinState.Equals(input.JoinState) + ) && + ( + this.IconId == input.IconId || + (this.IconId != null && + this.IconId.Equals(input.IconId)) + ) && + ( + this.BannerId == input.BannerId || + (this.BannerId != null && + this.BannerId.Equals(input.BannerId)) + ) && + ( + this.Privacy == input.Privacy || + this.Privacy.Equals(input.Privacy) + ) && + ( + this.RoleTemplate == input.RoleTemplate || + this.RoleTemplate.Equals(input.RoleTemplate) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.ShortCode != null) + hashCode = hashCode * 59 + this.ShortCode.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.JoinState.GetHashCode(); + if (this.IconId != null) + hashCode = hashCode * 59 + this.IconId.GetHashCode(); + if (this.BannerId != null) + hashCode = hashCode * 59 + this.BannerId.GetHashCode(); + hashCode = hashCode * 59 + this.Privacy.GetHashCode(); + hashCode = hashCode * 59 + this.RoleTemplate.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Name (string) maxLength + if(this.Name != null && this.Name.Length > 64) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be less than 64.", new [] { "Name" }); + } + + // Name (string) minLength + if(this.Name != null && this.Name.Length < 3) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 3.", new [] { "Name" }); + } + + // ShortCode (string) maxLength + if(this.ShortCode != null && this.ShortCode.Length > 6) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShortCode, length must be less than 6.", new [] { "ShortCode" }); + } + + // ShortCode (string) minLength + if(this.ShortCode != null && this.ShortCode.Length < 3) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShortCode, length must be greater than 3.", new [] { "ShortCode" }); + } + + // Description (string) maxLength + if(this.Description != null && this.Description.Length > 250) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 250.", new [] { "Description" }); + } + + // Description (string) minLength + if(this.Description != null && this.Description.Length < 0) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 0.", new [] { "Description" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/CreateGroupRoleRequest.cs b/src/VRChat.API/Model/CreateGroupRoleRequest.cs new file mode 100644 index 00000000..a5a899dc --- /dev/null +++ b/src/VRChat.API/Model/CreateGroupRoleRequest.cs @@ -0,0 +1,188 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// CreateGroupRoleRequest + /// + [DataContract(Name = "CreateGroupRoleRequest")] + public partial class CreateGroupRoleRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// name. + /// description. + /// isSelfAssignable (default to false). + /// permissions. + public CreateGroupRoleRequest(string id = default(string), string name = default(string), string description = default(string), bool isSelfAssignable = false, List permissions = default(List)) + { + this.Id = id; + this.Name = name; + this.Description = description; + this.IsSelfAssignable = isSelfAssignable; + this.Permissions = permissions; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Gets or Sets IsSelfAssignable + /// + [DataMember(Name = "isSelfAssignable", EmitDefaultValue = true)] + public bool IsSelfAssignable { get; set; } + + /// + /// Gets or Sets Permissions + /// + [DataMember(Name = "permissions", EmitDefaultValue = false)] + public List Permissions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateGroupRoleRequest {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" IsSelfAssignable: ").Append(IsSelfAssignable).Append("\n"); + sb.Append(" Permissions: ").Append(Permissions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateGroupRoleRequest); + } + + /// + /// Returns true if CreateGroupRoleRequest instances are equal + /// + /// Instance of CreateGroupRoleRequest to be compared + /// Boolean + public bool Equals(CreateGroupRoleRequest input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.IsSelfAssignable == input.IsSelfAssignable || + this.IsSelfAssignable.Equals(input.IsSelfAssignable) + ) && + ( + this.Permissions == input.Permissions || + this.Permissions != null && + input.Permissions != null && + this.Permissions.SequenceEqual(input.Permissions) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.IsSelfAssignable.GetHashCode(); + if (this.Permissions != null) + hashCode = hashCode * 59 + this.Permissions.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/CreateWorldRequest.cs b/src/VRChat.API/Model/CreateWorldRequest.cs index 7708b59c..8356e258 100644 --- a/src/VRChat.API/Model/CreateWorldRequest.cs +++ b/src/VRChat.API/Model/CreateWorldRequest.cs @@ -56,26 +56,23 @@ protected CreateWorldRequest() { } /// name (required). /// 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`.. /// releaseStatus. - /// . + /// tags. /// unityPackageUrl. /// unityVersion (default to "5.3.4p1"). public CreateWorldRequest(string assetUrl = default(string), int assetVersion = default(int), string authorId = default(string), string authorName = default(string), int capacity = default(int), string description = default(string), string id = default(string), string imageUrl = default(string), string name = default(string), string platform = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), List tags = default(List), string unityPackageUrl = default(string), string unityVersion = "5.3.4p1") { // to ensure "assetUrl" is required (not null) - if (assetUrl == null) - { + if (assetUrl == null) { throw new ArgumentNullException("assetUrl is a required property for CreateWorldRequest and cannot be null"); } this.AssetUrl = assetUrl; // to ensure "imageUrl" is required (not null) - if (imageUrl == null) - { + if (imageUrl == null) { throw new ArgumentNullException("imageUrl is a required property for CreateWorldRequest and cannot be null"); } this.ImageUrl = imageUrl; // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for CreateWorldRequest and cannot be null"); } this.Name = name; @@ -96,7 +93,7 @@ protected CreateWorldRequest() { } /// /// Gets or Sets AssetUrl /// - [DataMember(Name = "assetUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "assetUrl", IsRequired = true, EmitDefaultValue = false)] public string AssetUrl { get; set; } /// @@ -140,13 +137,13 @@ protected CreateWorldRequest() { } /// /// Gets or Sets ImageUrl /// - [DataMember(Name = "imageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "imageUrl", IsRequired = true, EmitDefaultValue = false)] public string ImageUrl { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// @@ -157,9 +154,8 @@ protected CreateWorldRequest() { } public string Platform { get; set; } /// - /// + /// Gets or Sets Tags /// - /// [DataMember(Name = "tags", EmitDefaultValue = false)] public List Tags { get; set; } @@ -181,7 +177,7 @@ protected CreateWorldRequest() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class CreateWorldRequest {\n"); sb.Append(" AssetUrl: ").Append(AssetUrl).Append("\n"); sb.Append(" AssetVersion: ").Append(AssetVersion).Append("\n"); @@ -228,9 +224,8 @@ public override bool Equals(object input) public bool Equals(CreateWorldRequest input) { if (input == null) - { return false; - } + return ( this.AssetUrl == input.AssetUrl || @@ -312,52 +307,30 @@ public override int GetHashCode() { int hashCode = 41; if (this.AssetUrl != null) - { - hashCode = (hashCode * 59) + this.AssetUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AssetVersion.GetHashCode(); + hashCode = hashCode * 59 + this.AssetUrl.GetHashCode(); + hashCode = hashCode * 59 + this.AssetVersion.GetHashCode(); if (this.AuthorId != null) - { - hashCode = (hashCode * 59) + this.AuthorId.GetHashCode(); - } + hashCode = hashCode * 59 + this.AuthorId.GetHashCode(); if (this.AuthorName != null) - { - hashCode = (hashCode * 59) + this.AuthorName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Capacity.GetHashCode(); + hashCode = hashCode * 59 + this.AuthorName.GetHashCode(); + hashCode = hashCode * 59 + this.Capacity.GetHashCode(); if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } + hashCode = hashCode * 59 + this.Description.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.ImageUrl != null) - { - hashCode = (hashCode * 59) + this.ImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.Platform != null) - { - hashCode = (hashCode * 59) + this.Platform.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReleaseStatus.GetHashCode(); + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + hashCode = hashCode * 59 + this.ReleaseStatus.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); if (this.UnityPackageUrl != null) - { - hashCode = (hashCode * 59) + this.UnityPackageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityPackageUrl.GetHashCode(); if (this.UnityVersion != null) - { - hashCode = (hashCode * 59) + this.UnityVersion.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityVersion.GetHashCode(); return hashCode; } } @@ -370,31 +343,31 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AssetUrl (string) minLength - if (this.AssetUrl != null && this.AssetUrl.Length < 1) + if(this.AssetUrl != null && this.AssetUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AssetUrl, length must be greater than 1.", new [] { "AssetUrl" }); } // AssetVersion (int) minimum - if (this.AssetVersion < (int)0) + if(this.AssetVersion < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AssetVersion, must be a value greater than or equal to 0.", new [] { "AssetVersion" }); } // AuthorName (string) minLength - if (this.AuthorName != null && this.AuthorName.Length < 1) + if(this.AuthorName != null && this.AuthorName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorName, length must be greater than 1.", new [] { "AuthorName" }); } // Capacity (int) maximum - if (this.Capacity > (int)40) + if(this.Capacity > (int)40) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Capacity, must be a value less than or equal to 40.", new [] { "Capacity" }); } // Capacity (int) minimum - if (this.Capacity < (int)0) + if(this.Capacity < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Capacity, must be a value greater than or equal to 0.", new [] { "Capacity" }); } @@ -407,25 +380,25 @@ public override int GetHashCode() } // ImageUrl (string) minLength - if (this.ImageUrl != null && this.ImageUrl.Length < 1) + if(this.ImageUrl != null && this.ImageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImageUrl, length must be greater than 1.", new [] { "ImageUrl" }); } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // UnityPackageUrl (string) minLength - if (this.UnityPackageUrl != null && this.UnityPackageUrl.Length < 1) + if(this.UnityPackageUrl != null && this.UnityPackageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UnityPackageUrl, length must be greater than 1.", new [] { "UnityPackageUrl" }); } // UnityVersion (string) minLength - if (this.UnityVersion != null && this.UnityVersion.Length < 1) + if(this.UnityVersion != null && this.UnityVersion.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UnityVersion, length must be greater than 1.", new [] { "UnityVersion" }); } diff --git a/src/VRChat.API/Model/CurrentUser.cs b/src/VRChat.API/Model/CurrentUser.cs index 4b89242e..902d2e1b 100644 --- a/src/VRChat.API/Model/CurrentUser.cs +++ b/src/VRChat.API/Model/CurrentUser.cs @@ -35,19 +35,19 @@ public partial class CurrentUser : IEquatable, IValidatableObject /// /// Gets or Sets DeveloperType /// - [DataMember(Name = "developerType", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "developerType", IsRequired = true, EmitDefaultValue = false)] public DeveloperType DeveloperType { get; set; } /// /// Gets or Sets State /// - [DataMember(Name = "state", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "state", IsRequired = true, EmitDefaultValue = false)] public UserState State { get; set; } /// /// Gets or Sets Status /// - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] public UserStatus Status { get; set; } /// /// Initializes a new instance of the class. @@ -89,7 +89,7 @@ protected CurrentUser() { } /// oculusId (required). /// offlineFriends. /// onlineFriends. - /// (required). + /// pastDisplayNames (required). /// profilePicOverride (required). /// state (required). /// status (required). @@ -109,65 +109,55 @@ protected CurrentUser() { } this.AcceptedTOSVersion = acceptedTOSVersion; this.AllowAvatarCopying = allowAvatarCopying; // to ensure "bio" is required (not null) - if (bio == null) - { + if (bio == null) { throw new ArgumentNullException("bio is a required property for CurrentUser and cannot be null"); } this.Bio = bio; // to ensure "bioLinks" is required (not null) - if (bioLinks == null) - { + if (bioLinks == null) { throw new ArgumentNullException("bioLinks is a required property for CurrentUser and cannot be null"); } this.BioLinks = bioLinks; // to ensure "currentAvatar" is required (not null) - if (currentAvatar == null) - { + if (currentAvatar == null) { throw new ArgumentNullException("currentAvatar is a required property for CurrentUser and cannot be null"); } this.CurrentAvatar = currentAvatar; // to ensure "currentAvatarAssetUrl" is required (not null) - if (currentAvatarAssetUrl == null) - { + if (currentAvatarAssetUrl == null) { throw new ArgumentNullException("currentAvatarAssetUrl is a required property for CurrentUser and cannot be null"); } this.CurrentAvatarAssetUrl = currentAvatarAssetUrl; // to ensure "currentAvatarImageUrl" is required (not null) - if (currentAvatarImageUrl == null) - { + if (currentAvatarImageUrl == null) { throw new ArgumentNullException("currentAvatarImageUrl is a required property for CurrentUser and cannot be null"); } this.CurrentAvatarImageUrl = currentAvatarImageUrl; // to ensure "currentAvatarThumbnailImageUrl" is required (not null) - if (currentAvatarThumbnailImageUrl == null) - { + if (currentAvatarThumbnailImageUrl == null) { throw new ArgumentNullException("currentAvatarThumbnailImageUrl is a required property for CurrentUser and cannot be null"); } this.CurrentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; this.DateJoined = dateJoined; this.DeveloperType = developerType; // to ensure "displayName" is required (not null) - if (displayName == null) - { + if (displayName == null) { throw new ArgumentNullException("displayName is a required property for CurrentUser and cannot be null"); } this.DisplayName = displayName; this.EmailVerified = emailVerified; // to ensure "friendGroupNames" is required (not null) - if (friendGroupNames == null) - { + if (friendGroupNames == null) { throw new ArgumentNullException("friendGroupNames is a required property for CurrentUser and cannot be null"); } this.FriendGroupNames = friendGroupNames; // to ensure "friendKey" is required (not null) - if (friendKey == null) - { + if (friendKey == null) { throw new ArgumentNullException("friendKey is a required property for CurrentUser and cannot be null"); } this.FriendKey = friendKey; // to ensure "friends" is required (not null) - if (friends == null) - { + if (friends == null) { throw new ArgumentNullException("friends is a required property for CurrentUser and cannot be null"); } this.Friends = friends; @@ -176,93 +166,79 @@ protected CurrentUser() { } this.HasLoggedInFromClient = hasLoggedInFromClient; this.HasPendingEmail = hasPendingEmail; // to ensure "homeLocation" is required (not null) - if (homeLocation == null) - { + if (homeLocation == null) { throw new ArgumentNullException("homeLocation is a required property for CurrentUser and cannot be null"); } this.HomeLocation = homeLocation; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for CurrentUser and cannot be null"); } this.Id = id; this.IsFriend = isFriend; this.LastLogin = lastLogin; // to ensure "lastPlatform" is required (not null) - if (lastPlatform == null) - { + if (lastPlatform == null) { throw new ArgumentNullException("lastPlatform is a required property for CurrentUser and cannot be null"); } this.LastPlatform = lastPlatform; // to ensure "obfuscatedEmail" is required (not null) - if (obfuscatedEmail == null) - { + if (obfuscatedEmail == null) { throw new ArgumentNullException("obfuscatedEmail is a required property for CurrentUser and cannot be null"); } this.ObfuscatedEmail = obfuscatedEmail; // to ensure "obfuscatedPendingEmail" is required (not null) - if (obfuscatedPendingEmail == null) - { + if (obfuscatedPendingEmail == null) { throw new ArgumentNullException("obfuscatedPendingEmail is a required property for CurrentUser and cannot be null"); } this.ObfuscatedPendingEmail = obfuscatedPendingEmail; // to ensure "oculusId" is required (not null) - if (oculusId == null) - { + if (oculusId == null) { throw new ArgumentNullException("oculusId is a required property for CurrentUser and cannot be null"); } this.OculusId = oculusId; // to ensure "pastDisplayNames" is required (not null) - if (pastDisplayNames == null) - { + if (pastDisplayNames == null) { throw new ArgumentNullException("pastDisplayNames is a required property for CurrentUser and cannot be null"); } this.PastDisplayNames = pastDisplayNames; // to ensure "profilePicOverride" is required (not null) - if (profilePicOverride == null) - { + if (profilePicOverride == null) { throw new ArgumentNullException("profilePicOverride is a required property for CurrentUser and cannot be null"); } this.ProfilePicOverride = profilePicOverride; this.State = state; this.Status = status; // to ensure "statusDescription" is required (not null) - if (statusDescription == null) - { + if (statusDescription == null) { throw new ArgumentNullException("statusDescription is a required property for CurrentUser and cannot be null"); } this.StatusDescription = statusDescription; this.StatusFirstTime = statusFirstTime; // to ensure "statusHistory" is required (not null) - if (statusHistory == null) - { + if (statusHistory == null) { throw new ArgumentNullException("statusHistory is a required property for CurrentUser and cannot be null"); } this.StatusHistory = statusHistory; // to ensure "steamDetails" is required (not null) - if (steamDetails == null) - { + if (steamDetails == null) { throw new ArgumentNullException("steamDetails is a required property for CurrentUser and cannot be null"); } this.SteamDetails = steamDetails; // to ensure "steamId" is required (not null) - if (steamId == null) - { + if (steamId == null) { throw new ArgumentNullException("steamId is a required property for CurrentUser and cannot be null"); } this.SteamId = steamId; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for CurrentUser and cannot be null"); } this.Tags = tags; this.TwoFactorAuthEnabled = twoFactorAuthEnabled; this.Unsubscribe = unsubscribe; // to ensure "userIcon" is required (not null) - if (userIcon == null) - { + if (userIcon == null) { throw new ArgumentNullException("userIcon is a required property for CurrentUser and cannot be null"); } this.UserIcon = userIcon; @@ -278,7 +254,7 @@ protected CurrentUser() { } /// /// Gets or Sets AcceptedTOSVersion /// - [DataMember(Name = "acceptedTOSVersion", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "acceptedTOSVersion", IsRequired = true, EmitDefaultValue = false)] public int AcceptedTOSVersion { get; set; } /// @@ -303,52 +279,52 @@ protected CurrentUser() { } /// /// Gets or Sets Bio /// - [DataMember(Name = "bio", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "bio", IsRequired = true, EmitDefaultValue = false)] public string Bio { get; set; } /// /// Gets or Sets BioLinks /// - [DataMember(Name = "bioLinks", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "bioLinks", IsRequired = true, EmitDefaultValue = false)] public List BioLinks { get; set; } /// /// Gets or Sets CurrentAvatar /// - [DataMember(Name = "currentAvatar", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "currentAvatar", IsRequired = true, EmitDefaultValue = false)] public string CurrentAvatar { get; set; } /// /// Gets or Sets CurrentAvatarAssetUrl /// - [DataMember(Name = "currentAvatarAssetUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "currentAvatarAssetUrl", IsRequired = true, EmitDefaultValue = false)] public string CurrentAvatarAssetUrl { get; set; } /// /// When profilePicOverride is not empty, use it instead. /// /// When profilePicOverride is not empty, use it instead. - [DataMember(Name = "currentAvatarImageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "currentAvatarImageUrl", IsRequired = true, EmitDefaultValue = false)] public string CurrentAvatarImageUrl { get; set; } /// /// When profilePicOverride is not empty, use it instead. /// /// When profilePicOverride is not empty, use it instead. - [DataMember(Name = "currentAvatarThumbnailImageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "currentAvatarThumbnailImageUrl", IsRequired = true, EmitDefaultValue = false)] public string CurrentAvatarThumbnailImageUrl { get; set; } /// /// Gets or Sets DateJoined /// - [DataMember(Name = "date_joined", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "date_joined", IsRequired = true, EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime DateJoined { get; set; } /// /// Gets or Sets DisplayName /// - [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = false)] public string DisplayName { get; set; } /// @@ -367,20 +343,20 @@ protected CurrentUser() { } /// Always empty array. /// /// Always empty array. - [DataMember(Name = "friendGroupNames", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "friendGroupNames", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public List FriendGroupNames { get; set; } /// /// Gets or Sets FriendKey /// - [DataMember(Name = "friendKey", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "friendKey", IsRequired = true, EmitDefaultValue = false)] public string FriendKey { get; set; } /// /// Gets or Sets Friends /// - [DataMember(Name = "friends", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "friends", IsRequired = true, EmitDefaultValue = false)] public List Friends { get; set; } /// @@ -411,14 +387,14 @@ protected CurrentUser() { } /// WorldID be \"offline\" on User profiles if you are not friends with that user. /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. - [DataMember(Name = "homeLocation", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "homeLocation", IsRequired = true, EmitDefaultValue = false)] public string HomeLocation { get; set; } /// /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// @@ -430,32 +406,32 @@ protected CurrentUser() { } /// /// Gets or Sets LastLogin /// - [DataMember(Name = "last_login", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "last_login", IsRequired = true, EmitDefaultValue = false)] public DateTime LastLogin { get; set; } /// /// 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 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`. - [DataMember(Name = "last_platform", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "last_platform", IsRequired = true, EmitDefaultValue = false)] public string LastPlatform { get; set; } /// /// Gets or Sets ObfuscatedEmail /// - [DataMember(Name = "obfuscatedEmail", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "obfuscatedEmail", IsRequired = true, EmitDefaultValue = false)] public string ObfuscatedEmail { get; set; } /// /// Gets or Sets ObfuscatedPendingEmail /// - [DataMember(Name = "obfuscatedPendingEmail", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "obfuscatedPendingEmail", IsRequired = true, EmitDefaultValue = false)] public string ObfuscatedPendingEmail { get; set; } /// /// Gets or Sets OculusId /// - [DataMember(Name = "oculusId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "oculusId", IsRequired = true, EmitDefaultValue = false)] public string OculusId { get; set; } /// @@ -471,22 +447,21 @@ protected CurrentUser() { } public List OnlineFriends { get; set; } /// - /// + /// Gets or Sets PastDisplayNames /// - /// - [DataMember(Name = "pastDisplayNames", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "pastDisplayNames", IsRequired = true, EmitDefaultValue = false)] public List PastDisplayNames { get; set; } /// /// Gets or Sets ProfilePicOverride /// - [DataMember(Name = "profilePicOverride", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "profilePicOverride", IsRequired = true, EmitDefaultValue = false)] public string ProfilePicOverride { get; set; } /// /// Gets or Sets StatusDescription /// - [DataMember(Name = "statusDescription", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "statusDescription", IsRequired = true, EmitDefaultValue = false)] public string StatusDescription { get; set; } /// @@ -498,25 +473,25 @@ protected CurrentUser() { } /// /// Gets or Sets StatusHistory /// - [DataMember(Name = "statusHistory", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "statusHistory", IsRequired = true, EmitDefaultValue = false)] public List StatusHistory { get; set; } /// /// Gets or Sets SteamDetails /// - [DataMember(Name = "steamDetails", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "steamDetails", IsRequired = true, EmitDefaultValue = false)] public Object SteamDetails { get; set; } /// /// Gets or Sets SteamId /// - [DataMember(Name = "steamId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "steamId", IsRequired = true, EmitDefaultValue = false)] public string SteamId { get; set; } /// /// Gets or Sets Tags /// - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// @@ -540,7 +515,7 @@ protected CurrentUser() { } /// /// Gets or Sets UserIcon /// - [DataMember(Name = "userIcon", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "userIcon", IsRequired = true, EmitDefaultValue = false)] public string UserIcon { get; set; } /// @@ -557,7 +532,7 @@ protected CurrentUser() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class CurrentUser {\n"); sb.Append(" AcceptedTOSVersion: ").Append(AcceptedTOSVersion).Append("\n"); sb.Append(" AccountDeletionDate: ").Append(AccountDeletionDate).Append("\n"); @@ -637,9 +612,8 @@ public override bool Equals(object input) public bool Equals(CurrentUser input) { if (input == null) - { return false; - } + return ( this.AcceptedTOSVersion == input.AcceptedTOSVersion || @@ -882,152 +856,86 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.AcceptedTOSVersion.GetHashCode(); + hashCode = hashCode * 59 + this.AcceptedTOSVersion.GetHashCode(); if (this.AccountDeletionDate != null) - { - hashCode = (hashCode * 59) + this.AccountDeletionDate.GetHashCode(); - } + hashCode = hashCode * 59 + this.AccountDeletionDate.GetHashCode(); if (this.ActiveFriends != null) - { - hashCode = (hashCode * 59) + this.ActiveFriends.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AllowAvatarCopying.GetHashCode(); + hashCode = hashCode * 59 + this.ActiveFriends.GetHashCode(); + hashCode = hashCode * 59 + this.AllowAvatarCopying.GetHashCode(); if (this.Bio != null) - { - hashCode = (hashCode * 59) + this.Bio.GetHashCode(); - } + hashCode = hashCode * 59 + this.Bio.GetHashCode(); if (this.BioLinks != null) - { - hashCode = (hashCode * 59) + this.BioLinks.GetHashCode(); - } + hashCode = hashCode * 59 + this.BioLinks.GetHashCode(); if (this.CurrentAvatar != null) - { - hashCode = (hashCode * 59) + this.CurrentAvatar.GetHashCode(); - } + hashCode = hashCode * 59 + this.CurrentAvatar.GetHashCode(); if (this.CurrentAvatarAssetUrl != null) - { - hashCode = (hashCode * 59) + this.CurrentAvatarAssetUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.CurrentAvatarAssetUrl.GetHashCode(); if (this.CurrentAvatarImageUrl != null) - { - hashCode = (hashCode * 59) + this.CurrentAvatarImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.CurrentAvatarImageUrl.GetHashCode(); if (this.CurrentAvatarThumbnailImageUrl != null) - { - hashCode = (hashCode * 59) + this.CurrentAvatarThumbnailImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.CurrentAvatarThumbnailImageUrl.GetHashCode(); if (this.DateJoined != null) - { - hashCode = (hashCode * 59) + this.DateJoined.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DeveloperType.GetHashCode(); + hashCode = hashCode * 59 + this.DateJoined.GetHashCode(); + hashCode = hashCode * 59 + this.DeveloperType.GetHashCode(); if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EmailVerified.GetHashCode(); + hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); + hashCode = hashCode * 59 + this.EmailVerified.GetHashCode(); if (this.FallbackAvatar != null) - { - hashCode = (hashCode * 59) + this.FallbackAvatar.GetHashCode(); - } + hashCode = hashCode * 59 + this.FallbackAvatar.GetHashCode(); if (this.FriendGroupNames != null) - { - hashCode = (hashCode * 59) + this.FriendGroupNames.GetHashCode(); - } + hashCode = hashCode * 59 + this.FriendGroupNames.GetHashCode(); if (this.FriendKey != null) - { - hashCode = (hashCode * 59) + this.FriendKey.GetHashCode(); - } + hashCode = hashCode * 59 + this.FriendKey.GetHashCode(); if (this.Friends != null) - { - hashCode = (hashCode * 59) + this.Friends.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasBirthday.GetHashCode(); - hashCode = (hashCode * 59) + this.HasEmail.GetHashCode(); - hashCode = (hashCode * 59) + this.HasLoggedInFromClient.GetHashCode(); - hashCode = (hashCode * 59) + this.HasPendingEmail.GetHashCode(); + hashCode = hashCode * 59 + this.Friends.GetHashCode(); + hashCode = hashCode * 59 + this.HasBirthday.GetHashCode(); + hashCode = hashCode * 59 + this.HasEmail.GetHashCode(); + hashCode = hashCode * 59 + this.HasLoggedInFromClient.GetHashCode(); + hashCode = hashCode * 59 + this.HasPendingEmail.GetHashCode(); if (this.HomeLocation != null) - { - hashCode = (hashCode * 59) + this.HomeLocation.GetHashCode(); - } + hashCode = hashCode * 59 + this.HomeLocation.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsFriend.GetHashCode(); + hashCode = hashCode * 59 + this.Id.GetHashCode(); + hashCode = hashCode * 59 + this.IsFriend.GetHashCode(); if (this.LastLogin != null) - { - hashCode = (hashCode * 59) + this.LastLogin.GetHashCode(); - } + hashCode = hashCode * 59 + this.LastLogin.GetHashCode(); if (this.LastPlatform != null) - { - hashCode = (hashCode * 59) + this.LastPlatform.GetHashCode(); - } + hashCode = hashCode * 59 + this.LastPlatform.GetHashCode(); if (this.ObfuscatedEmail != null) - { - hashCode = (hashCode * 59) + this.ObfuscatedEmail.GetHashCode(); - } + hashCode = hashCode * 59 + this.ObfuscatedEmail.GetHashCode(); if (this.ObfuscatedPendingEmail != null) - { - hashCode = (hashCode * 59) + this.ObfuscatedPendingEmail.GetHashCode(); - } + hashCode = hashCode * 59 + this.ObfuscatedPendingEmail.GetHashCode(); if (this.OculusId != null) - { - hashCode = (hashCode * 59) + this.OculusId.GetHashCode(); - } + hashCode = hashCode * 59 + this.OculusId.GetHashCode(); if (this.OfflineFriends != null) - { - hashCode = (hashCode * 59) + this.OfflineFriends.GetHashCode(); - } + hashCode = hashCode * 59 + this.OfflineFriends.GetHashCode(); if (this.OnlineFriends != null) - { - hashCode = (hashCode * 59) + this.OnlineFriends.GetHashCode(); - } + hashCode = hashCode * 59 + this.OnlineFriends.GetHashCode(); if (this.PastDisplayNames != null) - { - hashCode = (hashCode * 59) + this.PastDisplayNames.GetHashCode(); - } + hashCode = hashCode * 59 + this.PastDisplayNames.GetHashCode(); if (this.ProfilePicOverride != null) - { - hashCode = (hashCode * 59) + this.ProfilePicOverride.GetHashCode(); - } - hashCode = (hashCode * 59) + this.State.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); + hashCode = hashCode * 59 + this.ProfilePicOverride.GetHashCode(); + hashCode = hashCode * 59 + this.State.GetHashCode(); + hashCode = hashCode * 59 + this.Status.GetHashCode(); if (this.StatusDescription != null) - { - hashCode = (hashCode * 59) + this.StatusDescription.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusFirstTime.GetHashCode(); + hashCode = hashCode * 59 + this.StatusDescription.GetHashCode(); + hashCode = hashCode * 59 + this.StatusFirstTime.GetHashCode(); if (this.StatusHistory != null) - { - hashCode = (hashCode * 59) + this.StatusHistory.GetHashCode(); - } + hashCode = hashCode * 59 + this.StatusHistory.GetHashCode(); if (this.SteamDetails != null) - { - hashCode = (hashCode * 59) + this.SteamDetails.GetHashCode(); - } + hashCode = hashCode * 59 + this.SteamDetails.GetHashCode(); if (this.SteamId != null) - { - hashCode = (hashCode * 59) + this.SteamId.GetHashCode(); - } + hashCode = hashCode * 59 + this.SteamId.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TwoFactorAuthEnabled.GetHashCode(); + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + hashCode = hashCode * 59 + this.TwoFactorAuthEnabled.GetHashCode(); if (this.TwoFactorAuthEnabledDate != null) - { - hashCode = (hashCode * 59) + this.TwoFactorAuthEnabledDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Unsubscribe.GetHashCode(); + hashCode = hashCode * 59 + this.TwoFactorAuthEnabledDate.GetHashCode(); + hashCode = hashCode * 59 + this.Unsubscribe.GetHashCode(); if (this.UserIcon != null) - { - hashCode = (hashCode * 59) + this.UserIcon.GetHashCode(); - } + hashCode = hashCode * 59 + this.UserIcon.GetHashCode(); if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } + hashCode = hashCode * 59 + this.Username.GetHashCode(); return hashCode; } } @@ -1040,7 +948,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AcceptedTOSVersion (int) minimum - if (this.AcceptedTOSVersion < (int)0) + if(this.AcceptedTOSVersion < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AcceptedTOSVersion, must be a value greater than or equal to 0.", new [] { "AcceptedTOSVersion" }); } diff --git a/src/VRChat.API/Model/DynamicContentRow.cs b/src/VRChat.API/Model/DynamicContentRow.cs index db9eb0f9..48953666 100644 --- a/src/VRChat.API/Model/DynamicContentRow.cs +++ b/src/VRChat.API/Model/DynamicContentRow.cs @@ -50,32 +50,27 @@ protected DynamicContentRow() { } public DynamicContentRow(int index = default(int), string name = default(string), string platform = default(string), string sortHeading = default(string), string sortOrder = default(string), string sortOwnership = default(string), string tag = default(string), string type = default(string)) { // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for DynamicContentRow and cannot be null"); } this.Name = name; // to ensure "platform" is required (not null) - if (platform == null) - { + if (platform == null) { throw new ArgumentNullException("platform is a required property for DynamicContentRow and cannot be null"); } this.Platform = platform; // to ensure "sortHeading" is required (not null) - if (sortHeading == null) - { + if (sortHeading == null) { throw new ArgumentNullException("sortHeading is a required property for DynamicContentRow and cannot be null"); } this.SortHeading = sortHeading; // to ensure "sortOrder" is required (not null) - if (sortOrder == null) - { + if (sortOrder == null) { throw new ArgumentNullException("sortOrder is a required property for DynamicContentRow and cannot be null"); } this.SortOrder = sortOrder; // to ensure "sortOwnership" is required (not null) - if (sortOwnership == null) - { + if (sortOwnership == null) { throw new ArgumentNullException("sortOwnership is a required property for DynamicContentRow and cannot be null"); } this.SortOwnership = sortOwnership; @@ -93,32 +88,32 @@ protected DynamicContentRow() { } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// /// Usually \"ThisPlatformSupported\", but can also be other values such as \"all\" or platform specific identifiers. /// /// Usually \"ThisPlatformSupported\", but can also be other values such as \"all\" or platform specific identifiers. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] public string Platform { get; set; } /// /// Gets or Sets SortHeading /// - [DataMember(Name = "sortHeading", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sortHeading", IsRequired = true, EmitDefaultValue = false)] public string SortHeading { get; set; } /// /// Gets or Sets SortOrder /// - [DataMember(Name = "sortOrder", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sortOrder", IsRequired = true, EmitDefaultValue = false)] public string SortOrder { get; set; } /// /// Gets or Sets SortOwnership /// - [DataMember(Name = "sortOwnership", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sortOwnership", IsRequired = true, EmitDefaultValue = false)] public string SortOwnership { get; set; } /// @@ -141,7 +136,7 @@ protected DynamicContentRow() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class DynamicContentRow {\n"); sb.Append(" Index: ").Append(Index).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); @@ -182,9 +177,8 @@ public override bool Equals(object input) public bool Equals(DynamicContentRow input) { if (input == null) - { return false; - } + return ( this.Index == input.Index || @@ -236,35 +230,21 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Index.GetHashCode(); + hashCode = hashCode * 59 + this.Index.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.Platform != null) - { - hashCode = (hashCode * 59) + this.Platform.GetHashCode(); - } + hashCode = hashCode * 59 + this.Platform.GetHashCode(); if (this.SortHeading != null) - { - hashCode = (hashCode * 59) + this.SortHeading.GetHashCode(); - } + hashCode = hashCode * 59 + this.SortHeading.GetHashCode(); if (this.SortOrder != null) - { - hashCode = (hashCode * 59) + this.SortOrder.GetHashCode(); - } + hashCode = hashCode * 59 + this.SortOrder.GetHashCode(); if (this.SortOwnership != null) - { - hashCode = (hashCode * 59) + this.SortOwnership.GetHashCode(); - } + hashCode = hashCode * 59 + this.SortOwnership.GetHashCode(); if (this.Tag != null) - { - hashCode = (hashCode * 59) + this.Tag.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tag.GetHashCode(); if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } + hashCode = hashCode * 59 + this.Type.GetHashCode(); return hashCode; } } @@ -277,43 +257,43 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Index (int) minimum - if (this.Index < (int)0) + if(this.Index < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Index, must be a value greater than or equal to 0.", new [] { "Index" }); } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // Platform (string) minLength - if (this.Platform != null && this.Platform.Length < 1) + if(this.Platform != null && this.Platform.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Platform, length must be greater than 1.", new [] { "Platform" }); } // SortHeading (string) minLength - if (this.SortHeading != null && this.SortHeading.Length < 1) + if(this.SortHeading != null && this.SortHeading.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortHeading, length must be greater than 1.", new [] { "SortHeading" }); } // SortOrder (string) minLength - if (this.SortOrder != null && this.SortOrder.Length < 1) + if(this.SortOrder != null && this.SortOrder.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortOrder, length must be greater than 1.", new [] { "SortOrder" }); } // SortOwnership (string) minLength - if (this.SortOwnership != null && this.SortOwnership.Length < 1) + if(this.SortOwnership != null && this.SortOwnership.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortOwnership, length must be greater than 1.", new [] { "SortOwnership" }); } // Tag (string) minLength - if (this.Tag != null && this.Tag.Length < 1) + if(this.Tag != null && this.Tag.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Tag, length must be greater than 1.", new [] { "Tag" }); } diff --git a/src/VRChat.API/Model/Error.cs b/src/VRChat.API/Model/Error.cs index 6df46591..6b597ec8 100644 --- a/src/VRChat.API/Model/Error.cs +++ b/src/VRChat.API/Model/Error.cs @@ -52,7 +52,7 @@ public partial class Error : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class Error {\n"); sb.Append(" _Error: ").Append(_Error).Append("\n"); sb.Append("}\n"); @@ -86,9 +86,8 @@ public override bool Equals(object input) public bool Equals(Error input) { if (input == null) - { return false; - } + return ( this._Error == input._Error || @@ -107,9 +106,7 @@ public override int GetHashCode() { int hashCode = 41; if (this._Error != null) - { - hashCode = (hashCode * 59) + this._Error.GetHashCode(); - } + hashCode = hashCode * 59 + this._Error.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/Favorite.cs b/src/VRChat.API/Model/Favorite.cs index 06fd4c92..01fa51b6 100644 --- a/src/VRChat.API/Model/Favorite.cs +++ b/src/VRChat.API/Model/Favorite.cs @@ -35,7 +35,7 @@ public partial class Favorite : IEquatable, IValidatableObject /// /// Gets or Sets Type /// - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] public FavoriteType Type { get; set; } /// /// Initializes a new instance of the class. @@ -47,25 +47,22 @@ protected Favorite() { } /// /// MUST be either AvatarID, UserID or WorldID. (required). /// id (required). - /// (required). + /// tags (required). /// type (required). public Favorite(string favoriteId = default(string), string id = default(string), List tags = default(List), FavoriteType type = default(FavoriteType)) { // to ensure "favoriteId" is required (not null) - if (favoriteId == null) - { + if (favoriteId == null) { throw new ArgumentNullException("favoriteId is a required property for Favorite and cannot be null"); } this.FavoriteId = favoriteId; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for Favorite and cannot be null"); } this.Id = id; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for Favorite and cannot be null"); } this.Tags = tags; @@ -76,20 +73,19 @@ protected Favorite() { } /// MUST be either AvatarID, UserID or WorldID. /// /// MUST be either AvatarID, UserID or WorldID. - [DataMember(Name = "favoriteId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "favoriteId", IsRequired = true, EmitDefaultValue = false)] public string FavoriteId { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// - /// + /// Gets or Sets Tags /// - /// - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// @@ -98,7 +94,7 @@ protected Favorite() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class Favorite {\n"); sb.Append(" FavoriteId: ").Append(FavoriteId).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); @@ -135,9 +131,8 @@ public override bool Equals(object input) public bool Equals(Favorite input) { if (input == null) - { return false; - } + return ( this.FavoriteId == input.FavoriteId || @@ -171,18 +166,12 @@ public override int GetHashCode() { int hashCode = 41; if (this.FavoriteId != null) - { - hashCode = (hashCode * 59) + this.FavoriteId.GetHashCode(); - } + hashCode = hashCode * 59 + this.FavoriteId.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + hashCode = hashCode * 59 + this.Type.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/FavoriteGroup.cs b/src/VRChat.API/Model/FavoriteGroup.cs index 04f60cdb..cc13a681 100644 --- a/src/VRChat.API/Model/FavoriteGroup.cs +++ b/src/VRChat.API/Model/FavoriteGroup.cs @@ -35,13 +35,13 @@ public partial class FavoriteGroup : IEquatable, IValidatableObje /// /// Gets or Sets Type /// - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] public FavoriteType Type { get; set; } /// /// Gets or Sets Visibility /// - [DataMember(Name = "visibility", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "visibility", IsRequired = true, EmitDefaultValue = false)] public FavoriteGroupVisibility Visibility { get; set; } /// /// Initializes a new instance of the class. @@ -56,44 +56,38 @@ protected FavoriteGroup() { } /// name (required). /// ownerDisplayName (required). /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. (required). - /// (required). + /// tags (required). /// type (required). /// visibility (required). public FavoriteGroup(string displayName = default(string), string id = default(string), string name = default(string), string ownerDisplayName = default(string), string ownerId = default(string), List tags = default(List), FavoriteType type = default(FavoriteType), FavoriteGroupVisibility visibility = default(FavoriteGroupVisibility)) { // to ensure "displayName" is required (not null) - if (displayName == null) - { + if (displayName == null) { throw new ArgumentNullException("displayName is a required property for FavoriteGroup and cannot be null"); } this.DisplayName = displayName; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for FavoriteGroup and cannot be null"); } this.Id = id; // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for FavoriteGroup and cannot be null"); } this.Name = name; // to ensure "ownerDisplayName" is required (not null) - if (ownerDisplayName == null) - { + if (ownerDisplayName == null) { throw new ArgumentNullException("ownerDisplayName is a required property for FavoriteGroup and cannot be null"); } this.OwnerDisplayName = ownerDisplayName; // to ensure "ownerId" is required (not null) - if (ownerId == null) - { + if (ownerId == null) { throw new ArgumentNullException("ownerId is a required property for FavoriteGroup and cannot be null"); } this.OwnerId = ownerId; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for FavoriteGroup and cannot be null"); } this.Tags = tags; @@ -104,39 +98,38 @@ protected FavoriteGroup() { } /// /// Gets or Sets DisplayName /// - [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = false)] public string DisplayName { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// /// Gets or Sets OwnerDisplayName /// - [DataMember(Name = "ownerDisplayName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "ownerDisplayName", IsRequired = true, EmitDefaultValue = false)] public string OwnerDisplayName { get; set; } /// /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "ownerId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "ownerId", IsRequired = true, EmitDefaultValue = false)] public string OwnerId { get; set; } /// - /// + /// Gets or Sets Tags /// - /// - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// @@ -145,7 +138,7 @@ protected FavoriteGroup() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class FavoriteGroup {\n"); sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); @@ -186,9 +179,8 @@ public override bool Equals(object input) public bool Equals(FavoriteGroup input) { if (input == null) - { return false; - } + return ( this.DisplayName == input.DisplayName || @@ -241,31 +233,19 @@ public override int GetHashCode() { int hashCode = 41; if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } + hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.OwnerDisplayName != null) - { - hashCode = (hashCode * 59) + this.OwnerDisplayName.GetHashCode(); - } + hashCode = hashCode * 59 + this.OwnerDisplayName.GetHashCode(); if (this.OwnerId != null) - { - hashCode = (hashCode * 59) + this.OwnerId.GetHashCode(); - } + hashCode = hashCode * 59 + this.OwnerId.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - hashCode = (hashCode * 59) + this.Visibility.GetHashCode(); + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + hashCode = hashCode * 59 + this.Type.GetHashCode(); + hashCode = hashCode * 59 + this.Visibility.GetHashCode(); return hashCode; } } @@ -278,7 +258,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // DisplayName (string) minLength - if (this.DisplayName != null && this.DisplayName.Length < 1) + if(this.DisplayName != null && this.DisplayName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be greater than 1.", new [] { "DisplayName" }); } @@ -291,13 +271,13 @@ public override int GetHashCode() } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // OwnerDisplayName (string) minLength - if (this.OwnerDisplayName != null && this.OwnerDisplayName.Length < 1) + if(this.OwnerDisplayName != null && this.OwnerDisplayName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OwnerDisplayName, length must be greater than 1.", new [] { "OwnerDisplayName" }); } diff --git a/src/VRChat.API/Model/File.cs b/src/VRChat.API/Model/File.cs index 25022903..6b0ad10f 100644 --- a/src/VRChat.API/Model/File.cs +++ b/src/VRChat.API/Model/File.cs @@ -35,7 +35,7 @@ public partial class File : IEquatable, IValidatableObject /// /// Gets or Sets MimeType /// - [DataMember(Name = "mimeType", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "mimeType", IsRequired = true, EmitDefaultValue = false)] public MIMEType MimeType { get; set; } /// /// Initializes a new instance of the class. @@ -50,44 +50,38 @@ protected File() { } /// mimeType (required). /// name (required). /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. (required). - /// (required). - /// (required). + /// tags (required). + /// versions (required). public File(string extension = default(string), string id = default(string), MIMEType mimeType = default(MIMEType), string name = default(string), string ownerId = default(string), List tags = default(List), List versions = default(List)) { // to ensure "extension" is required (not null) - if (extension == null) - { + if (extension == null) { throw new ArgumentNullException("extension is a required property for File and cannot be null"); } this.Extension = extension; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for File and cannot be null"); } this.Id = id; this.MimeType = mimeType; // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for File and cannot be null"); } this.Name = name; // to ensure "ownerId" is required (not null) - if (ownerId == null) - { + if (ownerId == null) { throw new ArgumentNullException("ownerId is a required property for File and cannot be null"); } this.OwnerId = ownerId; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for File and cannot be null"); } this.Tags = tags; // to ensure "versions" is required (not null) - if (versions == null) - { + if (versions == null) { throw new ArgumentNullException("versions is a required property for File and cannot be null"); } this.Versions = versions; @@ -96,40 +90,38 @@ protected File() { } /// /// Gets or Sets Extension /// - [DataMember(Name = "extension", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "extension", IsRequired = true, EmitDefaultValue = false)] public string Extension { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "ownerId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "ownerId", IsRequired = true, EmitDefaultValue = false)] public string OwnerId { get; set; } /// - /// + /// Gets or Sets Tags /// - /// - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// - /// + /// Gets or Sets Versions /// - /// - [DataMember(Name = "versions", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "versions", IsRequired = true, EmitDefaultValue = false)] public List Versions { get; set; } /// @@ -138,7 +130,7 @@ protected File() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class File {\n"); sb.Append(" Extension: ").Append(Extension).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); @@ -178,9 +170,8 @@ public override bool Equals(object input) public bool Equals(File input) { if (input == null) - { return false; - } + return ( this.Extension == input.Extension || @@ -230,30 +221,18 @@ public override int GetHashCode() { int hashCode = 41; if (this.Extension != null) - { - hashCode = (hashCode * 59) + this.Extension.GetHashCode(); - } + hashCode = hashCode * 59 + this.Extension.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MimeType.GetHashCode(); + hashCode = hashCode * 59 + this.Id.GetHashCode(); + hashCode = hashCode * 59 + this.MimeType.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.OwnerId != null) - { - hashCode = (hashCode * 59) + this.OwnerId.GetHashCode(); - } + hashCode = hashCode * 59 + this.OwnerId.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); if (this.Versions != null) - { - hashCode = (hashCode * 59) + this.Versions.GetHashCode(); - } + hashCode = hashCode * 59 + this.Versions.GetHashCode(); return hashCode; } } @@ -266,7 +245,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Extension (string) minLength - if (this.Extension != null && this.Extension.Length < 1) + if(this.Extension != null && this.Extension.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Extension, length must be greater than 1.", new [] { "Extension" }); } @@ -279,7 +258,7 @@ public override int GetHashCode() } // Name (string) minLength - if (this.Name != null && this.Name.Length < 0) + if(this.Name != null && this.Name.Length < 0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 0.", new [] { "Name" }); } diff --git a/src/VRChat.API/Model/FileData.cs b/src/VRChat.API/Model/FileData.cs index 4bce5a75..ff174790 100644 --- a/src/VRChat.API/Model/FileData.cs +++ b/src/VRChat.API/Model/FileData.cs @@ -61,13 +61,13 @@ public enum CategoryEnum /// /// Gets or Sets Category /// - [DataMember(Name = "category", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "category", IsRequired = true, EmitDefaultValue = false)] public CategoryEnum Category { get; set; } /// /// Gets or Sets Status /// - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] public FileStatus Status { get; set; } /// /// Initializes a new instance of the class. @@ -88,28 +88,24 @@ protected FileData() { } { this.Category = category; // to ensure "fileName" is required (not null) - if (fileName == null) - { + if (fileName == null) { throw new ArgumentNullException("fileName is a required property for FileData and cannot be null"); } this.FileName = fileName; // to ensure "md5" is required (not null) - if (md5 == null) - { + if (md5 == null) { throw new ArgumentNullException("md5 is a required property for FileData and cannot be null"); } this.Md5 = md5; this.SizeInBytes = sizeInBytes; this.Status = status; // to ensure "uploadId" is required (not null) - if (uploadId == null) - { + if (uploadId == null) { throw new ArgumentNullException("uploadId is a required property for FileData and cannot be null"); } this.UploadId = uploadId; // to ensure "url" is required (not null) - if (url == null) - { + if (url == null) { throw new ArgumentNullException("url is a required property for FileData and cannot be null"); } this.Url = url; @@ -118,31 +114,31 @@ protected FileData() { } /// /// Gets or Sets FileName /// - [DataMember(Name = "fileName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "fileName", IsRequired = true, EmitDefaultValue = false)] public string FileName { get; set; } /// /// Gets or Sets Md5 /// - [DataMember(Name = "md5", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "md5", IsRequired = true, EmitDefaultValue = false)] public string Md5 { get; set; } /// /// Gets or Sets SizeInBytes /// - [DataMember(Name = "sizeInBytes", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sizeInBytes", IsRequired = true, EmitDefaultValue = false)] public int SizeInBytes { get; set; } /// /// Gets or Sets UploadId /// - [DataMember(Name = "uploadId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "uploadId", IsRequired = true, EmitDefaultValue = false)] public string UploadId { get; set; } /// /// Gets or Sets Url /// - [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] public string Url { get; set; } /// @@ -151,7 +147,7 @@ protected FileData() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class FileData {\n"); sb.Append(" Category: ").Append(Category).Append("\n"); sb.Append(" FileName: ").Append(FileName).Append("\n"); @@ -191,9 +187,8 @@ public override bool Equals(object input) public bool Equals(FileData input) { if (input == null) - { return false; - } + return ( this.Category == input.Category || @@ -238,25 +233,17 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Category.GetHashCode(); + hashCode = hashCode * 59 + this.Category.GetHashCode(); if (this.FileName != null) - { - hashCode = (hashCode * 59) + this.FileName.GetHashCode(); - } + hashCode = hashCode * 59 + this.FileName.GetHashCode(); if (this.Md5 != null) - { - hashCode = (hashCode * 59) + this.Md5.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SizeInBytes.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); + hashCode = hashCode * 59 + this.Md5.GetHashCode(); + hashCode = hashCode * 59 + this.SizeInBytes.GetHashCode(); + hashCode = hashCode * 59 + this.Status.GetHashCode(); if (this.UploadId != null) - { - hashCode = (hashCode * 59) + this.UploadId.GetHashCode(); - } + hashCode = hashCode * 59 + this.UploadId.GetHashCode(); if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } + hashCode = hashCode * 59 + this.Url.GetHashCode(); return hashCode; } } @@ -269,31 +256,31 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // FileName (string) minLength - if (this.FileName != null && this.FileName.Length < 1) + if(this.FileName != null && this.FileName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FileName, length must be greater than 1.", new [] { "FileName" }); } // Md5 (string) minLength - if (this.Md5 != null && this.Md5.Length < 0) + if(this.Md5 != null && this.Md5.Length < 0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Md5, length must be greater than 0.", new [] { "Md5" }); } // SizeInBytes (int) minimum - if (this.SizeInBytes < (int)0) + if(this.SizeInBytes < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SizeInBytes, must be a value greater than or equal to 0.", new [] { "SizeInBytes" }); } // UploadId (string) minLength - if (this.UploadId != null && this.UploadId.Length < 0) + if(this.UploadId != null && this.UploadId.Length < 0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UploadId, length must be greater than 0.", new [] { "UploadId" }); } // Url (string) minLength - if (this.Url != null && this.Url.Length < 1) + if(this.Url != null && this.Url.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Url, length must be greater than 1.", new [] { "Url" }); } diff --git a/src/VRChat.API/Model/FileUploadURL.cs b/src/VRChat.API/Model/FileUploadURL.cs index 37277848..01090f0e 100644 --- a/src/VRChat.API/Model/FileUploadURL.cs +++ b/src/VRChat.API/Model/FileUploadURL.cs @@ -43,8 +43,7 @@ protected FileUploadURL() { } public FileUploadURL(string url = default(string)) { // to ensure "url" is required (not null) - if (url == null) - { + if (url == null) { throw new ArgumentNullException("url is a required property for FileUploadURL and cannot be null"); } this.Url = url; @@ -53,7 +52,7 @@ protected FileUploadURL() { } /// /// Gets or Sets Url /// - [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] public string Url { get; set; } /// @@ -62,7 +61,7 @@ protected FileUploadURL() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class FileUploadURL {\n"); sb.Append(" Url: ").Append(Url).Append("\n"); sb.Append("}\n"); @@ -96,9 +95,8 @@ public override bool Equals(object input) public bool Equals(FileUploadURL input) { if (input == null) - { return false; - } + return ( this.Url == input.Url || @@ -117,9 +115,7 @@ public override int GetHashCode() { int hashCode = 41; if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } + hashCode = hashCode * 59 + this.Url.GetHashCode(); return hashCode; } } @@ -132,7 +128,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Url (string) minLength - if (this.Url != null && this.Url.Length < 1) + if(this.Url != null && this.Url.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Url, length must be greater than 1.", new [] { "Url" }); } diff --git a/src/VRChat.API/Model/FileVersion.cs b/src/VRChat.API/Model/FileVersion.cs index ae53161a..1af2c746 100644 --- a/src/VRChat.API/Model/FileVersion.cs +++ b/src/VRChat.API/Model/FileVersion.cs @@ -35,7 +35,7 @@ public partial class FileVersion : IEquatable, IValidatableObject /// /// Gets or Sets Status /// - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] public FileStatus Status { get; set; } /// /// Initializes a new instance of the class. @@ -66,7 +66,7 @@ protected FileVersion() { } /// /// Gets or Sets CreatedAt /// - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] public DateTime CreatedAt { get; set; } /// @@ -98,7 +98,7 @@ protected FileVersion() { } /// Incremental version counter, can only be increased. /// /// Incremental version counter, can only be increased. - [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = false)] public int _Version { get; set; } /// @@ -107,7 +107,7 @@ protected FileVersion() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class FileVersion {\n"); sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); sb.Append(" Deleted: ").Append(Deleted).Append("\n"); @@ -147,9 +147,8 @@ public override bool Equals(object input) public bool Equals(FileVersion input) { if (input == null) - { return false; - } + return ( this.CreatedAt == input.CreatedAt || @@ -195,24 +194,16 @@ public override int GetHashCode() { int hashCode = 41; if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + hashCode = hashCode * 59 + this.Deleted.GetHashCode(); if (this.Delta != null) - { - hashCode = (hashCode * 59) + this.Delta.GetHashCode(); - } + hashCode = hashCode * 59 + this.Delta.GetHashCode(); if (this.File != null) - { - hashCode = (hashCode * 59) + this.File.GetHashCode(); - } + hashCode = hashCode * 59 + this.File.GetHashCode(); if (this.Signature != null) - { - hashCode = (hashCode * 59) + this.Signature.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this._Version.GetHashCode(); + hashCode = hashCode * 59 + this.Signature.GetHashCode(); + hashCode = hashCode * 59 + this.Status.GetHashCode(); + hashCode = hashCode * 59 + this._Version.GetHashCode(); return hashCode; } } @@ -225,7 +216,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // _Version (int) minimum - if (this._Version < (int)0) + if(this._Version < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Version, must be a value greater than or equal to 0.", new [] { "_Version" }); } diff --git a/src/VRChat.API/Model/FileVersionUploadStatus.cs b/src/VRChat.API/Model/FileVersionUploadStatus.cs index 7f41a30f..06342d38 100644 --- a/src/VRChat.API/Model/FileVersionUploadStatus.cs +++ b/src/VRChat.API/Model/FileVersionUploadStatus.cs @@ -48,28 +48,24 @@ protected FileVersionUploadStatus() { } public FileVersionUploadStatus(string uploadId = default(string), string fileName = default(string), decimal nextPartNumber = default(decimal), decimal maxParts = default(decimal), List parts = default(List), List etags = default(List)) { // to ensure "uploadId" is required (not null) - if (uploadId == null) - { + if (uploadId == null) { throw new ArgumentNullException("uploadId is a required property for FileVersionUploadStatus and cannot be null"); } this.UploadId = uploadId; // to ensure "fileName" is required (not null) - if (fileName == null) - { + if (fileName == null) { throw new ArgumentNullException("fileName is a required property for FileVersionUploadStatus and cannot be null"); } this.FileName = fileName; this.NextPartNumber = nextPartNumber; this.MaxParts = maxParts; // to ensure "parts" is required (not null) - if (parts == null) - { + if (parts == null) { throw new ArgumentNullException("parts is a required property for FileVersionUploadStatus and cannot be null"); } this.Parts = parts; // to ensure "etags" is required (not null) - if (etags == null) - { + if (etags == null) { throw new ArgumentNullException("etags is a required property for FileVersionUploadStatus and cannot be null"); } this.Etags = etags; @@ -78,38 +74,38 @@ protected FileVersionUploadStatus() { } /// /// Gets or Sets UploadId /// - [DataMember(Name = "uploadId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "uploadId", IsRequired = true, EmitDefaultValue = false)] public string UploadId { get; set; } /// /// Gets or Sets FileName /// - [DataMember(Name = "fileName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "fileName", IsRequired = true, EmitDefaultValue = false)] public string FileName { get; set; } /// /// Gets or Sets NextPartNumber /// - [DataMember(Name = "nextPartNumber", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "nextPartNumber", IsRequired = true, EmitDefaultValue = false)] public decimal NextPartNumber { get; set; } /// /// Gets or Sets MaxParts /// - [DataMember(Name = "maxParts", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "maxParts", IsRequired = true, EmitDefaultValue = false)] public decimal MaxParts { get; set; } /// /// Gets or Sets Parts /// - [DataMember(Name = "parts", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "parts", IsRequired = true, EmitDefaultValue = false)] public List Parts { get; set; } /// /// Unknown /// /// Unknown - [DataMember(Name = "etags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "etags", IsRequired = true, EmitDefaultValue = false)] public List Etags { get; set; } /// @@ -118,7 +114,7 @@ protected FileVersionUploadStatus() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class FileVersionUploadStatus {\n"); sb.Append(" UploadId: ").Append(UploadId).Append("\n"); sb.Append(" FileName: ").Append(FileName).Append("\n"); @@ -157,9 +153,8 @@ public override bool Equals(object input) public bool Equals(FileVersionUploadStatus input) { if (input == null) - { return false; - } + return ( this.UploadId == input.UploadId || @@ -203,23 +198,15 @@ public override int GetHashCode() { int hashCode = 41; if (this.UploadId != null) - { - hashCode = (hashCode * 59) + this.UploadId.GetHashCode(); - } + hashCode = hashCode * 59 + this.UploadId.GetHashCode(); if (this.FileName != null) - { - hashCode = (hashCode * 59) + this.FileName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NextPartNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.MaxParts.GetHashCode(); + hashCode = hashCode * 59 + this.FileName.GetHashCode(); + hashCode = hashCode * 59 + this.NextPartNumber.GetHashCode(); + hashCode = hashCode * 59 + this.MaxParts.GetHashCode(); if (this.Parts != null) - { - hashCode = (hashCode * 59) + this.Parts.GetHashCode(); - } + hashCode = hashCode * 59 + this.Parts.GetHashCode(); if (this.Etags != null) - { - hashCode = (hashCode * 59) + this.Etags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Etags.GetHashCode(); return hashCode; } } @@ -232,25 +219,25 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // UploadId (string) minLength - if (this.UploadId != null && this.UploadId.Length < 1) + if(this.UploadId != null && this.UploadId.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UploadId, length must be greater than 1.", new [] { "UploadId" }); } // FileName (string) minLength - if (this.FileName != null && this.FileName.Length < 1) + if(this.FileName != null && this.FileName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FileName, length must be greater than 1.", new [] { "FileName" }); } // NextPartNumber (decimal) minimum - if (this.NextPartNumber < (decimal)0) + if(this.NextPartNumber < (decimal)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for NextPartNumber, must be a value greater than or equal to 0.", new [] { "NextPartNumber" }); } // MaxParts (decimal) minimum - if (this.MaxParts < (decimal)1) + if(this.MaxParts < (decimal)1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MaxParts, must be a value greater than or equal to 1.", new [] { "MaxParts" }); } diff --git a/src/VRChat.API/Model/FinishFileDataUploadRequest.cs b/src/VRChat.API/Model/FinishFileDataUploadRequest.cs index f66ad261..f3b36a76 100644 --- a/src/VRChat.API/Model/FinishFileDataUploadRequest.cs +++ b/src/VRChat.API/Model/FinishFileDataUploadRequest.cs @@ -45,14 +45,12 @@ protected FinishFileDataUploadRequest() { } public FinishFileDataUploadRequest(List etags = default(List), string nextPartNumber = "0", string maxParts = "0") { // to ensure "nextPartNumber" is required (not null) - if (nextPartNumber == null) - { + if (nextPartNumber == null) { throw new ArgumentNullException("nextPartNumber is a required property for FinishFileDataUploadRequest and cannot be null"); } this.NextPartNumber = nextPartNumber; // to ensure "maxParts" is required (not null) - if (maxParts == null) - { + if (maxParts == null) { throw new ArgumentNullException("maxParts is a required property for FinishFileDataUploadRequest and cannot be null"); } this.MaxParts = maxParts; @@ -70,7 +68,7 @@ protected FinishFileDataUploadRequest() { } /// Always a zero in string form, despite how many parts uploaded. /// /// Always a zero in string form, despite how many parts uploaded. - [DataMember(Name = "nextPartNumber", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "nextPartNumber", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string NextPartNumber { get; set; } @@ -78,7 +76,7 @@ protected FinishFileDataUploadRequest() { } /// Always a zero in string form, despite how many parts uploaded. /// /// Always a zero in string form, despite how many parts uploaded. - [DataMember(Name = "maxParts", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "maxParts", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string MaxParts { get; set; } @@ -88,7 +86,7 @@ protected FinishFileDataUploadRequest() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class FinishFileDataUploadRequest {\n"); sb.Append(" Etags: ").Append(Etags).Append("\n"); sb.Append(" NextPartNumber: ").Append(NextPartNumber).Append("\n"); @@ -124,9 +122,8 @@ public override bool Equals(object input) public bool Equals(FinishFileDataUploadRequest input) { if (input == null) - { return false; - } + return ( this.Etags == input.Etags || @@ -156,17 +153,11 @@ public override int GetHashCode() { int hashCode = 41; if (this.Etags != null) - { - hashCode = (hashCode * 59) + this.Etags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Etags.GetHashCode(); if (this.NextPartNumber != null) - { - hashCode = (hashCode * 59) + this.NextPartNumber.GetHashCode(); - } + hashCode = hashCode * 59 + this.NextPartNumber.GetHashCode(); if (this.MaxParts != null) - { - hashCode = (hashCode * 59) + this.MaxParts.GetHashCode(); - } + hashCode = hashCode * 59 + this.MaxParts.GetHashCode(); return hashCode; } } @@ -179,13 +170,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // NextPartNumber (string) maxLength - if (this.NextPartNumber != null && this.NextPartNumber.Length > 1) + if(this.NextPartNumber != null && this.NextPartNumber.Length > 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for NextPartNumber, length must be less than 1.", new [] { "NextPartNumber" }); } // NextPartNumber (string) minLength - if (this.NextPartNumber != null && this.NextPartNumber.Length < 1) + if(this.NextPartNumber != null && this.NextPartNumber.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for NextPartNumber, length must be greater than 1.", new [] { "NextPartNumber" }); } @@ -198,13 +189,13 @@ public override int GetHashCode() } // MaxParts (string) maxLength - if (this.MaxParts != null && this.MaxParts.Length > 1) + if(this.MaxParts != null && this.MaxParts.Length > 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MaxParts, length must be less than 1.", new [] { "MaxParts" }); } // MaxParts (string) minLength - if (this.MaxParts != null && this.MaxParts.Length < 1) + if(this.MaxParts != null && this.MaxParts.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MaxParts, length must be greater than 1.", new [] { "MaxParts" }); } diff --git a/src/VRChat.API/Model/FriendStatus.cs b/src/VRChat.API/Model/FriendStatus.cs index f0abf5ff..5553a749 100644 --- a/src/VRChat.API/Model/FriendStatus.cs +++ b/src/VRChat.API/Model/FriendStatus.cs @@ -73,7 +73,7 @@ public FriendStatus(bool incomingRequest = false, bool isFriend = false, bool ou /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class FriendStatus {\n"); sb.Append(" IncomingRequest: ").Append(IncomingRequest).Append("\n"); sb.Append(" IsFriend: ").Append(IsFriend).Append("\n"); @@ -109,9 +109,8 @@ public override bool Equals(object input) public bool Equals(FriendStatus input) { if (input == null) - { return false; - } + return ( this.IncomingRequest == input.IncomingRequest || @@ -136,9 +135,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.IncomingRequest.GetHashCode(); - hashCode = (hashCode * 59) + this.IsFriend.GetHashCode(); - hashCode = (hashCode * 59) + this.OutgoingRequest.GetHashCode(); + hashCode = hashCode * 59 + this.IncomingRequest.GetHashCode(); + hashCode = hashCode * 59 + this.IsFriend.GetHashCode(); + hashCode = hashCode * 59 + this.OutgoingRequest.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/Group.cs b/src/VRChat.API/Model/Group.cs new file mode 100644 index 00000000..7bf68598 --- /dev/null +++ b/src/VRChat.API/Model/Group.cs @@ -0,0 +1,525 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// Group + /// + [DataContract(Name = "Group")] + public partial class Group : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets Privacy + /// + [DataMember(Name = "privacy", EmitDefaultValue = false)] + public GroupPrivacy? Privacy { get; set; } + + /// + /// Gets or Sets JoinState + /// + [DataMember(Name = "joinState", EmitDefaultValue = false)] + public GroupJoinState? JoinState { get; set; } + + /// + /// Gets or Sets MembershipStatus + /// + [DataMember(Name = "membershipStatus", EmitDefaultValue = false)] + public GroupMemberStatus? MembershipStatus { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// id. + /// name. + /// shortCode. + /// discriminator. + /// description. + /// iconUrl. + /// bannerUrl. + /// privacy. + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.. + /// rules. + /// links. + /// languages. + /// iconId. + /// bannerId. + /// memberCount. + /// memberCountSyncedAt. + /// isVerified (default to false). + /// joinState. + /// tags. + /// galleries. + /// createdAt. + /// onlineMemberCount. + /// membershipStatus. + /// myMember. + /// Only returned if ?includeRoles=true is specified.. + public Group(string id = default(string), string name = default(string), string shortCode = default(string), string discriminator = default(string), string description = default(string), string iconUrl = default(string), string bannerUrl = default(string), GroupPrivacy? privacy = default(GroupPrivacy?), string ownerId = default(string), string rules = default(string), List links = default(List), List languages = default(List), string iconId = default(string), string bannerId = default(string), int memberCount = default(int), DateTime memberCountSyncedAt = default(DateTime), bool isVerified = false, GroupJoinState? joinState = default(GroupJoinState?), List tags = default(List), List galleries = default(List), DateTime createdAt = default(DateTime), int onlineMemberCount = default(int), GroupMemberStatus? membershipStatus = default(GroupMemberStatus?), GroupMyMember myMember = default(GroupMyMember), List roles = default(List)) + { + this.Id = id; + this.Name = name; + this.ShortCode = shortCode; + this.Discriminator = discriminator; + this.Description = description; + this.IconUrl = iconUrl; + this.BannerUrl = bannerUrl; + this.Privacy = privacy; + this.OwnerId = ownerId; + this.Rules = rules; + this.Links = links; + this.Languages = languages; + this.IconId = iconId; + this.BannerId = bannerId; + this.MemberCount = memberCount; + this.MemberCountSyncedAt = memberCountSyncedAt; + this.IsVerified = isVerified; + this.JoinState = joinState; + this.Tags = tags; + this.Galleries = galleries; + this.CreatedAt = createdAt; + this.OnlineMemberCount = onlineMemberCount; + this.MembershipStatus = membershipStatus; + this.MyMember = myMember; + this.Roles = roles; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets ShortCode + /// + [DataMember(Name = "shortCode", EmitDefaultValue = false)] + public string ShortCode { get; set; } + + /// + /// Gets or Sets Discriminator + /// + [DataMember(Name = "discriminator", EmitDefaultValue = false)] + public string Discriminator { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Gets or Sets IconUrl + /// + [DataMember(Name = "iconUrl", EmitDefaultValue = true)] + public string IconUrl { get; set; } + + /// + /// Gets or Sets BannerUrl + /// + [DataMember(Name = "bannerUrl", EmitDefaultValue = true)] + public string BannerUrl { get; set; } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "ownerId", EmitDefaultValue = false)] + public string OwnerId { get; set; } + + /// + /// Gets or Sets Rules + /// + [DataMember(Name = "rules", EmitDefaultValue = true)] + public string Rules { get; set; } + + /// + /// Gets or Sets Links + /// + [DataMember(Name = "links", EmitDefaultValue = false)] + public List Links { get; set; } + + /// + /// Gets or Sets Languages + /// + [DataMember(Name = "languages", EmitDefaultValue = false)] + public List Languages { get; set; } + + /// + /// Gets or Sets IconId + /// + [DataMember(Name = "iconId", EmitDefaultValue = true)] + public string IconId { get; set; } + + /// + /// Gets or Sets BannerId + /// + [DataMember(Name = "bannerId", EmitDefaultValue = true)] + public string BannerId { get; set; } + + /// + /// Gets or Sets MemberCount + /// + [DataMember(Name = "memberCount", EmitDefaultValue = false)] + public int MemberCount { get; set; } + + /// + /// Gets or Sets MemberCountSyncedAt + /// + [DataMember(Name = "memberCountSyncedAt", EmitDefaultValue = false)] + public DateTime MemberCountSyncedAt { get; set; } + + /// + /// Gets or Sets IsVerified + /// + [DataMember(Name = "isVerified", EmitDefaultValue = true)] + public bool IsVerified { get; set; } + + /// + /// Gets or Sets Tags + /// + [DataMember(Name = "tags", EmitDefaultValue = false)] + public List Tags { get; set; } + + /// + /// Gets or Sets Galleries + /// + [DataMember(Name = "galleries", EmitDefaultValue = false)] + public List Galleries { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", EmitDefaultValue = false)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets OnlineMemberCount + /// + [DataMember(Name = "onlineMemberCount", EmitDefaultValue = false)] + public int OnlineMemberCount { get; set; } + + /// + /// Gets or Sets MyMember + /// + [DataMember(Name = "myMember", EmitDefaultValue = false)] + public GroupMyMember MyMember { get; set; } + + /// + /// Only returned if ?includeRoles=true is specified. + /// + /// Only returned if ?includeRoles=true is specified. + [DataMember(Name = "roles", EmitDefaultValue = true)] + public List Roles { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Group {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" ShortCode: ").Append(ShortCode).Append("\n"); + sb.Append(" Discriminator: ").Append(Discriminator).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" IconUrl: ").Append(IconUrl).Append("\n"); + sb.Append(" BannerUrl: ").Append(BannerUrl).Append("\n"); + sb.Append(" Privacy: ").Append(Privacy).Append("\n"); + sb.Append(" OwnerId: ").Append(OwnerId).Append("\n"); + sb.Append(" Rules: ").Append(Rules).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Languages: ").Append(Languages).Append("\n"); + sb.Append(" IconId: ").Append(IconId).Append("\n"); + sb.Append(" BannerId: ").Append(BannerId).Append("\n"); + sb.Append(" MemberCount: ").Append(MemberCount).Append("\n"); + sb.Append(" MemberCountSyncedAt: ").Append(MemberCountSyncedAt).Append("\n"); + sb.Append(" IsVerified: ").Append(IsVerified).Append("\n"); + sb.Append(" JoinState: ").Append(JoinState).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" Galleries: ").Append(Galleries).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" OnlineMemberCount: ").Append(OnlineMemberCount).Append("\n"); + sb.Append(" MembershipStatus: ").Append(MembershipStatus).Append("\n"); + sb.Append(" MyMember: ").Append(MyMember).Append("\n"); + sb.Append(" Roles: ").Append(Roles).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Group); + } + + /// + /// Returns true if Group instances are equal + /// + /// Instance of Group to be compared + /// Boolean + public bool Equals(Group input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.ShortCode == input.ShortCode || + (this.ShortCode != null && + this.ShortCode.Equals(input.ShortCode)) + ) && + ( + this.Discriminator == input.Discriminator || + (this.Discriminator != null && + this.Discriminator.Equals(input.Discriminator)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.IconUrl == input.IconUrl || + (this.IconUrl != null && + this.IconUrl.Equals(input.IconUrl)) + ) && + ( + this.BannerUrl == input.BannerUrl || + (this.BannerUrl != null && + this.BannerUrl.Equals(input.BannerUrl)) + ) && + ( + this.Privacy == input.Privacy || + this.Privacy.Equals(input.Privacy) + ) && + ( + this.OwnerId == input.OwnerId || + (this.OwnerId != null && + this.OwnerId.Equals(input.OwnerId)) + ) && + ( + this.Rules == input.Rules || + (this.Rules != null && + this.Rules.Equals(input.Rules)) + ) && + ( + this.Links == input.Links || + this.Links != null && + input.Links != null && + this.Links.SequenceEqual(input.Links) + ) && + ( + this.Languages == input.Languages || + this.Languages != null && + input.Languages != null && + this.Languages.SequenceEqual(input.Languages) + ) && + ( + this.IconId == input.IconId || + (this.IconId != null && + this.IconId.Equals(input.IconId)) + ) && + ( + this.BannerId == input.BannerId || + (this.BannerId != null && + this.BannerId.Equals(input.BannerId)) + ) && + ( + this.MemberCount == input.MemberCount || + this.MemberCount.Equals(input.MemberCount) + ) && + ( + this.MemberCountSyncedAt == input.MemberCountSyncedAt || + (this.MemberCountSyncedAt != null && + this.MemberCountSyncedAt.Equals(input.MemberCountSyncedAt)) + ) && + ( + this.IsVerified == input.IsVerified || + this.IsVerified.Equals(input.IsVerified) + ) && + ( + this.JoinState == input.JoinState || + this.JoinState.Equals(input.JoinState) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ) && + ( + this.Galleries == input.Galleries || + this.Galleries != null && + input.Galleries != null && + this.Galleries.SequenceEqual(input.Galleries) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.OnlineMemberCount == input.OnlineMemberCount || + this.OnlineMemberCount.Equals(input.OnlineMemberCount) + ) && + ( + this.MembershipStatus == input.MembershipStatus || + this.MembershipStatus.Equals(input.MembershipStatus) + ) && + ( + this.MyMember == input.MyMember || + (this.MyMember != null && + this.MyMember.Equals(input.MyMember)) + ) && + ( + this.Roles == input.Roles || + this.Roles != null && + input.Roles != null && + this.Roles.SequenceEqual(input.Roles) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.ShortCode != null) + hashCode = hashCode * 59 + this.ShortCode.GetHashCode(); + if (this.Discriminator != null) + hashCode = hashCode * 59 + this.Discriminator.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.IconUrl != null) + hashCode = hashCode * 59 + this.IconUrl.GetHashCode(); + if (this.BannerUrl != null) + hashCode = hashCode * 59 + this.BannerUrl.GetHashCode(); + hashCode = hashCode * 59 + this.Privacy.GetHashCode(); + if (this.OwnerId != null) + hashCode = hashCode * 59 + this.OwnerId.GetHashCode(); + if (this.Rules != null) + hashCode = hashCode * 59 + this.Rules.GetHashCode(); + if (this.Links != null) + hashCode = hashCode * 59 + this.Links.GetHashCode(); + if (this.Languages != null) + hashCode = hashCode * 59 + this.Languages.GetHashCode(); + if (this.IconId != null) + hashCode = hashCode * 59 + this.IconId.GetHashCode(); + if (this.BannerId != null) + hashCode = hashCode * 59 + this.BannerId.GetHashCode(); + hashCode = hashCode * 59 + this.MemberCount.GetHashCode(); + if (this.MemberCountSyncedAt != null) + hashCode = hashCode * 59 + this.MemberCountSyncedAt.GetHashCode(); + hashCode = hashCode * 59 + this.IsVerified.GetHashCode(); + hashCode = hashCode * 59 + this.JoinState.GetHashCode(); + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + if (this.Galleries != null) + hashCode = hashCode * 59 + this.Galleries.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + hashCode = hashCode * 59 + this.OnlineMemberCount.GetHashCode(); + hashCode = hashCode * 59 + this.MembershipStatus.GetHashCode(); + if (this.MyMember != null) + hashCode = hashCode * 59 + this.MyMember.GetHashCode(); + if (this.Roles != null) + hashCode = hashCode * 59 + this.Roles.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Id (string) pattern + Regex regexId = new Regex(@"grp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexId.Match(this.Id).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, must match a pattern of " + regexId, new [] { "Id" }); + } + + // ShortCode (string) pattern + Regex regexShortCode = new Regex(@"^[A-Z0-9]{3,6}$", RegexOptions.CultureInvariant); + if (false == regexShortCode.Match(this.ShortCode).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShortCode, must match a pattern of " + regexShortCode, new [] { "ShortCode" }); + } + + // Discriminator (string) pattern + Regex regexDiscriminator = new Regex(@"^[0-9]{4}$", RegexOptions.CultureInvariant); + if (false == regexDiscriminator.Match(this.Discriminator).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Discriminator, must match a pattern of " + regexDiscriminator, new [] { "Discriminator" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/GroupAnnouncement.cs b/src/VRChat.API/Model/GroupAnnouncement.cs new file mode 100644 index 00000000..bc5b5522 --- /dev/null +++ b/src/VRChat.API/Model/GroupAnnouncement.cs @@ -0,0 +1,275 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// GroupAnnouncement + /// + [DataContract(Name = "GroupAnnouncement")] + public partial class GroupAnnouncement : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// groupId. + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.. + /// title. + /// text. + /// imageId. + /// imageUrl. + /// createdAt. + /// updatedAt. + public GroupAnnouncement(string id = default(string), string groupId = default(string), string authorId = default(string), string title = default(string), string text = default(string), string imageId = default(string), string imageUrl = default(string), DateTime? createdAt = default(DateTime?), DateTime? updatedAt = default(DateTime?)) + { + this.Id = id; + this.GroupId = groupId; + this.AuthorId = authorId; + this.Title = title; + this.Text = text; + this.ImageId = imageId; + this.ImageUrl = imageUrl; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Gets or Sets GroupId + /// + [DataMember(Name = "groupId", EmitDefaultValue = false)] + public string GroupId { get; set; } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "authorId", EmitDefaultValue = false)] + public string AuthorId { get; set; } + + /// + /// Gets or Sets Title + /// + [DataMember(Name = "title", EmitDefaultValue = true)] + public string Title { get; set; } + + /// + /// Gets or Sets Text + /// + [DataMember(Name = "text", EmitDefaultValue = true)] + public string Text { get; set; } + + /// + /// Gets or Sets ImageId + /// + [DataMember(Name = "imageId", EmitDefaultValue = false)] + public string ImageId { get; set; } + + /// + /// Gets or Sets ImageUrl + /// + [DataMember(Name = "imageUrl", EmitDefaultValue = true)] + public string ImageUrl { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", EmitDefaultValue = true)] + public DateTime? CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", EmitDefaultValue = true)] + public DateTime? UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GroupAnnouncement {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" AuthorId: ").Append(AuthorId).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" ImageId: ").Append(ImageId).Append("\n"); + sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupAnnouncement); + } + + /// + /// Returns true if GroupAnnouncement instances are equal + /// + /// Instance of GroupAnnouncement to be compared + /// Boolean + public bool Equals(GroupAnnouncement input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.AuthorId == input.AuthorId || + (this.AuthorId != null && + this.AuthorId.Equals(input.AuthorId)) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.Text == input.Text || + (this.Text != null && + this.Text.Equals(input.Text)) + ) && + ( + this.ImageId == input.ImageId || + (this.ImageId != null && + this.ImageId.Equals(input.ImageId)) + ) && + ( + this.ImageUrl == input.ImageUrl || + (this.ImageUrl != null && + this.ImageUrl.Equals(input.ImageUrl)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.GroupId != null) + hashCode = hashCode * 59 + this.GroupId.GetHashCode(); + if (this.AuthorId != null) + hashCode = hashCode * 59 + this.AuthorId.GetHashCode(); + if (this.Title != null) + hashCode = hashCode * 59 + this.Title.GetHashCode(); + if (this.Text != null) + hashCode = hashCode * 59 + this.Text.GetHashCode(); + if (this.ImageId != null) + hashCode = hashCode * 59 + this.ImageId.GetHashCode(); + if (this.ImageUrl != null) + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.UpdatedAt != null) + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Id (string) pattern + Regex regexId = new Regex(@"gpos_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexId.Match(this.Id).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, must match a pattern of " + regexId, new [] { "Id" }); + } + + // GroupId (string) pattern + Regex regexGroupId = new Regex(@"grp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexGroupId.Match(this.GroupId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GroupId, must match a pattern of " + regexGroupId, new [] { "GroupId" }); + } + + // ImageId (string) pattern + Regex regexImageId = new Regex(@"file_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexImageId.Match(this.ImageId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImageId, must match a pattern of " + regexImageId, new [] { "ImageId" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/GroupAuditLogEntry.cs b/src/VRChat.API/Model/GroupAuditLogEntry.cs new file mode 100644 index 00000000..3eac738c --- /dev/null +++ b/src/VRChat.API/Model/GroupAuditLogEntry.cs @@ -0,0 +1,273 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// GroupAuditLogEntry + /// + [DataContract(Name = "GroupAuditLogEntry")] + public partial class GroupAuditLogEntry : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// createdAt. + /// groupId. + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.. + /// actorDisplayname. + /// Typically GroupID or GroupRoleID, but could be other types of IDs.. + /// 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 to "group.update"). + /// A human-readable description of the event.. + /// The data associated with the event. The format of this data is dependent on the event type.. + public GroupAuditLogEntry(string id = default(string), DateTime createdAt = default(DateTime), string groupId = default(string), string actorId = default(string), string actorDisplayname = default(string), string targetId = default(string), string eventType = "group.update", string description = default(string), Object data = default(Object)) + { + this.Id = id; + this.CreatedAt = createdAt; + this.GroupId = groupId; + this.ActorId = actorId; + this.ActorDisplayname = actorDisplayname; + this.TargetId = targetId; + // use default value if no "eventType" provided + this.EventType = eventType ?? "group.update"; + this.Description = description; + this.Data = data; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "created_at", EmitDefaultValue = false)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets GroupId + /// + [DataMember(Name = "groupId", EmitDefaultValue = false)] + public string GroupId { get; set; } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "actorId", EmitDefaultValue = false)] + public string ActorId { get; set; } + + /// + /// Gets or Sets ActorDisplayname + /// + [DataMember(Name = "actorDisplayname", EmitDefaultValue = false)] + public string ActorDisplayname { get; set; } + + /// + /// Typically GroupID or GroupRoleID, but could be other types of IDs. + /// + /// Typically GroupID or GroupRoleID, but could be other types of IDs. + [DataMember(Name = "targetId", EmitDefaultValue = false)] + public string TargetId { get; set; } + + /// + /// 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`. + /// + /// 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`. + [DataMember(Name = "eventType", EmitDefaultValue = false)] + public string EventType { get; set; } + + /// + /// A human-readable description of the event. + /// + /// A human-readable description of the event. + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// The data associated with the event. The format of this data is dependent on the event type. + /// + /// The data associated with the event. The format of this data is dependent on the event type. + [DataMember(Name = "data", EmitDefaultValue = false)] + public Object Data { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GroupAuditLogEntry {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" ActorId: ").Append(ActorId).Append("\n"); + sb.Append(" ActorDisplayname: ").Append(ActorDisplayname).Append("\n"); + sb.Append(" TargetId: ").Append(TargetId).Append("\n"); + sb.Append(" EventType: ").Append(EventType).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupAuditLogEntry); + } + + /// + /// Returns true if GroupAuditLogEntry instances are equal + /// + /// Instance of GroupAuditLogEntry to be compared + /// Boolean + public bool Equals(GroupAuditLogEntry input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.ActorId == input.ActorId || + (this.ActorId != null && + this.ActorId.Equals(input.ActorId)) + ) && + ( + this.ActorDisplayname == input.ActorDisplayname || + (this.ActorDisplayname != null && + this.ActorDisplayname.Equals(input.ActorDisplayname)) + ) && + ( + this.TargetId == input.TargetId || + (this.TargetId != null && + this.TargetId.Equals(input.TargetId)) + ) && + ( + this.EventType == input.EventType || + (this.EventType != null && + this.EventType.Equals(input.EventType)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Data == input.Data || + (this.Data != null && + this.Data.Equals(input.Data)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.GroupId != null) + hashCode = hashCode * 59 + this.GroupId.GetHashCode(); + if (this.ActorId != null) + hashCode = hashCode * 59 + this.ActorId.GetHashCode(); + if (this.ActorDisplayname != null) + hashCode = hashCode * 59 + this.ActorDisplayname.GetHashCode(); + if (this.TargetId != null) + hashCode = hashCode * 59 + this.TargetId.GetHashCode(); + if (this.EventType != null) + hashCode = hashCode * 59 + this.EventType.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Data != null) + hashCode = hashCode * 59 + this.Data.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Id (string) pattern + Regex regexId = new Regex(@"gaud_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexId.Match(this.Id).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, must match a pattern of " + regexId, new [] { "Id" }); + } + + // GroupId (string) pattern + Regex regexGroupId = new Regex(@"grp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexGroupId.Match(this.GroupId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GroupId, must match a pattern of " + regexGroupId, new [] { "GroupId" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/GroupGallery.cs b/src/VRChat.API/Model/GroupGallery.cs new file mode 100644 index 00000000..3d6abdd8 --- /dev/null +++ b/src/VRChat.API/Model/GroupGallery.cs @@ -0,0 +1,293 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// GroupGallery + /// + [DataContract(Name = "GroupGallery")] + public partial class GroupGallery : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// Name of the gallery.. + /// Description of the gallery.. + /// Whether the gallery is members only. (default to false). + /// roleIdsToView. + /// roleIdsToSubmit. + /// roleIdsToAutoApprove. + /// roleIdsToManage. + /// createdAt. + /// updatedAt. + public GroupGallery(string id = default(string), string name = default(string), string description = default(string), bool membersOnly = false, List roleIdsToView = default(List), List roleIdsToSubmit = default(List), List roleIdsToAutoApprove = default(List), List roleIdsToManage = default(List), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + this.Id = id; + this.Name = name; + this.Description = description; + this.MembersOnly = membersOnly; + this.RoleIdsToView = roleIdsToView; + this.RoleIdsToSubmit = roleIdsToSubmit; + this.RoleIdsToAutoApprove = roleIdsToAutoApprove; + this.RoleIdsToManage = roleIdsToManage; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Name of the gallery. + /// + /// Name of the gallery. + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Description of the gallery. + /// + /// Description of the gallery. + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Whether the gallery is members only. + /// + /// Whether the gallery is members only. + [DataMember(Name = "membersOnly", EmitDefaultValue = true)] + public bool MembersOnly { get; set; } + + /// + /// Gets or Sets RoleIdsToView + /// + [DataMember(Name = "roleIdsToView", EmitDefaultValue = true)] + public List RoleIdsToView { get; set; } + + /// + /// Gets or Sets RoleIdsToSubmit + /// + [DataMember(Name = "roleIdsToSubmit", EmitDefaultValue = true)] + public List RoleIdsToSubmit { get; set; } + + /// + /// Gets or Sets RoleIdsToAutoApprove + /// + [DataMember(Name = "roleIdsToAutoApprove", EmitDefaultValue = true)] + public List RoleIdsToAutoApprove { get; set; } + + /// + /// Gets or Sets RoleIdsToManage + /// + [DataMember(Name = "roleIdsToManage", EmitDefaultValue = true)] + public List RoleIdsToManage { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", EmitDefaultValue = false)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", EmitDefaultValue = false)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GroupGallery {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" MembersOnly: ").Append(MembersOnly).Append("\n"); + sb.Append(" RoleIdsToView: ").Append(RoleIdsToView).Append("\n"); + sb.Append(" RoleIdsToSubmit: ").Append(RoleIdsToSubmit).Append("\n"); + sb.Append(" RoleIdsToAutoApprove: ").Append(RoleIdsToAutoApprove).Append("\n"); + sb.Append(" RoleIdsToManage: ").Append(RoleIdsToManage).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupGallery); + } + + /// + /// Returns true if GroupGallery instances are equal + /// + /// Instance of GroupGallery to be compared + /// Boolean + public bool Equals(GroupGallery input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.MembersOnly == input.MembersOnly || + this.MembersOnly.Equals(input.MembersOnly) + ) && + ( + this.RoleIdsToView == input.RoleIdsToView || + this.RoleIdsToView != null && + input.RoleIdsToView != null && + this.RoleIdsToView.SequenceEqual(input.RoleIdsToView) + ) && + ( + this.RoleIdsToSubmit == input.RoleIdsToSubmit || + this.RoleIdsToSubmit != null && + input.RoleIdsToSubmit != null && + this.RoleIdsToSubmit.SequenceEqual(input.RoleIdsToSubmit) + ) && + ( + this.RoleIdsToAutoApprove == input.RoleIdsToAutoApprove || + this.RoleIdsToAutoApprove != null && + input.RoleIdsToAutoApprove != null && + this.RoleIdsToAutoApprove.SequenceEqual(input.RoleIdsToAutoApprove) + ) && + ( + this.RoleIdsToManage == input.RoleIdsToManage || + this.RoleIdsToManage != null && + input.RoleIdsToManage != null && + this.RoleIdsToManage.SequenceEqual(input.RoleIdsToManage) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.MembersOnly.GetHashCode(); + if (this.RoleIdsToView != null) + hashCode = hashCode * 59 + this.RoleIdsToView.GetHashCode(); + if (this.RoleIdsToSubmit != null) + hashCode = hashCode * 59 + this.RoleIdsToSubmit.GetHashCode(); + if (this.RoleIdsToAutoApprove != null) + hashCode = hashCode * 59 + this.RoleIdsToAutoApprove.GetHashCode(); + if (this.RoleIdsToManage != null) + hashCode = hashCode * 59 + this.RoleIdsToManage.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.UpdatedAt != null) + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Id (string) pattern + Regex regexId = new Regex(@"grp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexId.Match(this.Id).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, must match a pattern of " + regexId, new [] { "Id" }); + } + + // Name (string) minLength + if(this.Name != null && this.Name.Length < 1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); + } + + // Description (string) minLength + if(this.Description != null && this.Description.Length < 0) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 0.", new [] { "Description" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/GroupGalleryImage.cs b/src/VRChat.API/Model/GroupGalleryImage.cs new file mode 100644 index 00000000..8be6144b --- /dev/null +++ b/src/VRChat.API/Model/GroupGalleryImage.cs @@ -0,0 +1,297 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// GroupGalleryImage + /// + [DataContract(Name = "GroupGalleryImage")] + public partial class GroupGalleryImage : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// groupId. + /// galleryId. + /// fileId. + /// imageUrl. + /// createdAt. + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.. + /// approved (default to false). + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.. + /// approvedAt. + public GroupGalleryImage(string id = default(string), string groupId = default(string), string galleryId = default(string), string fileId = default(string), string imageUrl = default(string), DateTime createdAt = default(DateTime), string submittedByUserId = default(string), bool approved = false, string approvedByUserId = default(string), DateTime approvedAt = default(DateTime)) + { + this.Id = id; + this.GroupId = groupId; + this.GalleryId = galleryId; + this.FileId = fileId; + this.ImageUrl = imageUrl; + this.CreatedAt = createdAt; + this.SubmittedByUserId = submittedByUserId; + this.Approved = approved; + this.ApprovedByUserId = approvedByUserId; + this.ApprovedAt = approvedAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Gets or Sets GroupId + /// + [DataMember(Name = "groupId", EmitDefaultValue = false)] + public string GroupId { get; set; } + + /// + /// Gets or Sets GalleryId + /// + [DataMember(Name = "galleryId", EmitDefaultValue = false)] + public string GalleryId { get; set; } + + /// + /// Gets or Sets FileId + /// + [DataMember(Name = "fileId", EmitDefaultValue = false)] + public string FileId { get; set; } + + /// + /// Gets or Sets ImageUrl + /// + [DataMember(Name = "imageUrl", EmitDefaultValue = false)] + public string ImageUrl { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", EmitDefaultValue = false)] + public DateTime CreatedAt { get; set; } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "submittedByUserId", EmitDefaultValue = false)] + public string SubmittedByUserId { get; set; } + + /// + /// Gets or Sets Approved + /// + [DataMember(Name = "approved", EmitDefaultValue = true)] + public bool Approved { get; set; } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "approvedByUserId", EmitDefaultValue = false)] + public string ApprovedByUserId { get; set; } + + /// + /// Gets or Sets ApprovedAt + /// + [DataMember(Name = "approvedAt", EmitDefaultValue = false)] + public DateTime ApprovedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GroupGalleryImage {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" GalleryId: ").Append(GalleryId).Append("\n"); + sb.Append(" FileId: ").Append(FileId).Append("\n"); + sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" SubmittedByUserId: ").Append(SubmittedByUserId).Append("\n"); + sb.Append(" Approved: ").Append(Approved).Append("\n"); + sb.Append(" ApprovedByUserId: ").Append(ApprovedByUserId).Append("\n"); + sb.Append(" ApprovedAt: ").Append(ApprovedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupGalleryImage); + } + + /// + /// Returns true if GroupGalleryImage instances are equal + /// + /// Instance of GroupGalleryImage to be compared + /// Boolean + public bool Equals(GroupGalleryImage input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.GalleryId == input.GalleryId || + (this.GalleryId != null && + this.GalleryId.Equals(input.GalleryId)) + ) && + ( + this.FileId == input.FileId || + (this.FileId != null && + this.FileId.Equals(input.FileId)) + ) && + ( + this.ImageUrl == input.ImageUrl || + (this.ImageUrl != null && + this.ImageUrl.Equals(input.ImageUrl)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.SubmittedByUserId == input.SubmittedByUserId || + (this.SubmittedByUserId != null && + this.SubmittedByUserId.Equals(input.SubmittedByUserId)) + ) && + ( + this.Approved == input.Approved || + this.Approved.Equals(input.Approved) + ) && + ( + this.ApprovedByUserId == input.ApprovedByUserId || + (this.ApprovedByUserId != null && + this.ApprovedByUserId.Equals(input.ApprovedByUserId)) + ) && + ( + this.ApprovedAt == input.ApprovedAt || + (this.ApprovedAt != null && + this.ApprovedAt.Equals(input.ApprovedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.GroupId != null) + hashCode = hashCode * 59 + this.GroupId.GetHashCode(); + if (this.GalleryId != null) + hashCode = hashCode * 59 + this.GalleryId.GetHashCode(); + if (this.FileId != null) + hashCode = hashCode * 59 + this.FileId.GetHashCode(); + if (this.ImageUrl != null) + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.SubmittedByUserId != null) + hashCode = hashCode * 59 + this.SubmittedByUserId.GetHashCode(); + hashCode = hashCode * 59 + this.Approved.GetHashCode(); + if (this.ApprovedByUserId != null) + hashCode = hashCode * 59 + this.ApprovedByUserId.GetHashCode(); + if (this.ApprovedAt != null) + hashCode = hashCode * 59 + this.ApprovedAt.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Id (string) pattern + Regex regexId = new Regex(@"ggim_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexId.Match(this.Id).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, must match a pattern of " + regexId, new [] { "Id" }); + } + + // GroupId (string) pattern + Regex regexGroupId = new Regex(@"grp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexGroupId.Match(this.GroupId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GroupId, must match a pattern of " + regexGroupId, new [] { "GroupId" }); + } + + // GalleryId (string) pattern + Regex regexGalleryId = new Regex(@"grp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexGalleryId.Match(this.GalleryId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GalleryId, must match a pattern of " + regexGalleryId, new [] { "GalleryId" }); + } + + // FileId (string) pattern + Regex regexFileId = new Regex(@"file_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexFileId.Match(this.FileId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FileId, must match a pattern of " + regexFileId, new [] { "FileId" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/GroupJoinState.cs b/src/VRChat.API/Model/GroupJoinState.cs new file mode 100644 index 00000000..c79b8f8e --- /dev/null +++ b/src/VRChat.API/Model/GroupJoinState.cs @@ -0,0 +1,60 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// Defines GroupJoinState + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum GroupJoinState + { + /// + /// Enum Closed for value: closed + /// + [EnumMember(Value = "closed")] + Closed = 1, + + /// + /// Enum Invite for value: invite + /// + [EnumMember(Value = "invite")] + Invite = 2, + + /// + /// Enum Request for value: request + /// + [EnumMember(Value = "request")] + Request = 3, + + /// + /// Enum Open for value: open + /// + [EnumMember(Value = "open")] + Open = 4 + + } + +} diff --git a/src/VRChat.API/Model/GroupLimitedMember.cs b/src/VRChat.API/Model/GroupLimitedMember.cs new file mode 100644 index 00000000..24df00c0 --- /dev/null +++ b/src/VRChat.API/Model/GroupLimitedMember.cs @@ -0,0 +1,186 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// GroupLimitedMember + /// + [DataContract(Name = "GroupLimitedMember")] + public partial class GroupLimitedMember : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// groupId. + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.. + /// isRepresenting (default to false). + public GroupLimitedMember(string id = default(string), string groupId = default(string), string userId = default(string), bool isRepresenting = false) + { + this.Id = id; + this.GroupId = groupId; + this.UserId = userId; + this.IsRepresenting = isRepresenting; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Gets or Sets GroupId + /// + [DataMember(Name = "groupId", EmitDefaultValue = false)] + public string GroupId { get; set; } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "userId", EmitDefaultValue = false)] + public string UserId { get; set; } + + /// + /// Gets or Sets IsRepresenting + /// + [DataMember(Name = "isRepresenting", EmitDefaultValue = true)] + public bool IsRepresenting { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GroupLimitedMember {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" IsRepresenting: ").Append(IsRepresenting).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupLimitedMember); + } + + /// + /// Returns true if GroupLimitedMember instances are equal + /// + /// Instance of GroupLimitedMember to be compared + /// Boolean + public bool Equals(GroupLimitedMember input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.IsRepresenting == input.IsRepresenting || + this.IsRepresenting.Equals(input.IsRepresenting) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.GroupId != null) + hashCode = hashCode * 59 + this.GroupId.GetHashCode(); + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + hashCode = hashCode * 59 + this.IsRepresenting.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Id (string) pattern + Regex regexId = new Regex(@"gmem_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexId.Match(this.Id).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, must match a pattern of " + regexId, new [] { "Id" }); + } + + // GroupId (string) pattern + Regex regexGroupId = new Regex(@"grp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexGroupId.Match(this.GroupId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GroupId, must match a pattern of " + regexGroupId, new [] { "GroupId" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/GroupMember.cs b/src/VRChat.API/Model/GroupMember.cs new file mode 100644 index 00000000..512daa51 --- /dev/null +++ b/src/VRChat.API/Model/GroupMember.cs @@ -0,0 +1,333 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// GroupMember + /// + [DataContract(Name = "GroupMember")] + public partial class GroupMember : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// groupId. + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.. + /// Whether the user is representing the group. This makes the group show up above the name tag in-game. (default to false). + /// user. + /// roleIds. + /// joinedAt. + /// membershipStatus. + /// visibility. + /// isSubscribedToAnnouncements (default to false). + /// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user.. + /// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user.. + /// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user.. + public GroupMember(string id = default(string), string groupId = default(string), string userId = default(string), bool isRepresenting = false, GroupMemberLimitedUser user = default(GroupMemberLimitedUser), List roleIds = default(List), DateTime joinedAt = default(DateTime), string membershipStatus = default(string), string visibility = default(string), bool isSubscribedToAnnouncements = false, DateTime? createdAt = default(DateTime?), DateTime? bannedAt = default(DateTime?), string managerNotes = default(string)) + { + this.Id = id; + this.GroupId = groupId; + this.UserId = userId; + this.IsRepresenting = isRepresenting; + this.User = user; + this.RoleIds = roleIds; + this.JoinedAt = joinedAt; + this.MembershipStatus = membershipStatus; + this.Visibility = visibility; + this.IsSubscribedToAnnouncements = isSubscribedToAnnouncements; + this.CreatedAt = createdAt; + this.BannedAt = bannedAt; + this.ManagerNotes = managerNotes; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Gets or Sets GroupId + /// + [DataMember(Name = "groupId", EmitDefaultValue = false)] + public string GroupId { get; set; } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "userId", EmitDefaultValue = false)] + public string UserId { get; set; } + + /// + /// Whether the user is representing the group. This makes the group show up above the name tag in-game. + /// + /// Whether the user is representing the group. This makes the group show up above the name tag in-game. + [DataMember(Name = "isRepresenting", EmitDefaultValue = true)] + public bool IsRepresenting { get; set; } + + /// + /// Gets or Sets User + /// + [DataMember(Name = "user", EmitDefaultValue = false)] + public GroupMemberLimitedUser User { get; set; } + + /// + /// Gets or Sets RoleIds + /// + [DataMember(Name = "roleIds", EmitDefaultValue = false)] + public List RoleIds { get; set; } + + /// + /// Gets or Sets JoinedAt + /// + [DataMember(Name = "joinedAt", EmitDefaultValue = false)] + public DateTime JoinedAt { get; set; } + + /// + /// Gets or Sets MembershipStatus + /// + [DataMember(Name = "membershipStatus", EmitDefaultValue = false)] + public string MembershipStatus { get; set; } + + /// + /// Gets or Sets Visibility + /// + [DataMember(Name = "visibility", EmitDefaultValue = false)] + public string Visibility { get; set; } + + /// + /// Gets or Sets IsSubscribedToAnnouncements + /// + [DataMember(Name = "isSubscribedToAnnouncements", EmitDefaultValue = true)] + public bool IsSubscribedToAnnouncements { get; set; } + + /// + /// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + /// + /// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + [DataMember(Name = "createdAt", EmitDefaultValue = true)] + public DateTime? CreatedAt { get; set; } + + /// + /// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + /// + /// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + [DataMember(Name = "bannedAt", EmitDefaultValue = true)] + public DateTime? BannedAt { get; set; } + + /// + /// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + /// + /// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + [DataMember(Name = "managerNotes", EmitDefaultValue = true)] + public string ManagerNotes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GroupMember {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" IsRepresenting: ").Append(IsRepresenting).Append("\n"); + sb.Append(" User: ").Append(User).Append("\n"); + sb.Append(" RoleIds: ").Append(RoleIds).Append("\n"); + sb.Append(" JoinedAt: ").Append(JoinedAt).Append("\n"); + sb.Append(" MembershipStatus: ").Append(MembershipStatus).Append("\n"); + sb.Append(" Visibility: ").Append(Visibility).Append("\n"); + sb.Append(" IsSubscribedToAnnouncements: ").Append(IsSubscribedToAnnouncements).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" BannedAt: ").Append(BannedAt).Append("\n"); + sb.Append(" ManagerNotes: ").Append(ManagerNotes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupMember); + } + + /// + /// Returns true if GroupMember instances are equal + /// + /// Instance of GroupMember to be compared + /// Boolean + public bool Equals(GroupMember input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.IsRepresenting == input.IsRepresenting || + this.IsRepresenting.Equals(input.IsRepresenting) + ) && + ( + this.User == input.User || + (this.User != null && + this.User.Equals(input.User)) + ) && + ( + this.RoleIds == input.RoleIds || + this.RoleIds != null && + input.RoleIds != null && + this.RoleIds.SequenceEqual(input.RoleIds) + ) && + ( + this.JoinedAt == input.JoinedAt || + (this.JoinedAt != null && + this.JoinedAt.Equals(input.JoinedAt)) + ) && + ( + this.MembershipStatus == input.MembershipStatus || + (this.MembershipStatus != null && + this.MembershipStatus.Equals(input.MembershipStatus)) + ) && + ( + this.Visibility == input.Visibility || + (this.Visibility != null && + this.Visibility.Equals(input.Visibility)) + ) && + ( + this.IsSubscribedToAnnouncements == input.IsSubscribedToAnnouncements || + this.IsSubscribedToAnnouncements.Equals(input.IsSubscribedToAnnouncements) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.BannedAt == input.BannedAt || + (this.BannedAt != null && + this.BannedAt.Equals(input.BannedAt)) + ) && + ( + this.ManagerNotes == input.ManagerNotes || + (this.ManagerNotes != null && + this.ManagerNotes.Equals(input.ManagerNotes)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.GroupId != null) + hashCode = hashCode * 59 + this.GroupId.GetHashCode(); + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + hashCode = hashCode * 59 + this.IsRepresenting.GetHashCode(); + if (this.User != null) + hashCode = hashCode * 59 + this.User.GetHashCode(); + if (this.RoleIds != null) + hashCode = hashCode * 59 + this.RoleIds.GetHashCode(); + if (this.JoinedAt != null) + hashCode = hashCode * 59 + this.JoinedAt.GetHashCode(); + if (this.MembershipStatus != null) + hashCode = hashCode * 59 + this.MembershipStatus.GetHashCode(); + if (this.Visibility != null) + hashCode = hashCode * 59 + this.Visibility.GetHashCode(); + hashCode = hashCode * 59 + this.IsSubscribedToAnnouncements.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.BannedAt != null) + hashCode = hashCode * 59 + this.BannedAt.GetHashCode(); + if (this.ManagerNotes != null) + hashCode = hashCode * 59 + this.ManagerNotes.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Id (string) pattern + Regex regexId = new Regex(@"gmem_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexId.Match(this.Id).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, must match a pattern of " + regexId, new [] { "Id" }); + } + + // GroupId (string) pattern + Regex regexGroupId = new Regex(@"grp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexGroupId.Match(this.GroupId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GroupId, must match a pattern of " + regexGroupId, new [] { "GroupId" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/GroupMemberLimitedUser.cs b/src/VRChat.API/Model/GroupMemberLimitedUser.cs new file mode 100644 index 00000000..c27bf402 --- /dev/null +++ b/src/VRChat.API/Model/GroupMemberLimitedUser.cs @@ -0,0 +1,174 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + /// + [DataContract(Name = "GroupMemberLimitedUser")] + public partial class GroupMemberLimitedUser : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.. + /// displayName. + /// thumbnailUrl. + /// iconUrl. + public GroupMemberLimitedUser(string id = default(string), string displayName = default(string), string thumbnailUrl = default(string), string iconUrl = default(string)) + { + this.Id = id; + this.DisplayName = displayName; + this.ThumbnailUrl = thumbnailUrl; + this.IconUrl = iconUrl; + } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Gets or Sets DisplayName + /// + [DataMember(Name = "displayName", EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Gets or Sets ThumbnailUrl + /// + [DataMember(Name = "thumbnailUrl", EmitDefaultValue = false)] + public string ThumbnailUrl { get; set; } + + /// + /// Gets or Sets IconUrl + /// + [DataMember(Name = "iconUrl", EmitDefaultValue = false)] + public string IconUrl { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GroupMemberLimitedUser {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); + sb.Append(" ThumbnailUrl: ").Append(ThumbnailUrl).Append("\n"); + sb.Append(" IconUrl: ").Append(IconUrl).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupMemberLimitedUser); + } + + /// + /// Returns true if GroupMemberLimitedUser instances are equal + /// + /// Instance of GroupMemberLimitedUser to be compared + /// Boolean + public bool Equals(GroupMemberLimitedUser input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.DisplayName == input.DisplayName || + (this.DisplayName != null && + this.DisplayName.Equals(input.DisplayName)) + ) && + ( + this.ThumbnailUrl == input.ThumbnailUrl || + (this.ThumbnailUrl != null && + this.ThumbnailUrl.Equals(input.ThumbnailUrl)) + ) && + ( + this.IconUrl == input.IconUrl || + (this.IconUrl != null && + this.IconUrl.Equals(input.IconUrl)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.DisplayName != null) + hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); + if (this.ThumbnailUrl != null) + hashCode = hashCode * 59 + this.ThumbnailUrl.GetHashCode(); + if (this.IconUrl != null) + hashCode = hashCode * 59 + this.IconUrl.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/GroupMemberStatus.cs b/src/VRChat.API/Model/GroupMemberStatus.cs new file mode 100644 index 00000000..89fb721b --- /dev/null +++ b/src/VRChat.API/Model/GroupMemberStatus.cs @@ -0,0 +1,60 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// Defines GroupMemberStatus + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum GroupMemberStatus + { + /// + /// Enum Inactive for value: inactive + /// + [EnumMember(Value = "inactive")] + Inactive = 1, + + /// + /// Enum Member for value: member + /// + [EnumMember(Value = "member")] + Member = 2, + + /// + /// Enum Requested for value: requested + /// + [EnumMember(Value = "requested")] + Requested = 3, + + /// + /// Enum Invited for value: invited + /// + [EnumMember(Value = "invited")] + Invited = 4 + + } + +} diff --git a/src/VRChat.API/Model/GroupMyMember.cs b/src/VRChat.API/Model/GroupMyMember.cs new file mode 100644 index 00000000..44e7a353 --- /dev/null +++ b/src/VRChat.API/Model/GroupMyMember.cs @@ -0,0 +1,328 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// GroupMyMember + /// + [DataContract(Name = "GroupMyMember")] + public partial class GroupMyMember : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// groupId. + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.. + /// roleIds. + /// managerNotes. + /// membershipStatus. + /// isSubscribedToAnnouncements (default to true). + /// visibility. + /// isRepresenting (default to false). + /// joinedAt. + /// bannedAt. + /// has2FA (default to false). + /// permissions. + public GroupMyMember(string id = default(string), string groupId = default(string), string userId = default(string), List roleIds = default(List), string managerNotes = default(string), string membershipStatus = default(string), bool isSubscribedToAnnouncements = true, string visibility = default(string), bool isRepresenting = false, DateTime joinedAt = default(DateTime), string bannedAt = default(string), bool has2FA = false, List permissions = default(List)) + { + this.Id = id; + this.GroupId = groupId; + this.UserId = userId; + this.RoleIds = roleIds; + this.ManagerNotes = managerNotes; + this.MembershipStatus = membershipStatus; + this.IsSubscribedToAnnouncements = isSubscribedToAnnouncements; + this.Visibility = visibility; + this.IsRepresenting = isRepresenting; + this.JoinedAt = joinedAt; + this.BannedAt = bannedAt; + this.Has2FA = has2FA; + this.Permissions = permissions; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Gets or Sets GroupId + /// + [DataMember(Name = "groupId", EmitDefaultValue = false)] + public string GroupId { get; set; } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "userId", EmitDefaultValue = false)] + public string UserId { get; set; } + + /// + /// Gets or Sets RoleIds + /// + [DataMember(Name = "roleIds", EmitDefaultValue = false)] + public List RoleIds { get; set; } + + /// + /// Gets or Sets ManagerNotes + /// + [DataMember(Name = "managerNotes", EmitDefaultValue = false)] + public string ManagerNotes { get; set; } + + /// + /// Gets or Sets MembershipStatus + /// + [DataMember(Name = "membershipStatus", EmitDefaultValue = false)] + public string MembershipStatus { get; set; } + + /// + /// Gets or Sets IsSubscribedToAnnouncements + /// + [DataMember(Name = "isSubscribedToAnnouncements", EmitDefaultValue = true)] + public bool IsSubscribedToAnnouncements { get; set; } + + /// + /// Gets or Sets Visibility + /// + [DataMember(Name = "visibility", EmitDefaultValue = false)] + public string Visibility { get; set; } + + /// + /// Gets or Sets IsRepresenting + /// + [DataMember(Name = "isRepresenting", EmitDefaultValue = true)] + public bool IsRepresenting { get; set; } + + /// + /// Gets or Sets JoinedAt + /// + [DataMember(Name = "joinedAt", EmitDefaultValue = false)] + public DateTime JoinedAt { get; set; } + + /// + /// Gets or Sets BannedAt + /// + [DataMember(Name = "bannedAt", EmitDefaultValue = true)] + public string BannedAt { get; set; } + + /// + /// Gets or Sets Has2FA + /// + [DataMember(Name = "has2FA", EmitDefaultValue = true)] + public bool Has2FA { get; set; } + + /// + /// Gets or Sets Permissions + /// + [DataMember(Name = "permissions", EmitDefaultValue = false)] + public List Permissions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GroupMyMember {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" RoleIds: ").Append(RoleIds).Append("\n"); + sb.Append(" ManagerNotes: ").Append(ManagerNotes).Append("\n"); + sb.Append(" MembershipStatus: ").Append(MembershipStatus).Append("\n"); + sb.Append(" IsSubscribedToAnnouncements: ").Append(IsSubscribedToAnnouncements).Append("\n"); + sb.Append(" Visibility: ").Append(Visibility).Append("\n"); + sb.Append(" IsRepresenting: ").Append(IsRepresenting).Append("\n"); + sb.Append(" JoinedAt: ").Append(JoinedAt).Append("\n"); + sb.Append(" BannedAt: ").Append(BannedAt).Append("\n"); + sb.Append(" Has2FA: ").Append(Has2FA).Append("\n"); + sb.Append(" Permissions: ").Append(Permissions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupMyMember); + } + + /// + /// Returns true if GroupMyMember instances are equal + /// + /// Instance of GroupMyMember to be compared + /// Boolean + public bool Equals(GroupMyMember input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.RoleIds == input.RoleIds || + this.RoleIds != null && + input.RoleIds != null && + this.RoleIds.SequenceEqual(input.RoleIds) + ) && + ( + this.ManagerNotes == input.ManagerNotes || + (this.ManagerNotes != null && + this.ManagerNotes.Equals(input.ManagerNotes)) + ) && + ( + this.MembershipStatus == input.MembershipStatus || + (this.MembershipStatus != null && + this.MembershipStatus.Equals(input.MembershipStatus)) + ) && + ( + this.IsSubscribedToAnnouncements == input.IsSubscribedToAnnouncements || + this.IsSubscribedToAnnouncements.Equals(input.IsSubscribedToAnnouncements) + ) && + ( + this.Visibility == input.Visibility || + (this.Visibility != null && + this.Visibility.Equals(input.Visibility)) + ) && + ( + this.IsRepresenting == input.IsRepresenting || + this.IsRepresenting.Equals(input.IsRepresenting) + ) && + ( + this.JoinedAt == input.JoinedAt || + (this.JoinedAt != null && + this.JoinedAt.Equals(input.JoinedAt)) + ) && + ( + this.BannedAt == input.BannedAt || + (this.BannedAt != null && + this.BannedAt.Equals(input.BannedAt)) + ) && + ( + this.Has2FA == input.Has2FA || + this.Has2FA.Equals(input.Has2FA) + ) && + ( + this.Permissions == input.Permissions || + this.Permissions != null && + input.Permissions != null && + this.Permissions.SequenceEqual(input.Permissions) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.GroupId != null) + hashCode = hashCode * 59 + this.GroupId.GetHashCode(); + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + if (this.RoleIds != null) + hashCode = hashCode * 59 + this.RoleIds.GetHashCode(); + if (this.ManagerNotes != null) + hashCode = hashCode * 59 + this.ManagerNotes.GetHashCode(); + if (this.MembershipStatus != null) + hashCode = hashCode * 59 + this.MembershipStatus.GetHashCode(); + hashCode = hashCode * 59 + this.IsSubscribedToAnnouncements.GetHashCode(); + if (this.Visibility != null) + hashCode = hashCode * 59 + this.Visibility.GetHashCode(); + hashCode = hashCode * 59 + this.IsRepresenting.GetHashCode(); + if (this.JoinedAt != null) + hashCode = hashCode * 59 + this.JoinedAt.GetHashCode(); + if (this.BannedAt != null) + hashCode = hashCode * 59 + this.BannedAt.GetHashCode(); + hashCode = hashCode * 59 + this.Has2FA.GetHashCode(); + if (this.Permissions != null) + hashCode = hashCode * 59 + this.Permissions.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Id (string) pattern + Regex regexId = new Regex(@"gmem_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexId.Match(this.Id).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, must match a pattern of " + regexId, new [] { "Id" }); + } + + // GroupId (string) pattern + Regex regexGroupId = new Regex(@"grp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexGroupId.Match(this.GroupId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GroupId, must match a pattern of " + regexGroupId, new [] { "GroupId" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/GroupPermission.cs b/src/VRChat.API/Model/GroupPermission.cs new file mode 100644 index 00000000..89493ab5 --- /dev/null +++ b/src/VRChat.API/Model/GroupPermission.cs @@ -0,0 +1,190 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// A permission that can be granted to a role in a group. + /// + [DataContract(Name = "GroupPermission")] + public partial class GroupPermission : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The name of the permission.. + /// The display name of the permission.. + /// Human-readable description of the permission.. + /// Whether this permission is a \"management\" permission. (default to false). + /// Whether the user is allowed to add this permission to a role. (default to false). + public GroupPermission(string name = default(string), string displayName = default(string), string help = default(string), bool isManagementPermission = false, bool allowedToAdd = false) + { + this.Name = name; + this.DisplayName = displayName; + this.Help = help; + this.IsManagementPermission = isManagementPermission; + this.AllowedToAdd = allowedToAdd; + } + + /// + /// The name of the permission. + /// + /// The name of the permission. + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// The display name of the permission. + /// + /// The display name of the permission. + [DataMember(Name = "displayName", EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Human-readable description of the permission. + /// + /// Human-readable description of the permission. + [DataMember(Name = "help", EmitDefaultValue = false)] + public string Help { get; set; } + + /// + /// Whether this permission is a \"management\" permission. + /// + /// Whether this permission is a \"management\" permission. + [DataMember(Name = "isManagementPermission", EmitDefaultValue = true)] + public bool IsManagementPermission { get; set; } + + /// + /// Whether the user is allowed to add this permission to a role. + /// + /// Whether the user is allowed to add this permission to a role. + [DataMember(Name = "allowedToAdd", EmitDefaultValue = true)] + public bool AllowedToAdd { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GroupPermission {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); + sb.Append(" Help: ").Append(Help).Append("\n"); + sb.Append(" IsManagementPermission: ").Append(IsManagementPermission).Append("\n"); + sb.Append(" AllowedToAdd: ").Append(AllowedToAdd).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupPermission); + } + + /// + /// Returns true if GroupPermission instances are equal + /// + /// Instance of GroupPermission to be compared + /// Boolean + public bool Equals(GroupPermission input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.DisplayName == input.DisplayName || + (this.DisplayName != null && + this.DisplayName.Equals(input.DisplayName)) + ) && + ( + this.Help == input.Help || + (this.Help != null && + this.Help.Equals(input.Help)) + ) && + ( + this.IsManagementPermission == input.IsManagementPermission || + this.IsManagementPermission.Equals(input.IsManagementPermission) + ) && + ( + this.AllowedToAdd == input.AllowedToAdd || + this.AllowedToAdd.Equals(input.AllowedToAdd) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.DisplayName != null) + hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); + if (this.Help != null) + hashCode = hashCode * 59 + this.Help.GetHashCode(); + hashCode = hashCode * 59 + this.IsManagementPermission.GetHashCode(); + hashCode = hashCode * 59 + this.AllowedToAdd.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/GroupPrivacy.cs b/src/VRChat.API/Model/GroupPrivacy.cs new file mode 100644 index 00000000..0e10c1cf --- /dev/null +++ b/src/VRChat.API/Model/GroupPrivacy.cs @@ -0,0 +1,48 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// Defines GroupPrivacy + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum GroupPrivacy + { + /// + /// Enum Default for value: default + /// + [EnumMember(Value = "default")] + Default = 1, + + /// + /// Enum Private for value: private + /// + [EnumMember(Value = "private")] + Private = 2 + + } + +} diff --git a/src/VRChat.API/Model/GroupRole.cs b/src/VRChat.API/Model/GroupRole.cs new file mode 100644 index 00000000..910fa1f2 --- /dev/null +++ b/src/VRChat.API/Model/GroupRole.cs @@ -0,0 +1,306 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// GroupRole + /// + [DataContract(Name = "GroupRole")] + public partial class GroupRole : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// id. + /// groupId. + /// name. + /// description. + /// isSelfAssignable (default to false). + /// permissions. + /// isManagementRole (default to false). + /// requiresTwoFactor (default to false). + /// requiresPurchase (default to false). + /// order. + /// createdAt. + /// updatedAt. + public GroupRole(string id = default(string), string groupId = default(string), string name = default(string), string description = default(string), bool isSelfAssignable = false, List permissions = default(List), bool isManagementRole = false, bool requiresTwoFactor = false, bool requiresPurchase = false, int order = default(int), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime)) + { + this.Id = id; + this.GroupId = groupId; + this.Name = name; + this.Description = description; + this.IsSelfAssignable = isSelfAssignable; + this.Permissions = permissions; + this.IsManagementRole = isManagementRole; + this.RequiresTwoFactor = requiresTwoFactor; + this.RequiresPurchase = requiresPurchase; + this.Order = order; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Gets or Sets GroupId + /// + [DataMember(Name = "groupId", EmitDefaultValue = false)] + public string GroupId { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Gets or Sets IsSelfAssignable + /// + [DataMember(Name = "isSelfAssignable", EmitDefaultValue = true)] + public bool IsSelfAssignable { get; set; } + + /// + /// Gets or Sets Permissions + /// + [DataMember(Name = "permissions", EmitDefaultValue = false)] + public List Permissions { get; set; } + + /// + /// Gets or Sets IsManagementRole + /// + [DataMember(Name = "isManagementRole", EmitDefaultValue = true)] + public bool IsManagementRole { get; set; } + + /// + /// Gets or Sets RequiresTwoFactor + /// + [DataMember(Name = "requiresTwoFactor", EmitDefaultValue = true)] + public bool RequiresTwoFactor { get; set; } + + /// + /// Gets or Sets RequiresPurchase + /// + [DataMember(Name = "requiresPurchase", EmitDefaultValue = true)] + public bool RequiresPurchase { get; set; } + + /// + /// Gets or Sets Order + /// + [DataMember(Name = "order", EmitDefaultValue = false)] + public int Order { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", EmitDefaultValue = false)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", EmitDefaultValue = false)] + public DateTime UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GroupRole {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" GroupId: ").Append(GroupId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" IsSelfAssignable: ").Append(IsSelfAssignable).Append("\n"); + sb.Append(" Permissions: ").Append(Permissions).Append("\n"); + sb.Append(" IsManagementRole: ").Append(IsManagementRole).Append("\n"); + sb.Append(" RequiresTwoFactor: ").Append(RequiresTwoFactor).Append("\n"); + sb.Append(" RequiresPurchase: ").Append(RequiresPurchase).Append("\n"); + sb.Append(" Order: ").Append(Order).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GroupRole); + } + + /// + /// Returns true if GroupRole instances are equal + /// + /// Instance of GroupRole to be compared + /// Boolean + public bool Equals(GroupRole input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.IsSelfAssignable == input.IsSelfAssignable || + this.IsSelfAssignable.Equals(input.IsSelfAssignable) + ) && + ( + this.Permissions == input.Permissions || + this.Permissions != null && + input.Permissions != null && + this.Permissions.SequenceEqual(input.Permissions) + ) && + ( + this.IsManagementRole == input.IsManagementRole || + this.IsManagementRole.Equals(input.IsManagementRole) + ) && + ( + this.RequiresTwoFactor == input.RequiresTwoFactor || + this.RequiresTwoFactor.Equals(input.RequiresTwoFactor) + ) && + ( + this.RequiresPurchase == input.RequiresPurchase || + this.RequiresPurchase.Equals(input.RequiresPurchase) + ) && + ( + this.Order == input.Order || + this.Order.Equals(input.Order) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.GroupId != null) + hashCode = hashCode * 59 + this.GroupId.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.IsSelfAssignable.GetHashCode(); + if (this.Permissions != null) + hashCode = hashCode * 59 + this.Permissions.GetHashCode(); + hashCode = hashCode * 59 + this.IsManagementRole.GetHashCode(); + hashCode = hashCode * 59 + this.RequiresTwoFactor.GetHashCode(); + hashCode = hashCode * 59 + this.RequiresPurchase.GetHashCode(); + hashCode = hashCode * 59 + this.Order.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.UpdatedAt != null) + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Id (string) pattern + Regex regexId = new Regex(@"grol_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexId.Match(this.Id).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, must match a pattern of " + regexId, new [] { "Id" }); + } + + // GroupId (string) pattern + Regex regexGroupId = new Regex(@"grp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", RegexOptions.CultureInvariant); + if (false == regexGroupId.Match(this.GroupId).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GroupId, must match a pattern of " + regexGroupId, new [] { "GroupId" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/GroupRoleTemplate.cs b/src/VRChat.API/Model/GroupRoleTemplate.cs new file mode 100644 index 00000000..0e1c3d44 --- /dev/null +++ b/src/VRChat.API/Model/GroupRoleTemplate.cs @@ -0,0 +1,60 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// Defines GroupRoleTemplate + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum GroupRoleTemplate + { + /// + /// Enum Default for value: default + /// + [EnumMember(Value = "default")] + Default = 1, + + /// + /// Enum ManagedFree for value: managedFree + /// + [EnumMember(Value = "managedFree")] + ManagedFree = 2, + + /// + /// Enum ManagedInvite for value: managedInvite + /// + [EnumMember(Value = "managedInvite")] + ManagedInvite = 3, + + /// + /// Enum ManagedRequest for value: managedRequest + /// + [EnumMember(Value = "managedRequest")] + ManagedRequest = 4 + + } + +} diff --git a/src/VRChat.API/Model/GroupUserVisibility.cs b/src/VRChat.API/Model/GroupUserVisibility.cs new file mode 100644 index 00000000..71600af8 --- /dev/null +++ b/src/VRChat.API/Model/GroupUserVisibility.cs @@ -0,0 +1,54 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// Defines GroupUserVisibility + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum GroupUserVisibility + { + /// + /// Enum Visible for value: visible + /// + [EnumMember(Value = "visible")] + Visible = 1, + + /// + /// Enum Hidden for value: hidden + /// + [EnumMember(Value = "hidden")] + Hidden = 2, + + /// + /// Enum Friends for value: friends + /// + [EnumMember(Value = "friends")] + Friends = 3 + + } + +} diff --git a/src/VRChat.API/Model/InfoPush.cs b/src/VRChat.API/Model/InfoPush.cs index 15fe9948..eeb592ff 100644 --- a/src/VRChat.API/Model/InfoPush.cs +++ b/src/VRChat.API/Model/InfoPush.cs @@ -35,7 +35,7 @@ public partial class InfoPush : IEquatable, IValidatableObject /// /// Gets or Sets ReleaseStatus /// - [DataMember(Name = "releaseStatus", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "releaseStatus", IsRequired = true, EmitDefaultValue = false)] public ReleaseStatus ReleaseStatus { get; set; } /// /// Initializes a new instance of the class. @@ -49,7 +49,7 @@ protected InfoPush() { } /// isEnabled (required) (default to true). /// releaseStatus (required). /// priority (required). - /// (required). + /// tags (required). /// data (required). /// Unknown usage, MD5 (required). /// createdAt (required). @@ -59,8 +59,7 @@ protected InfoPush() { } public InfoPush(string id = default(string), bool isEnabled = true, ReleaseStatus releaseStatus = default(ReleaseStatus), int priority = default(int), List tags = default(List), InfoPushData data = default(InfoPushData), string hash = default(string), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime), DateTime startDate = default(DateTime), DateTime endDate = default(DateTime)) { // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for InfoPush and cannot be null"); } this.Id = id; @@ -68,20 +67,17 @@ protected InfoPush() { } this.ReleaseStatus = releaseStatus; this.Priority = priority; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for InfoPush and cannot be null"); } this.Tags = tags; // to ensure "data" is required (not null) - if (data == null) - { + if (data == null) { throw new ArgumentNullException("data is a required property for InfoPush and cannot be null"); } this.Data = data; // to ensure "hash" is required (not null) - if (hash == null) - { + if (hash == null) { throw new ArgumentNullException("hash is a required property for InfoPush and cannot be null"); } this.Hash = hash; @@ -94,7 +90,7 @@ protected InfoPush() { } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// @@ -106,39 +102,38 @@ protected InfoPush() { } /// /// Gets or Sets Priority /// - [DataMember(Name = "priority", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "priority", IsRequired = true, EmitDefaultValue = false)] public int Priority { get; set; } /// - /// + /// Gets or Sets Tags /// - /// - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// /// Gets or Sets Data /// - [DataMember(Name = "data", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "data", IsRequired = true, EmitDefaultValue = false)] public InfoPushData Data { get; set; } /// /// Unknown usage, MD5 /// /// Unknown usage, MD5 - [DataMember(Name = "hash", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "hash", IsRequired = true, EmitDefaultValue = false)] public string Hash { get; set; } /// /// Gets or Sets CreatedAt /// - [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = false)] public DateTime CreatedAt { get; set; } /// /// Gets or Sets UpdatedAt /// - [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } /// @@ -159,7 +154,7 @@ protected InfoPush() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class InfoPush {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" IsEnabled: ").Append(IsEnabled).Append("\n"); @@ -203,9 +198,8 @@ public override bool Equals(object input) public bool Equals(InfoPush input) { if (input == null) - { return false; - } + return ( this.Id == input.Id || @@ -272,40 +266,24 @@ public override int GetHashCode() { int hashCode = 41; if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsEnabled.GetHashCode(); - hashCode = (hashCode * 59) + this.ReleaseStatus.GetHashCode(); - hashCode = (hashCode * 59) + this.Priority.GetHashCode(); + hashCode = hashCode * 59 + this.Id.GetHashCode(); + hashCode = hashCode * 59 + this.IsEnabled.GetHashCode(); + hashCode = hashCode * 59 + this.ReleaseStatus.GetHashCode(); + hashCode = hashCode * 59 + this.Priority.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } + hashCode = hashCode * 59 + this.Data.GetHashCode(); if (this.Hash != null) - { - hashCode = (hashCode * 59) + this.Hash.GetHashCode(); - } + hashCode = hashCode * 59 + this.Hash.GetHashCode(); if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); if (this.StartDate != null) - { - hashCode = (hashCode * 59) + this.StartDate.GetHashCode(); - } + hashCode = hashCode * 59 + this.StartDate.GetHashCode(); if (this.EndDate != null) - { - hashCode = (hashCode * 59) + this.EndDate.GetHashCode(); - } + hashCode = hashCode * 59 + this.EndDate.GetHashCode(); return hashCode; } } @@ -318,13 +296,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Id (string) minLength - if (this.Id != null && this.Id.Length < 1) + if(this.Id != null && this.Id.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, length must be greater than 1.", new [] { "Id" }); } // Hash (string) minLength - if (this.Hash != null && this.Hash.Length < 1) + if(this.Hash != null && this.Hash.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Hash, length must be greater than 1.", new [] { "Hash" }); } diff --git a/src/VRChat.API/Model/InfoPushData.cs b/src/VRChat.API/Model/InfoPushData.cs index cc28e238..cfd45686 100644 --- a/src/VRChat.API/Model/InfoPushData.cs +++ b/src/VRChat.API/Model/InfoPushData.cs @@ -108,7 +108,7 @@ public partial class InfoPushData : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class InfoPushData {\n"); sb.Append(" ContentList: ").Append(ContentList).Append("\n"); sb.Append(" Description: ").Append(Description).Append("\n"); @@ -149,9 +149,8 @@ public override bool Equals(object input) public bool Equals(InfoPushData input) { if (input == null) - { return false; - } + return ( this.ContentList == input.ContentList || @@ -205,37 +204,21 @@ public override int GetHashCode() { int hashCode = 41; if (this.ContentList != null) - { - hashCode = (hashCode * 59) + this.ContentList.GetHashCode(); - } + hashCode = hashCode * 59 + this.ContentList.GetHashCode(); if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } + hashCode = hashCode * 59 + this.Description.GetHashCode(); if (this.ImageUrl != null) - { - hashCode = (hashCode * 59) + this.ImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.OnPressed != null) - { - hashCode = (hashCode * 59) + this.OnPressed.GetHashCode(); - } + hashCode = hashCode * 59 + this.OnPressed.GetHashCode(); if (this.Template != null) - { - hashCode = (hashCode * 59) + this.Template.GetHashCode(); - } + hashCode = hashCode * 59 + this.Template.GetHashCode(); if (this._Version != null) - { - hashCode = (hashCode * 59) + this._Version.GetHashCode(); - } + hashCode = hashCode * 59 + this._Version.GetHashCode(); if (this.Article != null) - { - hashCode = (hashCode * 59) + this.Article.GetHashCode(); - } + hashCode = hashCode * 59 + this.Article.GetHashCode(); return hashCode; } } @@ -248,13 +231,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // ImageUrl (string) minLength - if (this.ImageUrl != null && this.ImageUrl.Length < 1) + if(this.ImageUrl != null && this.ImageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImageUrl, length must be greater than 1.", new [] { "ImageUrl" }); } // _Version (string) minLength - if (this._Version != null && this._Version.Length < 1) + if(this._Version != null && this._Version.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Version, length must be greater than 1.", new [] { "_Version" }); } diff --git a/src/VRChat.API/Model/InfoPushDataArticle.cs b/src/VRChat.API/Model/InfoPushDataArticle.cs index 08d2d4a4..5d23ddfb 100644 --- a/src/VRChat.API/Model/InfoPushDataArticle.cs +++ b/src/VRChat.API/Model/InfoPushDataArticle.cs @@ -52,7 +52,7 @@ public partial class InfoPushDataArticle : IEquatable, IVal /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class InfoPushDataArticle {\n"); sb.Append(" Content: ").Append(Content).Append("\n"); sb.Append("}\n"); @@ -86,9 +86,8 @@ public override bool Equals(object input) public bool Equals(InfoPushDataArticle input) { if (input == null) - { return false; - } + return ( this.Content == input.Content || @@ -107,9 +106,7 @@ public override int GetHashCode() { int hashCode = 41; if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } + hashCode = hashCode * 59 + this.Content.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/InfoPushDataArticleContent.cs b/src/VRChat.API/Model/InfoPushDataArticleContent.cs index 38907f24..7228485e 100644 --- a/src/VRChat.API/Model/InfoPushDataArticleContent.cs +++ b/src/VRChat.API/Model/InfoPushDataArticleContent.cs @@ -68,7 +68,7 @@ public partial class InfoPushDataArticleContent : IEquatableString presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class InfoPushDataArticleContent {\n"); sb.Append(" Text: ").Append(Text).Append("\n"); sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); @@ -104,9 +104,8 @@ public override bool Equals(object input) public bool Equals(InfoPushDataArticleContent input) { if (input == null) - { return false; - } + return ( this.Text == input.Text || @@ -135,17 +134,11 @@ public override int GetHashCode() { int hashCode = 41; if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } + hashCode = hashCode * 59 + this.Text.GetHashCode(); if (this.ImageUrl != null) - { - hashCode = (hashCode * 59) + this.ImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); if (this.OnPressed != null) - { - hashCode = (hashCode * 59) + this.OnPressed.GetHashCode(); - } + hashCode = hashCode * 59 + this.OnPressed.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/InfoPushDataClickable.cs b/src/VRChat.API/Model/InfoPushDataClickable.cs index 5a522708..cb7aab0f 100644 --- a/src/VRChat.API/Model/InfoPushDataClickable.cs +++ b/src/VRChat.API/Model/InfoPushDataClickable.cs @@ -67,7 +67,7 @@ public enum CommandEnum /// /// Gets or Sets Command /// - [DataMember(Name = "command", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "command", IsRequired = true, EmitDefaultValue = false)] public CommandEnum Command { get; set; } /// /// Initializes a new instance of the class. @@ -98,7 +98,7 @@ protected InfoPushDataClickable() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class InfoPushDataClickable {\n"); sb.Append(" Command: ").Append(Command).Append("\n"); sb.Append(" Parameters: ").Append(Parameters).Append("\n"); @@ -133,9 +133,8 @@ public override bool Equals(object input) public bool Equals(InfoPushDataClickable input) { if (input == null) - { return false; - } + return ( this.Command == input.Command || @@ -158,11 +157,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Command.GetHashCode(); + hashCode = hashCode * 59 + this.Command.GetHashCode(); if (this.Parameters != null) - { - hashCode = (hashCode * 59) + this.Parameters.GetHashCode(); - } + hashCode = hashCode * 59 + this.Parameters.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/Instance.cs b/src/VRChat.API/Model/Instance.cs index 6894a506..a8a79a30 100644 --- a/src/VRChat.API/Model/Instance.cs +++ b/src/VRChat.API/Model/Instance.cs @@ -35,19 +35,19 @@ public partial class Instance : IEquatable, IValidatableObject /// /// Gets or Sets PhotonRegion /// - [DataMember(Name = "photonRegion", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "photonRegion", IsRequired = true, EmitDefaultValue = false)] public Region PhotonRegion { get; set; } /// /// Gets or Sets Region /// - [DataMember(Name = "region", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "region", IsRequired = true, EmitDefaultValue = false)] public Region Region { get; set; } /// /// Gets or Sets Type /// - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] public InstanceType Type { get; set; } /// /// Initializes a new instance of the class. @@ -86,62 +86,53 @@ protected Instance() { } this.CanRequestInvite = canRequestInvite; this.Capacity = capacity; // to ensure "clientNumber" is required (not null) - if (clientNumber == null) - { + if (clientNumber == null) { throw new ArgumentNullException("clientNumber is a required property for Instance and cannot be null"); } this.ClientNumber = clientNumber; this.Full = full; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for Instance and cannot be null"); } this.Id = id; // to ensure "instanceId" is required (not null) - if (instanceId == null) - { + if (instanceId == null) { throw new ArgumentNullException("instanceId is a required property for Instance and cannot be null"); } this.InstanceId = instanceId; // to ensure "location" is required (not null) - if (location == null) - { + if (location == null) { throw new ArgumentNullException("location is a required property for Instance and cannot be null"); } this.Location = location; this.NUsers = nUsers; // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for Instance and cannot be null"); } this.Name = name; this.Permanent = permanent; this.PhotonRegion = photonRegion; // to ensure "platforms" is required (not null) - if (platforms == null) - { + if (platforms == null) { throw new ArgumentNullException("platforms is a required property for Instance and cannot be null"); } this.Platforms = platforms; this.Region = region; // to ensure "secureName" is required (not null) - if (secureName == null) - { + if (secureName == null) { throw new ArgumentNullException("secureName is a required property for Instance and cannot be null"); } this.SecureName = secureName; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for Instance and cannot be null"); } this.Tags = tags; this.Type = type; // to ensure "worldId" is required (not null) - if (worldId == null) - { + if (worldId == null) { throw new ArgumentNullException("worldId is a required property for Instance and cannot be null"); } this.WorldId = worldId; @@ -167,14 +158,14 @@ protected Instance() { } /// /// Gets or Sets Capacity /// - [DataMember(Name = "capacity", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "capacity", IsRequired = true, EmitDefaultValue = false)] public int Capacity { get; set; } /// /// Always returns \"unknown\". /// /// Always returns \"unknown\". - [DataMember(Name = "clientNumber", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "clientNumber", IsRequired = true, EmitDefaultValue = false)] [Obsolete] public string ClientNumber { get; set; } @@ -188,32 +179,32 @@ protected Instance() { } /// 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 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. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets InstanceId /// - [DataMember(Name = "instanceId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "instanceId", IsRequired = true, EmitDefaultValue = false)] public string InstanceId { get; set; } /// /// 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 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. - [DataMember(Name = "location", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "location", IsRequired = true, EmitDefaultValue = false)] public string Location { get; set; } /// /// Gets or Sets NUsers /// - [DataMember(Name = "n_users", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "n_users", IsRequired = true, EmitDefaultValue = false)] public int NUsers { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// @@ -232,13 +223,13 @@ protected Instance() { } /// /// Gets or Sets Platforms /// - [DataMember(Name = "platforms", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "platforms", IsRequired = true, EmitDefaultValue = false)] public InstancePlatforms Platforms { get; set; } /// /// Gets or Sets SecureName /// - [DataMember(Name = "secureName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "secureName", IsRequired = true, EmitDefaultValue = false)] public string SecureName { get; set; } /// @@ -251,14 +242,14 @@ protected Instance() { } /// The tags array on Instances usually contain the language tags of the people in the instance. /// /// The tags array on Instances usually contain the language tags of the people in the instance. - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. - [DataMember(Name = "worldId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "worldId", IsRequired = true, EmitDefaultValue = false)] public string WorldId { get; set; } /// @@ -288,7 +279,7 @@ protected Instance() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class Instance {\n"); sb.Append(" Active: ").Append(Active).Append("\n"); sb.Append(" CanRequestInvite: ").Append(CanRequestInvite).Append("\n"); @@ -344,9 +335,8 @@ public override bool Equals(object input) public bool Equals(Instance input) { if (input == null) - { return false; - } + return ( this.Active == input.Active || @@ -466,71 +456,43 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - hashCode = (hashCode * 59) + this.CanRequestInvite.GetHashCode(); - hashCode = (hashCode * 59) + this.Capacity.GetHashCode(); + hashCode = hashCode * 59 + this.Active.GetHashCode(); + hashCode = hashCode * 59 + this.CanRequestInvite.GetHashCode(); + hashCode = hashCode * 59 + this.Capacity.GetHashCode(); if (this.ClientNumber != null) - { - hashCode = (hashCode * 59) + this.ClientNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Full.GetHashCode(); + hashCode = hashCode * 59 + this.ClientNumber.GetHashCode(); + hashCode = hashCode * 59 + this.Full.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.InstanceId != null) - { - hashCode = (hashCode * 59) + this.InstanceId.GetHashCode(); - } + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); if (this.Location != null) - { - hashCode = (hashCode * 59) + this.Location.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NUsers.GetHashCode(); + hashCode = hashCode * 59 + this.Location.GetHashCode(); + hashCode = hashCode * 59 + this.NUsers.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.OwnerId != null) - { - hashCode = (hashCode * 59) + this.OwnerId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Permanent.GetHashCode(); - hashCode = (hashCode * 59) + this.PhotonRegion.GetHashCode(); + hashCode = hashCode * 59 + this.OwnerId.GetHashCode(); + hashCode = hashCode * 59 + this.Permanent.GetHashCode(); + hashCode = hashCode * 59 + this.PhotonRegion.GetHashCode(); if (this.Platforms != null) - { - hashCode = (hashCode * 59) + this.Platforms.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Region.GetHashCode(); + hashCode = hashCode * 59 + this.Platforms.GetHashCode(); + hashCode = hashCode * 59 + this.Region.GetHashCode(); if (this.SecureName != null) - { - hashCode = (hashCode * 59) + this.SecureName.GetHashCode(); - } + hashCode = hashCode * 59 + this.SecureName.GetHashCode(); if (this.ShortName != null) - { - hashCode = (hashCode * 59) + this.ShortName.GetHashCode(); - } + hashCode = hashCode * 59 + this.ShortName.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + hashCode = hashCode * 59 + this.Type.GetHashCode(); if (this.WorldId != null) - { - hashCode = (hashCode * 59) + this.WorldId.GetHashCode(); - } + hashCode = hashCode * 59 + this.WorldId.GetHashCode(); if (this.Hidden != null) - { - hashCode = (hashCode * 59) + this.Hidden.GetHashCode(); - } + hashCode = hashCode * 59 + this.Hidden.GetHashCode(); if (this.Friends != null) - { - hashCode = (hashCode * 59) + this.Friends.GetHashCode(); - } + hashCode = hashCode * 59 + this.Friends.GetHashCode(); if (this.Private != null) - { - hashCode = (hashCode * 59) + this.Private.GetHashCode(); - } + hashCode = hashCode * 59 + this.Private.GetHashCode(); return hashCode; } } @@ -543,13 +505,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Capacity (int) minimum - if (this.Capacity < (int)0) + if(this.Capacity < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Capacity, must be a value greater than or equal to 0.", new [] { "Capacity" }); } // ClientNumber (string) minLength - if (this.ClientNumber != null && this.ClientNumber.Length < 1) + if(this.ClientNumber != null && this.ClientNumber.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClientNumber, length must be greater than 1.", new [] { "ClientNumber" }); } @@ -562,7 +524,7 @@ public override int GetHashCode() } // InstanceId (string) minLength - if (this.InstanceId != null && this.InstanceId.Length < 1) + if(this.InstanceId != null && this.InstanceId.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for InstanceId, length must be greater than 1.", new [] { "InstanceId" }); } @@ -575,25 +537,25 @@ public override int GetHashCode() } // NUsers (int) minimum - if (this.NUsers < (int)0) + if(this.NUsers < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for NUsers, must be a value greater than or equal to 0.", new [] { "NUsers" }); } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // SecureName (string) minLength - if (this.SecureName != null && this.SecureName.Length < 1) + if(this.SecureName != null && this.SecureName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SecureName, length must be greater than 1.", new [] { "SecureName" }); } // ShortName (string) minLength - if (this.ShortName != null && this.ShortName.Length < 1) + if(this.ShortName != null && this.ShortName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShortName, length must be greater than 1.", new [] { "ShortName" }); } diff --git a/src/VRChat.API/Model/InstancePlatforms.cs b/src/VRChat.API/Model/InstancePlatforms.cs index d732cba3..e2b99bc4 100644 --- a/src/VRChat.API/Model/InstancePlatforms.cs +++ b/src/VRChat.API/Model/InstancePlatforms.cs @@ -50,13 +50,13 @@ protected InstancePlatforms() { } /// /// Gets or Sets Android /// - [DataMember(Name = "android", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "android", IsRequired = true, EmitDefaultValue = false)] public int Android { get; set; } /// /// Gets or Sets Standalonewindows /// - [DataMember(Name = "standalonewindows", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "standalonewindows", IsRequired = true, EmitDefaultValue = false)] public int Standalonewindows { get; set; } /// @@ -65,7 +65,7 @@ protected InstancePlatforms() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class InstancePlatforms {\n"); sb.Append(" Android: ").Append(Android).Append("\n"); sb.Append(" Standalonewindows: ").Append(Standalonewindows).Append("\n"); @@ -100,9 +100,8 @@ public override bool Equals(object input) public bool Equals(InstancePlatforms input) { if (input == null) - { return false; - } + return ( this.Android == input.Android || @@ -123,8 +122,8 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Android.GetHashCode(); - hashCode = (hashCode * 59) + this.Standalonewindows.GetHashCode(); + hashCode = hashCode * 59 + this.Android.GetHashCode(); + hashCode = hashCode * 59 + this.Standalonewindows.GetHashCode(); return hashCode; } } @@ -137,13 +136,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Android (int) minimum - if (this.Android < (int)0) + if(this.Android < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Android, must be a value greater than or equal to 0.", new [] { "Android" }); } // Standalonewindows (int) minimum - if (this.Standalonewindows < (int)0) + if(this.Standalonewindows < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Standalonewindows, must be a value greater than or equal to 0.", new [] { "Standalonewindows" }); } diff --git a/src/VRChat.API/Model/InstanceShortNameResponse.cs b/src/VRChat.API/Model/InstanceShortNameResponse.cs index d6261d75..2e9c0c37 100644 --- a/src/VRChat.API/Model/InstanceShortNameResponse.cs +++ b/src/VRChat.API/Model/InstanceShortNameResponse.cs @@ -44,8 +44,7 @@ protected InstanceShortNameResponse() { } public InstanceShortNameResponse(string secureName = default(string), string shortName = default(string)) { // to ensure "secureName" is required (not null) - if (secureName == null) - { + if (secureName == null) { throw new ArgumentNullException("secureName is a required property for InstanceShortNameResponse and cannot be null"); } this.SecureName = secureName; @@ -55,7 +54,7 @@ protected InstanceShortNameResponse() { } /// /// Gets or Sets SecureName /// - [DataMember(Name = "secureName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "secureName", IsRequired = true, EmitDefaultValue = false)] public string SecureName { get; set; } /// @@ -70,7 +69,7 @@ protected InstanceShortNameResponse() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class InstanceShortNameResponse {\n"); sb.Append(" SecureName: ").Append(SecureName).Append("\n"); sb.Append(" ShortName: ").Append(ShortName).Append("\n"); @@ -105,9 +104,8 @@ public override bool Equals(object input) public bool Equals(InstanceShortNameResponse input) { if (input == null) - { return false; - } + return ( this.SecureName == input.SecureName || @@ -131,13 +129,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.SecureName != null) - { - hashCode = (hashCode * 59) + this.SecureName.GetHashCode(); - } + hashCode = hashCode * 59 + this.SecureName.GetHashCode(); if (this.ShortName != null) - { - hashCode = (hashCode * 59) + this.ShortName.GetHashCode(); - } + hashCode = hashCode * 59 + this.ShortName.GetHashCode(); return hashCode; } } @@ -150,13 +144,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // SecureName (string) minLength - if (this.SecureName != null && this.SecureName.Length < 1) + if(this.SecureName != null && this.SecureName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SecureName, length must be greater than 1.", new [] { "SecureName" }); } // ShortName (string) minLength - if (this.ShortName != null && this.ShortName.Length < 1) + if(this.ShortName != null && this.ShortName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShortName, length must be greater than 1.", new [] { "ShortName" }); } diff --git a/src/VRChat.API/Model/InviteMessage.cs b/src/VRChat.API/Model/InviteMessage.cs index 55437640..6927b30e 100644 --- a/src/VRChat.API/Model/InviteMessage.cs +++ b/src/VRChat.API/Model/InviteMessage.cs @@ -35,7 +35,7 @@ public partial class InviteMessage : IEquatable, IValidatableObje /// /// Gets or Sets MessageType /// - [DataMember(Name = "messageType", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "messageType", IsRequired = true, EmitDefaultValue = false)] public InviteMessageType MessageType { get; set; } /// /// Initializes a new instance of the class. @@ -56,14 +56,12 @@ protected InviteMessage() { } { this.CanBeUpdated = canBeUpdated; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for InviteMessage and cannot be null"); } this.Id = id; // to ensure "message" is required (not null) - if (message == null) - { + if (message == null) { throw new ArgumentNullException("message is a required property for InviteMessage and cannot be null"); } this.Message = message; @@ -82,32 +80,32 @@ protected InviteMessage() { } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets Message /// - [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = false)] public string Message { get; set; } /// /// Changes to 60 when updated, although probably server-side configurable. /// /// Changes to 60 when updated, although probably server-side configurable. - [DataMember(Name = "remainingCooldownMinutes", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "remainingCooldownMinutes", IsRequired = true, EmitDefaultValue = false)] public int RemainingCooldownMinutes { get; set; } /// /// Gets or Sets Slot /// - [DataMember(Name = "slot", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "slot", IsRequired = true, EmitDefaultValue = false)] public int Slot { get; set; } /// /// Gets or Sets UpdatedAt /// - [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } /// @@ -116,7 +114,7 @@ protected InviteMessage() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class InviteMessage {\n"); sb.Append(" CanBeUpdated: ").Append(CanBeUpdated).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); @@ -156,9 +154,8 @@ public override bool Equals(object input) public bool Equals(InviteMessage input) { if (input == null) - { return false; - } + return ( this.CanBeUpdated == input.CanBeUpdated || @@ -202,22 +199,16 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.CanBeUpdated.GetHashCode(); + hashCode = hashCode * 59 + this.CanBeUpdated.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MessageType.GetHashCode(); - hashCode = (hashCode * 59) + this.RemainingCooldownMinutes.GetHashCode(); - hashCode = (hashCode * 59) + this.Slot.GetHashCode(); + hashCode = hashCode * 59 + this.Message.GetHashCode(); + hashCode = hashCode * 59 + this.MessageType.GetHashCode(); + hashCode = hashCode * 59 + this.RemainingCooldownMinutes.GetHashCode(); + hashCode = hashCode * 59 + this.Slot.GetHashCode(); if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); return hashCode; } } @@ -237,25 +228,25 @@ public override int GetHashCode() } // Message (string) minLength - if (this.Message != null && this.Message.Length < 1) + if(this.Message != null && this.Message.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be greater than 1.", new [] { "Message" }); } // RemainingCooldownMinutes (int) minimum - if (this.RemainingCooldownMinutes < (int)0) + if(this.RemainingCooldownMinutes < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RemainingCooldownMinutes, must be a value greater than or equal to 0.", new [] { "RemainingCooldownMinutes" }); } // Slot (int) maximum - if (this.Slot > (int)11) + if(this.Slot > (int)11) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Slot, must be a value less than or equal to 11.", new [] { "Slot" }); } // Slot (int) minimum - if (this.Slot < (int)0) + if(this.Slot < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Slot, must be a value greater than or equal to 0.", new [] { "Slot" }); } diff --git a/src/VRChat.API/Model/InviteRequest.cs b/src/VRChat.API/Model/InviteRequest.cs index b9aa6c9f..ec65256a 100644 --- a/src/VRChat.API/Model/InviteRequest.cs +++ b/src/VRChat.API/Model/InviteRequest.cs @@ -44,8 +44,7 @@ protected InviteRequest() { } public InviteRequest(string instanceId = default(string), int messageSlot = default(int)) { // to ensure "instanceId" is required (not null) - if (instanceId == null) - { + if (instanceId == null) { throw new ArgumentNullException("instanceId is a required property for InviteRequest and cannot be null"); } this.InstanceId = instanceId; @@ -56,7 +55,7 @@ protected InviteRequest() { } /// 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 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. - [DataMember(Name = "instanceId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "instanceId", IsRequired = true, EmitDefaultValue = false)] public string InstanceId { get; set; } /// @@ -71,7 +70,7 @@ protected InviteRequest() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class InviteRequest {\n"); sb.Append(" InstanceId: ").Append(InstanceId).Append("\n"); sb.Append(" MessageSlot: ").Append(MessageSlot).Append("\n"); @@ -106,9 +105,8 @@ public override bool Equals(object input) public bool Equals(InviteRequest input) { if (input == null) - { return false; - } + return ( this.InstanceId == input.InstanceId || @@ -131,10 +129,8 @@ public override int GetHashCode() { int hashCode = 41; if (this.InstanceId != null) - { - hashCode = (hashCode * 59) + this.InstanceId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MessageSlot.GetHashCode(); + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + hashCode = hashCode * 59 + this.MessageSlot.GetHashCode(); return hashCode; } } @@ -154,13 +150,13 @@ public override int GetHashCode() } // MessageSlot (int) maximum - if (this.MessageSlot > (int)11) + if(this.MessageSlot > (int)11) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MessageSlot, must be a value less than or equal to 11.", new [] { "MessageSlot" }); } // MessageSlot (int) minimum - if (this.MessageSlot < (int)0) + if(this.MessageSlot < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MessageSlot, must be a value greater than or equal to 0.", new [] { "MessageSlot" }); } diff --git a/src/VRChat.API/Model/InviteResponse.cs b/src/VRChat.API/Model/InviteResponse.cs index 002c4d55..cdeebbc1 100644 --- a/src/VRChat.API/Model/InviteResponse.cs +++ b/src/VRChat.API/Model/InviteResponse.cs @@ -48,7 +48,7 @@ protected InviteResponse() { } /// /// Gets or Sets ResponseSlot /// - [DataMember(Name = "responseSlot", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "responseSlot", IsRequired = true, EmitDefaultValue = false)] public int ResponseSlot { get; set; } /// @@ -57,7 +57,7 @@ protected InviteResponse() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class InviteResponse {\n"); sb.Append(" ResponseSlot: ").Append(ResponseSlot).Append("\n"); sb.Append("}\n"); @@ -91,9 +91,8 @@ public override bool Equals(object input) public bool Equals(InviteResponse input) { if (input == null) - { return false; - } + return ( this.ResponseSlot == input.ResponseSlot || @@ -110,7 +109,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.ResponseSlot.GetHashCode(); + hashCode = hashCode * 59 + this.ResponseSlot.GetHashCode(); return hashCode; } } @@ -123,13 +122,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // ResponseSlot (int) maximum - if (this.ResponseSlot > (int)11) + if(this.ResponseSlot > (int)11) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ResponseSlot, must be a value less than or equal to 11.", new [] { "ResponseSlot" }); } // ResponseSlot (int) minimum - if (this.ResponseSlot < (int)0) + if(this.ResponseSlot < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ResponseSlot, must be a value greater than or equal to 0.", new [] { "ResponseSlot" }); } diff --git a/src/VRChat.API/Model/License.cs b/src/VRChat.API/Model/License.cs index 0de67623..324e5cc6 100644 --- a/src/VRChat.API/Model/License.cs +++ b/src/VRChat.API/Model/License.cs @@ -35,13 +35,13 @@ public partial class License : IEquatable, IValidatableObject /// /// Gets or Sets ForType /// - [DataMember(Name = "forType", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "forType", IsRequired = true, EmitDefaultValue = false)] public LicenseType ForType { get; set; } /// /// Gets or Sets ForAction /// - [DataMember(Name = "forAction", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "forAction", IsRequired = true, EmitDefaultValue = false)] public LicenseAction ForAction { get; set; } /// /// Initializes a new instance of the class. @@ -58,15 +58,13 @@ protected License() { } public License(string forId = default(string), LicenseType forType = default(LicenseType), string forName = default(string), LicenseAction forAction = default(LicenseAction)) { // to ensure "forId" is required (not null) - if (forId == null) - { + if (forId == null) { throw new ArgumentNullException("forId is a required property for License and cannot be null"); } this.ForId = forId; this.ForType = forType; // to ensure "forName" is required (not null) - if (forName == null) - { + if (forName == null) { throw new ArgumentNullException("forName is a required property for License and cannot be null"); } this.ForName = forName; @@ -77,13 +75,13 @@ protected License() { } /// Either a AvatarID, LicenseGroupID, PermissionID or ProductID. This depends on the `forType` field. /// /// Either a AvatarID, LicenseGroupID, PermissionID or ProductID. This depends on the `forType` field. - [DataMember(Name = "forId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "forId", IsRequired = true, EmitDefaultValue = false)] public string ForId { get; set; } /// /// Gets or Sets ForName /// - [DataMember(Name = "forName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "forName", IsRequired = true, EmitDefaultValue = false)] public string ForName { get; set; } /// @@ -92,7 +90,7 @@ protected License() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class License {\n"); sb.Append(" ForId: ").Append(ForId).Append("\n"); sb.Append(" ForType: ").Append(ForType).Append("\n"); @@ -129,9 +127,8 @@ public override bool Equals(object input) public bool Equals(License input) { if (input == null) - { return false; - } + return ( this.ForId == input.ForId || @@ -163,15 +160,11 @@ public override int GetHashCode() { int hashCode = 41; if (this.ForId != null) - { - hashCode = (hashCode * 59) + this.ForId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ForType.GetHashCode(); + hashCode = hashCode * 59 + this.ForId.GetHashCode(); + hashCode = hashCode * 59 + this.ForType.GetHashCode(); if (this.ForName != null) - { - hashCode = (hashCode * 59) + this.ForName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ForAction.GetHashCode(); + hashCode = hashCode * 59 + this.ForName.GetHashCode(); + hashCode = hashCode * 59 + this.ForAction.GetHashCode(); return hashCode; } } @@ -184,7 +177,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // ForId (string) minLength - if (this.ForId != null && this.ForId.Length < 1) + if(this.ForId != null && this.ForId.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ForId, length must be greater than 1.", new [] { "ForId" }); } @@ -197,7 +190,7 @@ public override int GetHashCode() } // ForName (string) minLength - if (this.ForName != null && this.ForName.Length < 1) + if(this.ForName != null && this.ForName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ForName, length must be greater than 1.", new [] { "ForName" }); } diff --git a/src/VRChat.API/Model/LicenseGroup.cs b/src/VRChat.API/Model/LicenseGroup.cs index b447a705..4134d778 100644 --- a/src/VRChat.API/Model/LicenseGroup.cs +++ b/src/VRChat.API/Model/LicenseGroup.cs @@ -46,26 +46,22 @@ protected LicenseGroup() { } public LicenseGroup(string id = default(string), string name = default(string), string description = default(string), List licenses = default(List)) { // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for LicenseGroup and cannot be null"); } this.Id = id; // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for LicenseGroup and cannot be null"); } this.Name = name; // to ensure "description" is required (not null) - if (description == null) - { + if (description == null) { throw new ArgumentNullException("description is a required property for LicenseGroup and cannot be null"); } this.Description = description; // to ensure "licenses" is required (not null) - if (licenses == null) - { + if (licenses == null) { throw new ArgumentNullException("licenses is a required property for LicenseGroup and cannot be null"); } this.Licenses = licenses; @@ -74,25 +70,25 @@ protected LicenseGroup() { } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// /// Gets or Sets Description /// - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = false)] public string Description { get; set; } /// /// Gets or Sets Licenses /// - [DataMember(Name = "licenses", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "licenses", IsRequired = true, EmitDefaultValue = false)] public List Licenses { get; set; } /// @@ -101,7 +97,7 @@ protected LicenseGroup() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class LicenseGroup {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); @@ -138,9 +134,8 @@ public override bool Equals(object input) public bool Equals(LicenseGroup input) { if (input == null) - { return false; - } + return ( this.Id == input.Id || @@ -175,21 +170,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } + hashCode = hashCode * 59 + this.Description.GetHashCode(); if (this.Licenses != null) - { - hashCode = (hashCode * 59) + this.Licenses.GetHashCode(); - } + hashCode = hashCode * 59 + this.Licenses.GetHashCode(); return hashCode; } } @@ -209,7 +196,7 @@ public override int GetHashCode() } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } diff --git a/src/VRChat.API/Model/LimitedUnityPackage.cs b/src/VRChat.API/Model/LimitedUnityPackage.cs index ba15997c..ab2e700d 100644 --- a/src/VRChat.API/Model/LimitedUnityPackage.cs +++ b/src/VRChat.API/Model/LimitedUnityPackage.cs @@ -44,14 +44,12 @@ protected LimitedUnityPackage() { } public LimitedUnityPackage(string platform = default(string), string unityVersion = default(string)) { // to ensure "platform" is required (not null) - if (platform == null) - { + if (platform == null) { throw new ArgumentNullException("platform is a required property for LimitedUnityPackage and cannot be null"); } this.Platform = platform; // to ensure "unityVersion" is required (not null) - if (unityVersion == null) - { + if (unityVersion == null) { throw new ArgumentNullException("unityVersion is a required property for LimitedUnityPackage and cannot be null"); } this.UnityVersion = unityVersion; @@ -61,13 +59,13 @@ protected LimitedUnityPackage() { } /// 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 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`. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] public string Platform { get; set; } /// /// Gets or Sets UnityVersion /// - [DataMember(Name = "unityVersion", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "unityVersion", IsRequired = true, EmitDefaultValue = false)] public string UnityVersion { get; set; } /// @@ -76,7 +74,7 @@ protected LimitedUnityPackage() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class LimitedUnityPackage {\n"); sb.Append(" Platform: ").Append(Platform).Append("\n"); sb.Append(" UnityVersion: ").Append(UnityVersion).Append("\n"); @@ -111,9 +109,8 @@ public override bool Equals(object input) public bool Equals(LimitedUnityPackage input) { if (input == null) - { return false; - } + return ( this.Platform == input.Platform || @@ -137,13 +134,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.Platform != null) - { - hashCode = (hashCode * 59) + this.Platform.GetHashCode(); - } + hashCode = hashCode * 59 + this.Platform.GetHashCode(); if (this.UnityVersion != null) - { - hashCode = (hashCode * 59) + this.UnityVersion.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityVersion.GetHashCode(); return hashCode; } } @@ -156,7 +149,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // UnityVersion (string) minLength - if (this.UnityVersion != null && this.UnityVersion.Length < 1) + if(this.UnityVersion != null && this.UnityVersion.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UnityVersion, length must be greater than 1.", new [] { "UnityVersion" }); } diff --git a/src/VRChat.API/Model/LimitedUser.cs b/src/VRChat.API/Model/LimitedUser.cs index 6f3775f2..98735588 100644 --- a/src/VRChat.API/Model/LimitedUser.cs +++ b/src/VRChat.API/Model/LimitedUser.cs @@ -35,13 +35,13 @@ public partial class LimitedUser : IEquatable, IValidatableObject /// /// Gets or Sets DeveloperType /// - [DataMember(Name = "developerType", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "developerType", IsRequired = true, EmitDefaultValue = false)] public DeveloperType DeveloperType { get; set; } /// /// Gets or Sets Status /// - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] public UserStatus Status { get; set; } /// /// Initializes a new instance of the class. @@ -71,65 +71,55 @@ protected LimitedUser() { } public LimitedUser(string bio = default(string), string currentAvatarImageUrl = default(string), string currentAvatarThumbnailImageUrl = default(string), DeveloperType developerType = default(DeveloperType), string displayName = default(string), string fallbackAvatar = default(string), string id = default(string), bool isFriend = default(bool), string lastPlatform = default(string), string profilePicOverride = default(string), UserStatus status = default(UserStatus), string statusDescription = default(string), List tags = default(List), string userIcon = default(string), string username = default(string), string location = default(string), string friendKey = default(string)) { // to ensure "currentAvatarImageUrl" is required (not null) - if (currentAvatarImageUrl == null) - { + if (currentAvatarImageUrl == null) { throw new ArgumentNullException("currentAvatarImageUrl is a required property for LimitedUser and cannot be null"); } this.CurrentAvatarImageUrl = currentAvatarImageUrl; // to ensure "currentAvatarThumbnailImageUrl" is required (not null) - if (currentAvatarThumbnailImageUrl == null) - { + if (currentAvatarThumbnailImageUrl == null) { throw new ArgumentNullException("currentAvatarThumbnailImageUrl is a required property for LimitedUser and cannot be null"); } this.CurrentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; this.DeveloperType = developerType; // to ensure "displayName" is required (not null) - if (displayName == null) - { + if (displayName == null) { throw new ArgumentNullException("displayName is a required property for LimitedUser and cannot be null"); } this.DisplayName = displayName; // to ensure "fallbackAvatar" is required (not null) - if (fallbackAvatar == null) - { + if (fallbackAvatar == null) { throw new ArgumentNullException("fallbackAvatar is a required property for LimitedUser and cannot be null"); } this.FallbackAvatar = fallbackAvatar; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for LimitedUser and cannot be null"); } this.Id = id; this.IsFriend = isFriend; // to ensure "lastPlatform" is required (not null) - if (lastPlatform == null) - { + if (lastPlatform == null) { throw new ArgumentNullException("lastPlatform is a required property for LimitedUser and cannot be null"); } this.LastPlatform = lastPlatform; // to ensure "profilePicOverride" is required (not null) - if (profilePicOverride == null) - { + if (profilePicOverride == null) { throw new ArgumentNullException("profilePicOverride is a required property for LimitedUser and cannot be null"); } this.ProfilePicOverride = profilePicOverride; this.Status = status; // to ensure "statusDescription" is required (not null) - if (statusDescription == null) - { + if (statusDescription == null) { throw new ArgumentNullException("statusDescription is a required property for LimitedUser and cannot be null"); } this.StatusDescription = statusDescription; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for LimitedUser and cannot be null"); } this.Tags = tags; // to ensure "userIcon" is required (not null) - if (userIcon == null) - { + if (userIcon == null) { throw new ArgumentNullException("userIcon is a required property for LimitedUser and cannot be null"); } this.UserIcon = userIcon; @@ -149,33 +139,33 @@ protected LimitedUser() { } /// When profilePicOverride is not empty, use it instead. /// /// When profilePicOverride is not empty, use it instead. - [DataMember(Name = "currentAvatarImageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "currentAvatarImageUrl", IsRequired = true, EmitDefaultValue = false)] public string CurrentAvatarImageUrl { get; set; } /// /// When profilePicOverride is not empty, use it instead. /// /// When profilePicOverride is not empty, use it instead. - [DataMember(Name = "currentAvatarThumbnailImageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "currentAvatarThumbnailImageUrl", IsRequired = true, EmitDefaultValue = false)] public string CurrentAvatarThumbnailImageUrl { get; set; } /// /// Gets or Sets DisplayName /// - [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = false)] public string DisplayName { get; set; } /// /// Gets or Sets FallbackAvatar /// - [DataMember(Name = "fallbackAvatar", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "fallbackAvatar", IsRequired = true, EmitDefaultValue = false)] public string FallbackAvatar { get; set; } /// /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// @@ -188,32 +178,32 @@ protected LimitedUser() { } /// 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 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`. - [DataMember(Name = "last_platform", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "last_platform", IsRequired = true, EmitDefaultValue = false)] public string LastPlatform { get; set; } /// /// Gets or Sets ProfilePicOverride /// - [DataMember(Name = "profilePicOverride", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "profilePicOverride", IsRequired = true, EmitDefaultValue = false)] public string ProfilePicOverride { get; set; } /// /// Gets or Sets StatusDescription /// - [DataMember(Name = "statusDescription", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "statusDescription", IsRequired = true, EmitDefaultValue = false)] public string StatusDescription { get; set; } /// /// <- Always empty. /// /// <- Always empty. - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// /// Gets or Sets UserIcon /// - [DataMember(Name = "userIcon", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "userIcon", IsRequired = true, EmitDefaultValue = false)] public string UserIcon { get; set; } /// @@ -242,7 +232,7 @@ protected LimitedUser() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class LimitedUser {\n"); sb.Append(" Bio: ").Append(Bio).Append("\n"); sb.Append(" CurrentAvatarImageUrl: ").Append(CurrentAvatarImageUrl).Append("\n"); @@ -292,9 +282,8 @@ public override bool Equals(object input) public bool Equals(LimitedUser input) { if (input == null) - { return false; - } + return ( this.Bio == input.Bio || @@ -391,64 +380,36 @@ public override int GetHashCode() { int hashCode = 41; if (this.Bio != null) - { - hashCode = (hashCode * 59) + this.Bio.GetHashCode(); - } + hashCode = hashCode * 59 + this.Bio.GetHashCode(); if (this.CurrentAvatarImageUrl != null) - { - hashCode = (hashCode * 59) + this.CurrentAvatarImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.CurrentAvatarImageUrl.GetHashCode(); if (this.CurrentAvatarThumbnailImageUrl != null) - { - hashCode = (hashCode * 59) + this.CurrentAvatarThumbnailImageUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DeveloperType.GetHashCode(); + hashCode = hashCode * 59 + this.CurrentAvatarThumbnailImageUrl.GetHashCode(); + hashCode = hashCode * 59 + this.DeveloperType.GetHashCode(); if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } + hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); if (this.FallbackAvatar != null) - { - hashCode = (hashCode * 59) + this.FallbackAvatar.GetHashCode(); - } + hashCode = hashCode * 59 + this.FallbackAvatar.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsFriend.GetHashCode(); + hashCode = hashCode * 59 + this.Id.GetHashCode(); + hashCode = hashCode * 59 + this.IsFriend.GetHashCode(); if (this.LastPlatform != null) - { - hashCode = (hashCode * 59) + this.LastPlatform.GetHashCode(); - } + hashCode = hashCode * 59 + this.LastPlatform.GetHashCode(); if (this.ProfilePicOverride != null) - { - hashCode = (hashCode * 59) + this.ProfilePicOverride.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); + hashCode = hashCode * 59 + this.ProfilePicOverride.GetHashCode(); + hashCode = hashCode * 59 + this.Status.GetHashCode(); if (this.StatusDescription != null) - { - hashCode = (hashCode * 59) + this.StatusDescription.GetHashCode(); - } + hashCode = hashCode * 59 + this.StatusDescription.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); if (this.UserIcon != null) - { - hashCode = (hashCode * 59) + this.UserIcon.GetHashCode(); - } + hashCode = hashCode * 59 + this.UserIcon.GetHashCode(); if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } + hashCode = hashCode * 59 + this.Username.GetHashCode(); if (this.Location != null) - { - hashCode = (hashCode * 59) + this.Location.GetHashCode(); - } + hashCode = hashCode * 59 + this.Location.GetHashCode(); if (this.FriendKey != null) - { - hashCode = (hashCode * 59) + this.FriendKey.GetHashCode(); - } + hashCode = hashCode * 59 + this.FriendKey.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/LimitedWorld.cs b/src/VRChat.API/Model/LimitedWorld.cs index 9af2760f..b3861130 100644 --- a/src/VRChat.API/Model/LimitedWorld.cs +++ b/src/VRChat.API/Model/LimitedWorld.cs @@ -35,7 +35,7 @@ public partial class LimitedWorld : IEquatable, IValidatableObject /// /// Gets or Sets ReleaseStatus /// - [DataMember(Name = "releaseStatus", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "releaseStatus", IsRequired = true, EmitDefaultValue = false)] public ReleaseStatus ReleaseStatus { get; set; } /// /// Initializes a new instance of the class. @@ -60,21 +60,19 @@ protected LimitedWorld() { } /// popularity (required) (default to 0). /// publicationDate (required). /// releaseStatus (required). - /// (required). + /// tags (required). /// thumbnailImageUrl (required). - /// (required). + /// unityPackages (required). /// updatedAt (required). public LimitedWorld(string authorId = default(string), string authorName = default(string), int capacity = default(int), DateTime createdAt = default(DateTime), int favorites = 0, int heat = 0, string id = default(string), string imageUrl = default(string), string labsPublicationDate = default(string), string name = default(string), int occupants = 0, string organization = "vrchat", int popularity = 0, string publicationDate = default(string), ReleaseStatus releaseStatus = default(ReleaseStatus), List tags = default(List), string thumbnailImageUrl = default(string), List unityPackages = default(List), DateTime updatedAt = default(DateTime)) { // to ensure "authorId" is required (not null) - if (authorId == null) - { + if (authorId == null) { throw new ArgumentNullException("authorId is a required property for LimitedWorld and cannot be null"); } this.AuthorId = authorId; // to ensure "authorName" is required (not null) - if (authorName == null) - { + if (authorName == null) { throw new ArgumentNullException("authorName is a required property for LimitedWorld and cannot be null"); } this.AuthorName = authorName; @@ -83,59 +81,50 @@ protected LimitedWorld() { } this.Favorites = favorites; this.Heat = heat; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for LimitedWorld and cannot be null"); } this.Id = id; // to ensure "imageUrl" is required (not null) - if (imageUrl == null) - { + if (imageUrl == null) { throw new ArgumentNullException("imageUrl is a required property for LimitedWorld and cannot be null"); } this.ImageUrl = imageUrl; // to ensure "labsPublicationDate" is required (not null) - if (labsPublicationDate == null) - { + if (labsPublicationDate == null) { throw new ArgumentNullException("labsPublicationDate is a required property for LimitedWorld and cannot be null"); } this.LabsPublicationDate = labsPublicationDate; // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for LimitedWorld and cannot be null"); } this.Name = name; this.Occupants = occupants; // to ensure "organization" is required (not null) - if (organization == null) - { + if (organization == null) { throw new ArgumentNullException("organization is a required property for LimitedWorld and cannot be null"); } this.Organization = organization; this.Popularity = popularity; // to ensure "publicationDate" is required (not null) - if (publicationDate == null) - { + if (publicationDate == null) { throw new ArgumentNullException("publicationDate is a required property for LimitedWorld and cannot be null"); } this.PublicationDate = publicationDate; this.ReleaseStatus = releaseStatus; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for LimitedWorld and cannot be null"); } this.Tags = tags; // to ensure "thumbnailImageUrl" is required (not null) - if (thumbnailImageUrl == null) - { + if (thumbnailImageUrl == null) { throw new ArgumentNullException("thumbnailImageUrl is a required property for LimitedWorld and cannot be null"); } this.ThumbnailImageUrl = thumbnailImageUrl; // to ensure "unityPackages" is required (not null) - if (unityPackages == null) - { + if (unityPackages == null) { throw new ArgumentNullException("unityPackages is a required property for LimitedWorld and cannot be null"); } this.UnityPackages = unityPackages; @@ -146,112 +135,110 @@ protected LimitedWorld() { } /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "authorId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "authorId", IsRequired = true, EmitDefaultValue = false)] public string AuthorId { get; set; } /// /// Gets or Sets AuthorName /// - [DataMember(Name = "authorName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "authorName", IsRequired = true, EmitDefaultValue = false)] public string AuthorName { get; set; } /// /// Gets or Sets Capacity /// - [DataMember(Name = "capacity", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "capacity", IsRequired = true, EmitDefaultValue = false)] public int Capacity { get; set; } /// /// Gets or Sets CreatedAt /// - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] public DateTime CreatedAt { get; set; } /// /// Gets or Sets Favorites /// - [DataMember(Name = "favorites", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "favorites", IsRequired = true, EmitDefaultValue = false)] public int Favorites { get; set; } /// /// Gets or Sets Heat /// - [DataMember(Name = "heat", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "heat", IsRequired = true, EmitDefaultValue = false)] public int Heat { get; set; } /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets ImageUrl /// - [DataMember(Name = "imageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "imageUrl", IsRequired = true, EmitDefaultValue = false)] public string ImageUrl { get; set; } /// /// Gets or Sets LabsPublicationDate /// - [DataMember(Name = "labsPublicationDate", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "labsPublicationDate", IsRequired = true, EmitDefaultValue = false)] public string LabsPublicationDate { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// /// Gets or Sets Occupants /// - [DataMember(Name = "occupants", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "occupants", IsRequired = true, EmitDefaultValue = false)] public int Occupants { get; set; } /// /// Gets or Sets Organization /// - [DataMember(Name = "organization", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "organization", IsRequired = true, EmitDefaultValue = false)] public string Organization { get; set; } /// /// Gets or Sets Popularity /// - [DataMember(Name = "popularity", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "popularity", IsRequired = true, EmitDefaultValue = false)] public int Popularity { get; set; } /// /// Gets or Sets PublicationDate /// - [DataMember(Name = "publicationDate", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "publicationDate", IsRequired = true, EmitDefaultValue = false)] public string PublicationDate { get; set; } /// - /// + /// Gets or Sets Tags /// - /// - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// /// Gets or Sets ThumbnailImageUrl /// - [DataMember(Name = "thumbnailImageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "thumbnailImageUrl", IsRequired = true, EmitDefaultValue = false)] public string ThumbnailImageUrl { get; set; } /// - /// + /// Gets or Sets UnityPackages /// - /// - [DataMember(Name = "unityPackages", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "unityPackages", IsRequired = true, EmitDefaultValue = false)] public List UnityPackages { get; set; } /// /// Gets or Sets UpdatedAt /// - [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } /// @@ -260,7 +247,7 @@ protected LimitedWorld() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class LimitedWorld {\n"); sb.Append(" AuthorId: ").Append(AuthorId).Append("\n"); sb.Append(" AuthorName: ").Append(AuthorName).Append("\n"); @@ -312,9 +299,8 @@ public override bool Equals(object input) public bool Equals(LimitedWorld input) { if (input == null) - { return false; - } + return ( this.AuthorId == input.AuthorId || @@ -419,63 +405,37 @@ public override int GetHashCode() { int hashCode = 41; if (this.AuthorId != null) - { - hashCode = (hashCode * 59) + this.AuthorId.GetHashCode(); - } + hashCode = hashCode * 59 + this.AuthorId.GetHashCode(); if (this.AuthorName != null) - { - hashCode = (hashCode * 59) + this.AuthorName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Capacity.GetHashCode(); + hashCode = hashCode * 59 + this.AuthorName.GetHashCode(); + hashCode = hashCode * 59 + this.Capacity.GetHashCode(); if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Favorites.GetHashCode(); - hashCode = (hashCode * 59) + this.Heat.GetHashCode(); + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + hashCode = hashCode * 59 + this.Favorites.GetHashCode(); + hashCode = hashCode * 59 + this.Heat.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.ImageUrl != null) - { - hashCode = (hashCode * 59) + this.ImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); if (this.LabsPublicationDate != null) - { - hashCode = (hashCode * 59) + this.LabsPublicationDate.GetHashCode(); - } + hashCode = hashCode * 59 + this.LabsPublicationDate.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Occupants.GetHashCode(); + hashCode = hashCode * 59 + this.Name.GetHashCode(); + hashCode = hashCode * 59 + this.Occupants.GetHashCode(); if (this.Organization != null) - { - hashCode = (hashCode * 59) + this.Organization.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Popularity.GetHashCode(); + hashCode = hashCode * 59 + this.Organization.GetHashCode(); + hashCode = hashCode * 59 + this.Popularity.GetHashCode(); if (this.PublicationDate != null) - { - hashCode = (hashCode * 59) + this.PublicationDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReleaseStatus.GetHashCode(); + hashCode = hashCode * 59 + this.PublicationDate.GetHashCode(); + hashCode = hashCode * 59 + this.ReleaseStatus.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); if (this.ThumbnailImageUrl != null) - { - hashCode = (hashCode * 59) + this.ThumbnailImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ThumbnailImageUrl.GetHashCode(); if (this.UnityPackages != null) - { - hashCode = (hashCode * 59) + this.UnityPackages.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityPackages.GetHashCode(); if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); return hashCode; } } @@ -488,31 +448,31 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AuthorName (string) minLength - if (this.AuthorName != null && this.AuthorName.Length < 1) + if(this.AuthorName != null && this.AuthorName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorName, length must be greater than 1.", new [] { "AuthorName" }); } // Capacity (int) maximum - if (this.Capacity > (int)40) + if(this.Capacity > (int)40) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Capacity, must be a value less than or equal to 40.", new [] { "Capacity" }); } // Capacity (int) minimum - if (this.Capacity < (int)0) + if(this.Capacity < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Capacity, must be a value greater than or equal to 0.", new [] { "Capacity" }); } // Favorites (int) minimum - if (this.Favorites < (int)0) + if(this.Favorites < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Favorites, must be a value greater than or equal to 0.", new [] { "Favorites" }); } // Heat (int) minimum - if (this.Heat < (int)0) + if(this.Heat < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Heat, must be a value greater than or equal to 0.", new [] { "Heat" }); } @@ -525,49 +485,49 @@ public override int GetHashCode() } // ImageUrl (string) minLength - if (this.ImageUrl != null && this.ImageUrl.Length < 1) + if(this.ImageUrl != null && this.ImageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImageUrl, length must be greater than 1.", new [] { "ImageUrl" }); } // LabsPublicationDate (string) minLength - if (this.LabsPublicationDate != null && this.LabsPublicationDate.Length < 1) + if(this.LabsPublicationDate != null && this.LabsPublicationDate.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LabsPublicationDate, length must be greater than 1.", new [] { "LabsPublicationDate" }); } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // Occupants (int) minimum - if (this.Occupants < (int)0) + if(this.Occupants < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Occupants, must be a value greater than or equal to 0.", new [] { "Occupants" }); } // Organization (string) minLength - if (this.Organization != null && this.Organization.Length < 1) + if(this.Organization != null && this.Organization.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Organization, length must be greater than 1.", new [] { "Organization" }); } // Popularity (int) minimum - if (this.Popularity < (int)0) + if(this.Popularity < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Popularity, must be a value greater than or equal to 0.", new [] { "Popularity" }); } // PublicationDate (string) minLength - if (this.PublicationDate != null && this.PublicationDate.Length < 1) + if(this.PublicationDate != null && this.PublicationDate.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PublicationDate, length must be greater than 1.", new [] { "PublicationDate" }); } // ThumbnailImageUrl (string) minLength - if (this.ThumbnailImageUrl != null && this.ThumbnailImageUrl.Length < 1) + if(this.ThumbnailImageUrl != null && this.ThumbnailImageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThumbnailImageUrl, length must be greater than 1.", new [] { "ThumbnailImageUrl" }); } diff --git a/src/VRChat.API/Model/ModerateUserRequest.cs b/src/VRChat.API/Model/ModerateUserRequest.cs index 14fc211f..a772e360 100644 --- a/src/VRChat.API/Model/ModerateUserRequest.cs +++ b/src/VRChat.API/Model/ModerateUserRequest.cs @@ -35,7 +35,7 @@ public partial class ModerateUserRequest : IEquatable, IVal /// /// Gets or Sets Type /// - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] public PlayerModerationType Type { get; set; } /// /// Initializes a new instance of the class. @@ -50,8 +50,7 @@ protected ModerateUserRequest() { } public ModerateUserRequest(string moderated = default(string), PlayerModerationType type = default(PlayerModerationType)) { // to ensure "moderated" is required (not null) - if (moderated == null) - { + if (moderated == null) { throw new ArgumentNullException("moderated is a required property for ModerateUserRequest and cannot be null"); } this.Moderated = moderated; @@ -62,7 +61,7 @@ protected ModerateUserRequest() { } /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "moderated", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "moderated", IsRequired = true, EmitDefaultValue = false)] public string Moderated { get; set; } /// @@ -71,7 +70,7 @@ protected ModerateUserRequest() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class ModerateUserRequest {\n"); sb.Append(" Moderated: ").Append(Moderated).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); @@ -106,9 +105,8 @@ public override bool Equals(object input) public bool Equals(ModerateUserRequest input) { if (input == null) - { return false; - } + return ( this.Moderated == input.Moderated || @@ -131,10 +129,8 @@ public override int GetHashCode() { int hashCode = 41; if (this.Moderated != null) - { - hashCode = (hashCode * 59) + this.Moderated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = hashCode * 59 + this.Moderated.GetHashCode(); + hashCode = hashCode * 59 + this.Type.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/Notification.cs b/src/VRChat.API/Model/Notification.cs index ee4de142..2a3f45f2 100644 --- a/src/VRChat.API/Model/Notification.cs +++ b/src/VRChat.API/Model/Notification.cs @@ -35,7 +35,7 @@ public partial class Notification : IEquatable, IValidatableObject /// /// Gets or Sets Type /// - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] public NotificationType Type { get; set; } /// /// Initializes a new instance of the class. @@ -46,81 +46,87 @@ protected Notification() { } /// Initializes a new instance of the class. /// /// createdAt (required). - /// **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. (required) (default to "{}"). + /// **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. (required) (default to "{}"). /// id (required). /// message (required). - /// seen (required) (default to false). + /// Not included in notification objects received from the Websocket API (default to false). + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. (required). /// -| **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).. /// type (required). - public Notification(DateTime createdAt = default(DateTime), string details = "{}", string id = default(string), string message = default(string), bool seen = false, string senderUserId = default(string), string senderUsername = default(string), NotificationType type = default(NotificationType)) + public Notification(DateTime createdAt = default(DateTime), string details = "{}", string id = default(string), string message = default(string), bool seen = false, string receiverUserId = default(string), string senderUserId = default(string), string senderUsername = default(string), NotificationType type = default(NotificationType)) { this.CreatedAt = createdAt; // to ensure "details" is required (not null) - if (details == null) - { + if (details == null) { throw new ArgumentNullException("details is a required property for Notification and cannot be null"); } this.Details = details; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for Notification and cannot be null"); } this.Id = id; // to ensure "message" is required (not null) - if (message == null) - { + if (message == null) { throw new ArgumentNullException("message is a required property for Notification and cannot be null"); } this.Message = message; - this.Seen = seen; // to ensure "senderUserId" is required (not null) - if (senderUserId == null) - { + if (senderUserId == null) { throw new ArgumentNullException("senderUserId is a required property for Notification and cannot be null"); } this.SenderUserId = senderUserId; this.Type = type; + this.Seen = seen; + this.ReceiverUserId = receiverUserId; this.SenderUsername = senderUsername; } /// /// Gets or Sets CreatedAt /// - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] public DateTime CreatedAt { get; set; } /// - /// **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. /// - /// **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. - [DataMember(Name = "details", IsRequired = true, EmitDefaultValue = true)] + /// **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. + [DataMember(Name = "details", IsRequired = true, EmitDefaultValue = false)] public string Details { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets Message /// - [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = false)] public string Message { get; set; } /// - /// Gets or Sets Seen + /// Not included in notification objects received from the Websocket API /// - [DataMember(Name = "seen", IsRequired = true, EmitDefaultValue = true)] + /// Not included in notification objects received from the Websocket API + [DataMember(Name = "seen", EmitDefaultValue = true)] public bool Seen { get; set; } /// /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "senderUserId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "receiverUserId", EmitDefaultValue = false)] + public string ReceiverUserId { get; set; } + + /// + /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + [DataMember(Name = "senderUserId", IsRequired = true, EmitDefaultValue = false)] public string SenderUserId { get; set; } /// @@ -137,13 +143,14 @@ protected Notification() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class Notification {\n"); sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); sb.Append(" Details: ").Append(Details).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); sb.Append(" Seen: ").Append(Seen).Append("\n"); + sb.Append(" ReceiverUserId: ").Append(ReceiverUserId).Append("\n"); sb.Append(" SenderUserId: ").Append(SenderUserId).Append("\n"); sb.Append(" SenderUsername: ").Append(SenderUsername).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); @@ -178,9 +185,8 @@ public override bool Equals(object input) public bool Equals(Notification input) { if (input == null) - { return false; - } + return ( this.CreatedAt == input.CreatedAt || @@ -206,6 +212,11 @@ public bool Equals(Notification input) this.Seen == input.Seen || this.Seen.Equals(input.Seen) ) && + ( + this.ReceiverUserId == input.ReceiverUserId || + (this.ReceiverUserId != null && + this.ReceiverUserId.Equals(input.ReceiverUserId)) + ) && ( this.SenderUserId == input.SenderUserId || (this.SenderUserId != null && @@ -232,31 +243,21 @@ public override int GetHashCode() { int hashCode = 41; if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); if (this.Details != null) - { - hashCode = (hashCode * 59) + this.Details.GetHashCode(); - } + hashCode = hashCode * 59 + this.Details.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Seen.GetHashCode(); + hashCode = hashCode * 59 + this.Message.GetHashCode(); + hashCode = hashCode * 59 + this.Seen.GetHashCode(); + if (this.ReceiverUserId != null) + hashCode = hashCode * 59 + this.ReceiverUserId.GetHashCode(); if (this.SenderUserId != null) - { - hashCode = (hashCode * 59) + this.SenderUserId.GetHashCode(); - } + hashCode = hashCode * 59 + this.SenderUserId.GetHashCode(); if (this.SenderUsername != null) - { - hashCode = (hashCode * 59) + this.SenderUsername.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = hashCode * 59 + this.SenderUsername.GetHashCode(); + hashCode = hashCode * 59 + this.Type.GetHashCode(); return hashCode; } } @@ -269,13 +270,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Id (string) minLength - if (this.Id != null && this.Id.Length < 1) + if(this.Id != null && this.Id.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, length must be greater than 1.", new [] { "Id" }); } // SenderUsername (string) minLength - if (this.SenderUsername != null && this.SenderUsername.Length < 1) + if(this.SenderUsername != null && this.SenderUsername.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SenderUsername, length must be greater than 1.", new [] { "SenderUsername" }); } diff --git a/src/VRChat.API/Model/OrderOption.cs b/src/VRChat.API/Model/OrderOption.cs new file mode 100644 index 00000000..f49d1528 --- /dev/null +++ b/src/VRChat.API/Model/OrderOption.cs @@ -0,0 +1,48 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// Defines OrderOption + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrderOption + { + /// + /// Enum Ascending for value: ascending + /// + [EnumMember(Value = "ascending")] + Ascending = 1, + + /// + /// Enum Descending for value: descending + /// + [EnumMember(Value = "descending")] + Descending = 2 + + } + +} diff --git a/src/VRChat.API/Model/PaginatedGroupAuditLogEntryList.cs b/src/VRChat.API/Model/PaginatedGroupAuditLogEntryList.cs new file mode 100644 index 00000000..d428d64c --- /dev/null +++ b/src/VRChat.API/Model/PaginatedGroupAuditLogEntryList.cs @@ -0,0 +1,156 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// PaginatedGroupAuditLogEntryList + /// + [DataContract(Name = "PaginatedGroupAuditLogEntryList")] + public partial class PaginatedGroupAuditLogEntryList : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// results. + /// The total number of results that the query would return if there were no pagination.. + /// Whether there are more results after this page.. + public PaginatedGroupAuditLogEntryList(List results = default(List), int totalCount = default(int), bool hasNext = default(bool)) + { + this.Results = results; + this.TotalCount = totalCount; + this.HasNext = hasNext; + } + + /// + /// Gets or Sets Results + /// + [DataMember(Name = "results", EmitDefaultValue = false)] + public List Results { get; set; } + + /// + /// The total number of results that the query would return if there were no pagination. + /// + /// The total number of results that the query would return if there were no pagination. + [DataMember(Name = "totalCount", EmitDefaultValue = false)] + public int TotalCount { get; set; } + + /// + /// Whether there are more results after this page. + /// + /// Whether there are more results after this page. + [DataMember(Name = "hasNext", EmitDefaultValue = true)] + public bool HasNext { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PaginatedGroupAuditLogEntryList {\n"); + sb.Append(" Results: ").Append(Results).Append("\n"); + sb.Append(" TotalCount: ").Append(TotalCount).Append("\n"); + sb.Append(" HasNext: ").Append(HasNext).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PaginatedGroupAuditLogEntryList); + } + + /// + /// Returns true if PaginatedGroupAuditLogEntryList instances are equal + /// + /// Instance of PaginatedGroupAuditLogEntryList to be compared + /// Boolean + public bool Equals(PaginatedGroupAuditLogEntryList input) + { + if (input == null) + return false; + + return + ( + this.Results == input.Results || + this.Results != null && + input.Results != null && + this.Results.SequenceEqual(input.Results) + ) && + ( + this.TotalCount == input.TotalCount || + this.TotalCount.Equals(input.TotalCount) + ) && + ( + this.HasNext == input.HasNext || + this.HasNext.Equals(input.HasNext) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Results != null) + hashCode = hashCode * 59 + this.Results.GetHashCode(); + hashCode = hashCode * 59 + this.TotalCount.GetHashCode(); + hashCode = hashCode * 59 + this.HasNext.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/PastDisplayName.cs b/src/VRChat.API/Model/PastDisplayName.cs index d4fd9873..f17ccfcd 100644 --- a/src/VRChat.API/Model/PastDisplayName.cs +++ b/src/VRChat.API/Model/PastDisplayName.cs @@ -44,8 +44,7 @@ protected PastDisplayName() { } public PastDisplayName(string displayName = default(string), DateTime updatedAt = default(DateTime)) { // to ensure "displayName" is required (not null) - if (displayName == null) - { + if (displayName == null) { throw new ArgumentNullException("displayName is a required property for PastDisplayName and cannot be null"); } this.DisplayName = displayName; @@ -55,13 +54,13 @@ protected PastDisplayName() { } /// /// Gets or Sets DisplayName /// - [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = false)] public string DisplayName { get; set; } /// /// Gets or Sets UpdatedAt /// - [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } /// @@ -70,7 +69,7 @@ protected PastDisplayName() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class PastDisplayName {\n"); sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); @@ -105,9 +104,8 @@ public override bool Equals(object input) public bool Equals(PastDisplayName input) { if (input == null) - { return false; - } + return ( this.DisplayName == input.DisplayName || @@ -131,13 +129,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } + hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); return hashCode; } } @@ -150,7 +144,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // DisplayName (string) minLength - if (this.DisplayName != null && this.DisplayName.Length < 1) + if(this.DisplayName != null && this.DisplayName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be greater than 1.", new [] { "DisplayName" }); } diff --git a/src/VRChat.API/Model/Permission.cs b/src/VRChat.API/Model/Permission.cs index ca9594b5..f0efc278 100644 --- a/src/VRChat.API/Model/Permission.cs +++ b/src/VRChat.API/Model/Permission.cs @@ -46,20 +46,17 @@ protected Permission() { } public Permission(string id = default(string), string name = default(string), string ownerId = default(string), Object data = default(Object)) { // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for Permission and cannot be null"); } this.Id = id; // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for Permission and cannot be null"); } this.Name = name; // to ensure "ownerId" is required (not null) - if (ownerId == null) - { + if (ownerId == null) { throw new ArgumentNullException("ownerId is a required property for Permission and cannot be null"); } this.OwnerId = ownerId; @@ -69,20 +66,20 @@ protected Permission() { } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "ownerId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "ownerId", IsRequired = true, EmitDefaultValue = false)] public string OwnerId { get; set; } /// @@ -97,7 +94,7 @@ protected Permission() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class Permission {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); @@ -134,9 +131,8 @@ public override bool Equals(object input) public bool Equals(Permission input) { if (input == null) - { return false; - } + return ( this.Id == input.Id || @@ -170,21 +166,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.OwnerId != null) - { - hashCode = (hashCode * 59) + this.OwnerId.GetHashCode(); - } + hashCode = hashCode * 59 + this.OwnerId.GetHashCode(); if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } + hashCode = hashCode * 59 + this.Data.GetHashCode(); return hashCode; } } @@ -204,7 +192,7 @@ public override int GetHashCode() } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } diff --git a/src/VRChat.API/Model/PlayerModeration.cs b/src/VRChat.API/Model/PlayerModeration.cs index 12f67396..639580c3 100644 --- a/src/VRChat.API/Model/PlayerModeration.cs +++ b/src/VRChat.API/Model/PlayerModeration.cs @@ -35,7 +35,7 @@ public partial class PlayerModeration : IEquatable, IValidatab /// /// Gets or Sets Type /// - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] public PlayerModerationType Type { get; set; } /// /// Initializes a new instance of the class. @@ -56,32 +56,27 @@ protected PlayerModeration() { } { this.Created = created; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for PlayerModeration and cannot be null"); } this.Id = id; // to ensure "sourceDisplayName" is required (not null) - if (sourceDisplayName == null) - { + if (sourceDisplayName == null) { throw new ArgumentNullException("sourceDisplayName is a required property for PlayerModeration and cannot be null"); } this.SourceDisplayName = sourceDisplayName; // to ensure "sourceUserId" is required (not null) - if (sourceUserId == null) - { + if (sourceUserId == null) { throw new ArgumentNullException("sourceUserId is a required property for PlayerModeration and cannot be null"); } this.SourceUserId = sourceUserId; // to ensure "targetDisplayName" is required (not null) - if (targetDisplayName == null) - { + if (targetDisplayName == null) { throw new ArgumentNullException("targetDisplayName is a required property for PlayerModeration and cannot be null"); } this.TargetDisplayName = targetDisplayName; // to ensure "targetUserId" is required (not null) - if (targetUserId == null) - { + if (targetUserId == null) { throw new ArgumentNullException("targetUserId is a required property for PlayerModeration and cannot be null"); } this.TargetUserId = targetUserId; @@ -91,39 +86,39 @@ protected PlayerModeration() { } /// /// Gets or Sets Created /// - [DataMember(Name = "created", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "created", IsRequired = true, EmitDefaultValue = false)] public DateTime Created { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets SourceDisplayName /// - [DataMember(Name = "sourceDisplayName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sourceDisplayName", IsRequired = true, EmitDefaultValue = false)] public string SourceDisplayName { get; set; } /// /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "sourceUserId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "sourceUserId", IsRequired = true, EmitDefaultValue = false)] public string SourceUserId { get; set; } /// /// Gets or Sets TargetDisplayName /// - [DataMember(Name = "targetDisplayName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "targetDisplayName", IsRequired = true, EmitDefaultValue = false)] public string TargetDisplayName { get; set; } /// /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "targetUserId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "targetUserId", IsRequired = true, EmitDefaultValue = false)] public string TargetUserId { get; set; } /// @@ -132,7 +127,7 @@ protected PlayerModeration() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class PlayerModeration {\n"); sb.Append(" Created: ").Append(Created).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); @@ -172,9 +167,8 @@ public override bool Equals(object input) public bool Equals(PlayerModeration input) { if (input == null) - { return false; - } + return ( this.Created == input.Created || @@ -222,30 +216,18 @@ public override int GetHashCode() { int hashCode = 41; if (this.Created != null) - { - hashCode = (hashCode * 59) + this.Created.GetHashCode(); - } + hashCode = hashCode * 59 + this.Created.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.SourceDisplayName != null) - { - hashCode = (hashCode * 59) + this.SourceDisplayName.GetHashCode(); - } + hashCode = hashCode * 59 + this.SourceDisplayName.GetHashCode(); if (this.SourceUserId != null) - { - hashCode = (hashCode * 59) + this.SourceUserId.GetHashCode(); - } + hashCode = hashCode * 59 + this.SourceUserId.GetHashCode(); if (this.TargetDisplayName != null) - { - hashCode = (hashCode * 59) + this.TargetDisplayName.GetHashCode(); - } + hashCode = hashCode * 59 + this.TargetDisplayName.GetHashCode(); if (this.TargetUserId != null) - { - hashCode = (hashCode * 59) + this.TargetUserId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = hashCode * 59 + this.TargetUserId.GetHashCode(); + hashCode = hashCode * 59 + this.Type.GetHashCode(); return hashCode; } } @@ -265,13 +247,13 @@ public override int GetHashCode() } // SourceDisplayName (string) minLength - if (this.SourceDisplayName != null && this.SourceDisplayName.Length < 1) + if(this.SourceDisplayName != null && this.SourceDisplayName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SourceDisplayName, length must be greater than 1.", new [] { "SourceDisplayName" }); } // TargetDisplayName (string) minLength - if (this.TargetDisplayName != null && this.TargetDisplayName.Length < 1) + if(this.TargetDisplayName != null && this.TargetDisplayName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TargetDisplayName, length must be greater than 1.", new [] { "TargetDisplayName" }); } diff --git a/src/VRChat.API/Model/RequestInviteRequest.cs b/src/VRChat.API/Model/RequestInviteRequest.cs index 075a797b..b595f82b 100644 --- a/src/VRChat.API/Model/RequestInviteRequest.cs +++ b/src/VRChat.API/Model/RequestInviteRequest.cs @@ -52,7 +52,7 @@ public partial class RequestInviteRequest : IEquatable, IV /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class RequestInviteRequest {\n"); sb.Append(" MessageSlot: ").Append(MessageSlot).Append("\n"); sb.Append("}\n"); @@ -86,9 +86,8 @@ public override bool Equals(object input) public bool Equals(RequestInviteRequest input) { if (input == null) - { return false; - } + return ( this.MessageSlot == input.MessageSlot || @@ -105,7 +104,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.MessageSlot.GetHashCode(); + hashCode = hashCode * 59 + this.MessageSlot.GetHashCode(); return hashCode; } } @@ -118,13 +117,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // MessageSlot (int) maximum - if (this.MessageSlot > (int)11) + if(this.MessageSlot > (int)11) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MessageSlot, must be a value less than or equal to 11.", new [] { "MessageSlot" }); } // MessageSlot (int) minimum - if (this.MessageSlot < (int)0) + if(this.MessageSlot < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MessageSlot, must be a value greater than or equal to 0.", new [] { "MessageSlot" }); } diff --git a/src/VRChat.API/Model/RespondGroupJoinRequest.cs b/src/VRChat.API/Model/RespondGroupJoinRequest.cs new file mode 100644 index 00000000..8f10978e --- /dev/null +++ b/src/VRChat.API/Model/RespondGroupJoinRequest.cs @@ -0,0 +1,125 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// RespondGroupJoinRequest + /// + [DataContract(Name = "RespondGroupJoinRequest")] + public partial class RespondGroupJoinRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// action. + public RespondGroupJoinRequest(string action = default(string)) + { + this.Action = action; + } + + /// + /// Gets or Sets Action + /// + [DataMember(Name = "action", EmitDefaultValue = false)] + public string Action { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RespondGroupJoinRequest {\n"); + sb.Append(" Action: ").Append(Action).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RespondGroupJoinRequest); + } + + /// + /// Returns true if RespondGroupJoinRequest instances are equal + /// + /// Instance of RespondGroupJoinRequest to be compared + /// Boolean + public bool Equals(RespondGroupJoinRequest input) + { + if (input == null) + return false; + + return + ( + this.Action == input.Action || + (this.Action != null && + this.Action.Equals(input.Action)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Action != null) + hashCode = hashCode * 59 + this.Action.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/Response.cs b/src/VRChat.API/Model/Response.cs index 878918fe..400e5862 100644 --- a/src/VRChat.API/Model/Response.cs +++ b/src/VRChat.API/Model/Response.cs @@ -56,7 +56,7 @@ protected Response() { } /// /// Gets or Sets StatusCode /// - [DataMember(Name = "status_code", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "status_code", IsRequired = true, EmitDefaultValue = false)] public int StatusCode { get; set; } /// @@ -65,7 +65,7 @@ protected Response() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class Response {\n"); sb.Append(" Message: ").Append(Message).Append("\n"); sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); @@ -100,9 +100,8 @@ public override bool Equals(object input) public bool Equals(Response input) { if (input == null) - { return false; - } + return ( this.Message == input.Message || @@ -125,10 +124,8 @@ public override int GetHashCode() { int hashCode = 41; if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); + hashCode = hashCode * 59 + this.Message.GetHashCode(); + hashCode = hashCode * 59 + this.StatusCode.GetHashCode(); return hashCode; } } @@ -141,13 +138,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Message (string) minLength - if (this.Message != null && this.Message.Length < 1) + if(this.Message != null && this.Message.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Message, length must be greater than 1.", new [] { "Message" }); } // StatusCode (int) minimum - if (this.StatusCode < (int)100) + if(this.StatusCode < (int)100) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StatusCode, must be a value greater than or equal to 100.", new [] { "StatusCode" }); } diff --git a/src/VRChat.API/Model/SentNotification.cs b/src/VRChat.API/Model/SentNotification.cs index 03c5b004..f366e87a 100644 --- a/src/VRChat.API/Model/SentNotification.cs +++ b/src/VRChat.API/Model/SentNotification.cs @@ -35,7 +35,7 @@ public partial class SentNotification : IEquatable, IValidatab /// /// Gets or Sets Type /// - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] public NotificationType Type { get; set; } /// /// Initializes a new instance of the class. @@ -57,32 +57,27 @@ protected SentNotification() { } { this.CreatedAt = createdAt; // to ensure "details" is required (not null) - if (details == null) - { + if (details == null) { throw new ArgumentNullException("details is a required property for SentNotification and cannot be null"); } this.Details = details; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for SentNotification and cannot be null"); } this.Id = id; // to ensure "message" is required (not null) - if (message == null) - { + if (message == null) { throw new ArgumentNullException("message is a required property for SentNotification and cannot be null"); } this.Message = message; // to ensure "recieverUserId" is required (not null) - if (recieverUserId == null) - { + if (recieverUserId == null) { throw new ArgumentNullException("recieverUserId is a required property for SentNotification and cannot be null"); } this.RecieverUserId = recieverUserId; // to ensure "senderUserId" is required (not null) - if (senderUserId == null) - { + if (senderUserId == null) { throw new ArgumentNullException("senderUserId is a required property for SentNotification and cannot be null"); } this.SenderUserId = senderUserId; @@ -93,40 +88,40 @@ protected SentNotification() { } /// /// Gets or Sets CreatedAt /// - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] public DateTime CreatedAt { get; set; } /// /// **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, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. - [DataMember(Name = "details", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "details", IsRequired = true, EmitDefaultValue = false)] public string Details { get; set; } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets Message /// - [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = false)] public string Message { get; set; } /// /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "recieverUserId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "recieverUserId", IsRequired = true, EmitDefaultValue = false)] public string RecieverUserId { get; set; } /// /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "senderUserId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "senderUserId", IsRequired = true, EmitDefaultValue = false)] public string SenderUserId { get; set; } /// @@ -143,7 +138,7 @@ protected SentNotification() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class SentNotification {\n"); sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); sb.Append(" Details: ").Append(Details).Append("\n"); @@ -184,9 +179,8 @@ public override bool Equals(object input) public bool Equals(SentNotification input) { if (input == null) - { return false; - } + return ( this.CreatedAt == input.CreatedAt || @@ -239,34 +233,20 @@ public override int GetHashCode() { int hashCode = 41; if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); if (this.Details != null) - { - hashCode = (hashCode * 59) + this.Details.GetHashCode(); - } + hashCode = hashCode * 59 + this.Details.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } + hashCode = hashCode * 59 + this.Message.GetHashCode(); if (this.RecieverUserId != null) - { - hashCode = (hashCode * 59) + this.RecieverUserId.GetHashCode(); - } + hashCode = hashCode * 59 + this.RecieverUserId.GetHashCode(); if (this.SenderUserId != null) - { - hashCode = (hashCode * 59) + this.SenderUserId.GetHashCode(); - } + hashCode = hashCode * 59 + this.SenderUserId.GetHashCode(); if (this.SenderUsername != null) - { - hashCode = (hashCode * 59) + this.SenderUsername.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = hashCode * 59 + this.SenderUsername.GetHashCode(); + hashCode = hashCode * 59 + this.Type.GetHashCode(); return hashCode; } } @@ -279,13 +259,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Id (string) minLength - if (this.Id != null && this.Id.Length < 1) + if(this.Id != null && this.Id.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, length must be greater than 1.", new [] { "Id" }); } // SenderUsername (string) minLength - if (this.SenderUsername != null && this.SenderUsername.Length < 1) + if(this.SenderUsername != null && this.SenderUsername.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SenderUsername, length must be greater than 1.", new [] { "SenderUsername" }); } diff --git a/src/VRChat.API/Model/SortOption.cs b/src/VRChat.API/Model/SortOption.cs new file mode 100644 index 00000000..93e4c0db --- /dev/null +++ b/src/VRChat.API/Model/SortOption.cs @@ -0,0 +1,144 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// Defines SortOption + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SortOption + { + /// + /// Enum Popularity for value: popularity + /// + [EnumMember(Value = "popularity")] + Popularity = 1, + + /// + /// Enum Heat for value: heat + /// + [EnumMember(Value = "heat")] + Heat = 2, + + /// + /// Enum Trust for value: trust + /// + [EnumMember(Value = "trust")] + Trust = 3, + + /// + /// Enum Shuffle for value: shuffle + /// + [EnumMember(Value = "shuffle")] + Shuffle = 4, + + /// + /// Enum Random for value: random + /// + [EnumMember(Value = "random")] + Random = 5, + + /// + /// Enum Favorites for value: favorites + /// + [EnumMember(Value = "favorites")] + Favorites = 6, + + /// + /// Enum ReportScore for value: reportScore + /// + [EnumMember(Value = "reportScore")] + ReportScore = 7, + + /// + /// Enum ReportCount for value: reportCount + /// + [EnumMember(Value = "reportCount")] + ReportCount = 8, + + /// + /// Enum PublicationDate for value: publicationDate + /// + [EnumMember(Value = "publicationDate")] + PublicationDate = 9, + + /// + /// Enum LabsPublicationDate for value: labsPublicationDate + /// + [EnumMember(Value = "labsPublicationDate")] + LabsPublicationDate = 10, + + /// + /// Enum Created for value: created + /// + [EnumMember(Value = "created")] + Created = 11, + + /// + /// Enum CreatedAt for value: _created_at + /// + [EnumMember(Value = "_created_at")] + CreatedAt = 12, + + /// + /// Enum Updated for value: updated + /// + [EnumMember(Value = "updated")] + Updated = 13, + + /// + /// Enum UpdatedAt for value: _updated_at + /// + [EnumMember(Value = "_updated_at")] + UpdatedAt = 14, + + /// + /// Enum Order for value: order + /// + [EnumMember(Value = "order")] + Order = 15, + + /// + /// Enum Relevance for value: relevance + /// + [EnumMember(Value = "relevance")] + Relevance = 16, + + /// + /// Enum Magic for value: magic + /// + [EnumMember(Value = "magic")] + Magic = 17, + + /// + /// Enum Name for value: name + /// + [EnumMember(Value = "name")] + Name = 18 + + } + +} diff --git a/src/VRChat.API/Model/Subscription.cs b/src/VRChat.API/Model/Subscription.cs index d2a8f653..926978ee 100644 --- a/src/VRChat.API/Model/Subscription.cs +++ b/src/VRChat.API/Model/Subscription.cs @@ -35,7 +35,7 @@ public partial class Subscription : IEquatable, IValidatableObject /// /// Gets or Sets Period /// - [DataMember(Name = "period", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "period", IsRequired = true, EmitDefaultValue = false)] public SubscriptionPeriod Period { get; set; } /// /// Initializes a new instance of the class. @@ -54,21 +54,18 @@ protected Subscription() { } public Subscription(string id = default(string), string steamItemId = default(string), decimal amount = default(decimal), string description = default(string), SubscriptionPeriod period = default(SubscriptionPeriod), decimal tier = default(decimal)) { // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for Subscription and cannot be null"); } this.Id = id; // to ensure "steamItemId" is required (not null) - if (steamItemId == null) - { + if (steamItemId == null) { throw new ArgumentNullException("steamItemId is a required property for Subscription and cannot be null"); } this.SteamItemId = steamItemId; this.Amount = amount; // to ensure "description" is required (not null) - if (description == null) - { + if (description == null) { throw new ArgumentNullException("description is a required property for Subscription and cannot be null"); } this.Description = description; @@ -79,31 +76,31 @@ protected Subscription() { } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets SteamItemId /// - [DataMember(Name = "steamItemId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "steamItemId", IsRequired = true, EmitDefaultValue = false)] public string SteamItemId { get; set; } /// /// Gets or Sets Amount /// - [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = false)] public decimal Amount { get; set; } /// /// Gets or Sets Description /// - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = false)] public string Description { get; set; } /// /// Gets or Sets Tier /// - [DataMember(Name = "tier", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tier", IsRequired = true, EmitDefaultValue = false)] public decimal Tier { get; set; } /// @@ -112,7 +109,7 @@ protected Subscription() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class Subscription {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" SteamItemId: ").Append(SteamItemId).Append("\n"); @@ -151,9 +148,8 @@ public override bool Equals(object input) public bool Equals(Subscription input) { if (input == null) - { return false; - } + return ( this.Id == input.Id || @@ -194,20 +190,14 @@ public override int GetHashCode() { int hashCode = 41; if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.SteamItemId != null) - { - hashCode = (hashCode * 59) + this.SteamItemId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); + hashCode = hashCode * 59 + this.SteamItemId.GetHashCode(); + hashCode = hashCode * 59 + this.Amount.GetHashCode(); if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Period.GetHashCode(); - hashCode = (hashCode * 59) + this.Tier.GetHashCode(); + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.Period.GetHashCode(); + hashCode = hashCode * 59 + this.Tier.GetHashCode(); return hashCode; } } @@ -220,13 +210,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Id (string) minLength - if (this.Id != null && this.Id.Length < 1) + if(this.Id != null && this.Id.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, length must be greater than 1.", new [] { "Id" }); } // SteamItemId (string) minLength - if (this.SteamItemId != null && this.SteamItemId.Length < 1) + if(this.SteamItemId != null && this.SteamItemId.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SteamItemId, length must be greater than 1.", new [] { "SteamItemId" }); } diff --git a/src/VRChat.API/Model/Success.cs b/src/VRChat.API/Model/Success.cs index 0ca0e976..3757d82c 100644 --- a/src/VRChat.API/Model/Success.cs +++ b/src/VRChat.API/Model/Success.cs @@ -52,7 +52,7 @@ public partial class Success : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class Success {\n"); sb.Append(" _Success: ").Append(_Success).Append("\n"); sb.Append("}\n"); @@ -86,9 +86,8 @@ public override bool Equals(object input) public bool Equals(Success input) { if (input == null) - { return false; - } + return ( this._Success == input._Success || @@ -107,9 +106,7 @@ public override int GetHashCode() { int hashCode = 41; if (this._Success != null) - { - hashCode = (hashCode * 59) + this._Success.GetHashCode(); - } + hashCode = hashCode * 59 + this._Success.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/Transaction.cs b/src/VRChat.API/Model/Transaction.cs index 25b358bb..9273478c 100644 --- a/src/VRChat.API/Model/Transaction.cs +++ b/src/VRChat.API/Model/Transaction.cs @@ -35,7 +35,7 @@ public partial class Transaction : IEquatable, IValidatableObject /// /// Gets or Sets Status /// - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] public TransactionStatus Status { get; set; } /// /// Initializes a new instance of the class. @@ -57,15 +57,13 @@ protected Transaction() { } public Transaction(string id = default(string), TransactionStatus status = default(TransactionStatus), Subscription subscription = default(Subscription), bool sandbox = false, DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime), TransactionSteamInfo steam = default(TransactionSteamInfo), TransactionAgreement agreement = default(TransactionAgreement), string error = default(string)) { // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for Transaction and cannot be null"); } this.Id = id; this.Status = status; // to ensure "subscription" is required (not null) - if (subscription == null) - { + if (subscription == null) { throw new ArgumentNullException("subscription is a required property for Transaction and cannot be null"); } this.Subscription = subscription; @@ -73,8 +71,7 @@ protected Transaction() { } this.CreatedAt = createdAt; this.UpdatedAt = updatedAt; // to ensure "error" is required (not null) - if (error == null) - { + if (error == null) { throw new ArgumentNullException("error is a required property for Transaction and cannot be null"); } this.Error = error; @@ -85,13 +82,13 @@ protected Transaction() { } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets Subscription /// - [DataMember(Name = "subscription", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "subscription", IsRequired = true, EmitDefaultValue = false)] public Subscription Subscription { get; set; } /// @@ -103,13 +100,13 @@ protected Transaction() { } /// /// Gets or Sets CreatedAt /// - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] public DateTime CreatedAt { get; set; } /// /// Gets or Sets UpdatedAt /// - [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } /// @@ -127,7 +124,7 @@ protected Transaction() { } /// /// Gets or Sets Error /// - [DataMember(Name = "error", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "error", IsRequired = true, EmitDefaultValue = false)] public string Error { get; set; } /// @@ -136,7 +133,7 @@ protected Transaction() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class Transaction {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); @@ -178,9 +175,8 @@ public override bool Equals(object input) public bool Equals(Transaction input) { if (input == null) - { return false; - } + return ( this.Id == input.Id || @@ -237,35 +233,21 @@ public override int GetHashCode() { int hashCode = 41; if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); + hashCode = hashCode * 59 + this.Id.GetHashCode(); + hashCode = hashCode * 59 + this.Status.GetHashCode(); if (this.Subscription != null) - { - hashCode = (hashCode * 59) + this.Subscription.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Sandbox.GetHashCode(); + hashCode = hashCode * 59 + this.Subscription.GetHashCode(); + hashCode = hashCode * 59 + this.Sandbox.GetHashCode(); if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); if (this.Steam != null) - { - hashCode = (hashCode * 59) + this.Steam.GetHashCode(); - } + hashCode = hashCode * 59 + this.Steam.GetHashCode(); if (this.Agreement != null) - { - hashCode = (hashCode * 59) + this.Agreement.GetHashCode(); - } + hashCode = hashCode * 59 + this.Agreement.GetHashCode(); if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } + hashCode = hashCode * 59 + this.Error.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/TransactionAgreement.cs b/src/VRChat.API/Model/TransactionAgreement.cs index 3d66b218..10d7ea0c 100644 --- a/src/VRChat.API/Model/TransactionAgreement.cs +++ b/src/VRChat.API/Model/TransactionAgreement.cs @@ -59,65 +59,55 @@ protected TransactionAgreement() { } public TransactionAgreement(string agreementId = default(string), decimal itemId = default(decimal), string status = default(string), string period = default(string), decimal frequency = default(decimal), string billingType = default(string), string startDate = default(string), string endDate = default(string), decimal recurringAmt = default(decimal), string currency = default(string), string timeCreated = default(string), string nextPayment = default(string), string lastPayment = default(string), decimal lastAmount = default(decimal), decimal lastAmountVat = default(decimal), decimal outstanding = default(decimal), decimal failedAttempts = default(decimal)) { // to ensure "agreementId" is required (not null) - if (agreementId == null) - { + if (agreementId == null) { throw new ArgumentNullException("agreementId is a required property for TransactionAgreement and cannot be null"); } this.AgreementId = agreementId; this.ItemId = itemId; // to ensure "status" is required (not null) - if (status == null) - { + if (status == null) { throw new ArgumentNullException("status is a required property for TransactionAgreement and cannot be null"); } this.Status = status; // to ensure "period" is required (not null) - if (period == null) - { + if (period == null) { throw new ArgumentNullException("period is a required property for TransactionAgreement and cannot be null"); } this.Period = period; this.Frequency = frequency; // to ensure "billingType" is required (not null) - if (billingType == null) - { + if (billingType == null) { throw new ArgumentNullException("billingType is a required property for TransactionAgreement and cannot be null"); } this.BillingType = billingType; // to ensure "startDate" is required (not null) - if (startDate == null) - { + if (startDate == null) { throw new ArgumentNullException("startDate is a required property for TransactionAgreement and cannot be null"); } this.StartDate = startDate; // to ensure "endDate" is required (not null) - if (endDate == null) - { + if (endDate == null) { throw new ArgumentNullException("endDate is a required property for TransactionAgreement and cannot be null"); } this.EndDate = endDate; this.RecurringAmt = recurringAmt; // to ensure "currency" is required (not null) - if (currency == null) - { + if (currency == null) { throw new ArgumentNullException("currency is a required property for TransactionAgreement and cannot be null"); } this.Currency = currency; // to ensure "timeCreated" is required (not null) - if (timeCreated == null) - { + if (timeCreated == null) { throw new ArgumentNullException("timeCreated is a required property for TransactionAgreement and cannot be null"); } this.TimeCreated = timeCreated; // to ensure "nextPayment" is required (not null) - if (nextPayment == null) - { + if (nextPayment == null) { throw new ArgumentNullException("nextPayment is a required property for TransactionAgreement and cannot be null"); } this.NextPayment = nextPayment; // to ensure "lastPayment" is required (not null) - if (lastPayment == null) - { + if (lastPayment == null) { throw new ArgumentNullException("lastPayment is a required property for TransactionAgreement and cannot be null"); } this.LastPayment = lastPayment; @@ -130,104 +120,104 @@ protected TransactionAgreement() { } /// /// Gets or Sets AgreementId /// - [DataMember(Name = "agreementId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "agreementId", IsRequired = true, EmitDefaultValue = false)] public string AgreementId { get; set; } /// /// Gets or Sets ItemId /// - [DataMember(Name = "itemId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "itemId", IsRequired = true, EmitDefaultValue = false)] public decimal ItemId { get; set; } /// /// This is NOT TransactionStatus, but whatever Steam return. /// /// This is NOT TransactionStatus, but whatever Steam return. - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] public string Status { get; set; } /// /// Gets or Sets Period /// - [DataMember(Name = "period", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "period", IsRequired = true, EmitDefaultValue = false)] public string Period { get; set; } /// /// Gets or Sets Frequency /// - [DataMember(Name = "frequency", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "frequency", IsRequired = true, EmitDefaultValue = false)] public decimal Frequency { get; set; } /// /// Gets or Sets BillingType /// - [DataMember(Name = "billingType", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "billingType", IsRequired = true, EmitDefaultValue = false)] public string BillingType { get; set; } /// /// Gets or Sets StartDate /// - [DataMember(Name = "startDate", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "startDate", IsRequired = true, EmitDefaultValue = false)] public string StartDate { get; set; } /// /// Gets or Sets EndDate /// - [DataMember(Name = "endDate", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "endDate", IsRequired = true, EmitDefaultValue = false)] public string EndDate { get; set; } /// /// Gets or Sets RecurringAmt /// - [DataMember(Name = "recurringAmt", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "recurringAmt", IsRequired = true, EmitDefaultValue = false)] public decimal RecurringAmt { get; set; } /// /// Gets or Sets Currency /// - [DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = false)] public string Currency { get; set; } /// /// Gets or Sets TimeCreated /// - [DataMember(Name = "timeCreated", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "timeCreated", IsRequired = true, EmitDefaultValue = false)] public string TimeCreated { get; set; } /// /// Gets or Sets NextPayment /// - [DataMember(Name = "nextPayment", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "nextPayment", IsRequired = true, EmitDefaultValue = false)] public string NextPayment { get; set; } /// /// Gets or Sets LastPayment /// - [DataMember(Name = "lastPayment", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "lastPayment", IsRequired = true, EmitDefaultValue = false)] public string LastPayment { get; set; } /// /// Gets or Sets LastAmount /// - [DataMember(Name = "lastAmount", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "lastAmount", IsRequired = true, EmitDefaultValue = false)] public decimal LastAmount { get; set; } /// /// Gets or Sets LastAmountVat /// - [DataMember(Name = "lastAmountVat", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "lastAmountVat", IsRequired = true, EmitDefaultValue = false)] public decimal LastAmountVat { get; set; } /// /// Gets or Sets Outstanding /// - [DataMember(Name = "outstanding", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "outstanding", IsRequired = true, EmitDefaultValue = false)] public decimal Outstanding { get; set; } /// /// Gets or Sets FailedAttempts /// - [DataMember(Name = "failedAttempts", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "failedAttempts", IsRequired = true, EmitDefaultValue = false)] public decimal FailedAttempts { get; set; } /// @@ -236,7 +226,7 @@ protected TransactionAgreement() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class TransactionAgreement {\n"); sb.Append(" AgreementId: ").Append(AgreementId).Append("\n"); sb.Append(" ItemId: ").Append(ItemId).Append("\n"); @@ -286,9 +276,8 @@ public override bool Equals(object input) public bool Equals(TransactionAgreement input) { if (input == null) - { return false; - } + return ( this.AgreementId == input.AgreementId || @@ -380,52 +369,32 @@ public override int GetHashCode() { int hashCode = 41; if (this.AgreementId != null) - { - hashCode = (hashCode * 59) + this.AgreementId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemId.GetHashCode(); + hashCode = hashCode * 59 + this.AgreementId.GetHashCode(); + hashCode = hashCode * 59 + this.ItemId.GetHashCode(); if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } + hashCode = hashCode * 59 + this.Status.GetHashCode(); if (this.Period != null) - { - hashCode = (hashCode * 59) + this.Period.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Frequency.GetHashCode(); + hashCode = hashCode * 59 + this.Period.GetHashCode(); + hashCode = hashCode * 59 + this.Frequency.GetHashCode(); if (this.BillingType != null) - { - hashCode = (hashCode * 59) + this.BillingType.GetHashCode(); - } + hashCode = hashCode * 59 + this.BillingType.GetHashCode(); if (this.StartDate != null) - { - hashCode = (hashCode * 59) + this.StartDate.GetHashCode(); - } + hashCode = hashCode * 59 + this.StartDate.GetHashCode(); if (this.EndDate != null) - { - hashCode = (hashCode * 59) + this.EndDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecurringAmt.GetHashCode(); + hashCode = hashCode * 59 + this.EndDate.GetHashCode(); + hashCode = hashCode * 59 + this.RecurringAmt.GetHashCode(); if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } + hashCode = hashCode * 59 + this.Currency.GetHashCode(); if (this.TimeCreated != null) - { - hashCode = (hashCode * 59) + this.TimeCreated.GetHashCode(); - } + hashCode = hashCode * 59 + this.TimeCreated.GetHashCode(); if (this.NextPayment != null) - { - hashCode = (hashCode * 59) + this.NextPayment.GetHashCode(); - } + hashCode = hashCode * 59 + this.NextPayment.GetHashCode(); if (this.LastPayment != null) - { - hashCode = (hashCode * 59) + this.LastPayment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LastAmount.GetHashCode(); - hashCode = (hashCode * 59) + this.LastAmountVat.GetHashCode(); - hashCode = (hashCode * 59) + this.Outstanding.GetHashCode(); - hashCode = (hashCode * 59) + this.FailedAttempts.GetHashCode(); + hashCode = hashCode * 59 + this.LastPayment.GetHashCode(); + hashCode = hashCode * 59 + this.LastAmount.GetHashCode(); + hashCode = hashCode * 59 + this.LastAmountVat.GetHashCode(); + hashCode = hashCode * 59 + this.Outstanding.GetHashCode(); + hashCode = hashCode * 59 + this.FailedAttempts.GetHashCode(); return hashCode; } } @@ -438,61 +407,61 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AgreementId (string) minLength - if (this.AgreementId != null && this.AgreementId.Length < 1) + if(this.AgreementId != null && this.AgreementId.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AgreementId, length must be greater than 1.", new [] { "AgreementId" }); } // Status (string) minLength - if (this.Status != null && this.Status.Length < 1) + if(this.Status != null && this.Status.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Status, length must be greater than 1.", new [] { "Status" }); } // Period (string) minLength - if (this.Period != null && this.Period.Length < 1) + if(this.Period != null && this.Period.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Period, length must be greater than 1.", new [] { "Period" }); } // BillingType (string) minLength - if (this.BillingType != null && this.BillingType.Length < 1) + if(this.BillingType != null && this.BillingType.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BillingType, length must be greater than 1.", new [] { "BillingType" }); } // StartDate (string) minLength - if (this.StartDate != null && this.StartDate.Length < 1) + if(this.StartDate != null && this.StartDate.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartDate, length must be greater than 1.", new [] { "StartDate" }); } // EndDate (string) minLength - if (this.EndDate != null && this.EndDate.Length < 1) + if(this.EndDate != null && this.EndDate.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EndDate, length must be greater than 1.", new [] { "EndDate" }); } // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 1) + if(this.Currency != null && this.Currency.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 1.", new [] { "Currency" }); } // TimeCreated (string) minLength - if (this.TimeCreated != null && this.TimeCreated.Length < 1) + if(this.TimeCreated != null && this.TimeCreated.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TimeCreated, length must be greater than 1.", new [] { "TimeCreated" }); } // NextPayment (string) minLength - if (this.NextPayment != null && this.NextPayment.Length < 1) + if(this.NextPayment != null && this.NextPayment.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for NextPayment, length must be greater than 1.", new [] { "NextPayment" }); } // LastPayment (string) minLength - if (this.LastPayment != null && this.LastPayment.Length < 1) + if(this.LastPayment != null && this.LastPayment.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastPayment, length must be greater than 1.", new [] { "LastPayment" }); } diff --git a/src/VRChat.API/Model/TransactionSteamInfo.cs b/src/VRChat.API/Model/TransactionSteamInfo.cs index d46ca294..ff55cdf4 100644 --- a/src/VRChat.API/Model/TransactionSteamInfo.cs +++ b/src/VRChat.API/Model/TransactionSteamInfo.cs @@ -47,32 +47,27 @@ protected TransactionSteamInfo() { } public TransactionSteamInfo(TransactionSteamWalletInfo walletInfo = default(TransactionSteamWalletInfo), string steamId = default(string), string orderId = default(string), string steamUrl = default(string), string transId = default(string)) { // to ensure "walletInfo" is required (not null) - if (walletInfo == null) - { + if (walletInfo == null) { throw new ArgumentNullException("walletInfo is a required property for TransactionSteamInfo and cannot be null"); } this.WalletInfo = walletInfo; // to ensure "steamId" is required (not null) - if (steamId == null) - { + if (steamId == null) { throw new ArgumentNullException("steamId is a required property for TransactionSteamInfo and cannot be null"); } this.SteamId = steamId; // to ensure "orderId" is required (not null) - if (orderId == null) - { + if (orderId == null) { throw new ArgumentNullException("orderId is a required property for TransactionSteamInfo and cannot be null"); } this.OrderId = orderId; // to ensure "steamUrl" is required (not null) - if (steamUrl == null) - { + if (steamUrl == null) { throw new ArgumentNullException("steamUrl is a required property for TransactionSteamInfo and cannot be null"); } this.SteamUrl = steamUrl; // to ensure "transId" is required (not null) - if (transId == null) - { + if (transId == null) { throw new ArgumentNullException("transId is a required property for TransactionSteamInfo and cannot be null"); } this.TransId = transId; @@ -81,35 +76,35 @@ protected TransactionSteamInfo() { } /// /// Gets or Sets WalletInfo /// - [DataMember(Name = "walletInfo", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "walletInfo", IsRequired = true, EmitDefaultValue = false)] public TransactionSteamWalletInfo WalletInfo { get; set; } /// /// Steam User ID /// /// Steam User ID - [DataMember(Name = "steamId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "steamId", IsRequired = true, EmitDefaultValue = false)] public string SteamId { get; set; } /// /// Steam Order ID /// /// Steam Order ID - [DataMember(Name = "orderId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "orderId", IsRequired = true, EmitDefaultValue = false)] public string OrderId { get; set; } /// /// Empty /// /// Empty - [DataMember(Name = "steamUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "steamUrl", IsRequired = true, EmitDefaultValue = false)] public string SteamUrl { get; set; } /// /// Steam Transaction ID, NOT the same as VRChat TransactionID /// /// Steam Transaction ID, NOT the same as VRChat TransactionID - [DataMember(Name = "transId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "transId", IsRequired = true, EmitDefaultValue = false)] public string TransId { get; set; } /// @@ -118,7 +113,7 @@ protected TransactionSteamInfo() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class TransactionSteamInfo {\n"); sb.Append(" WalletInfo: ").Append(WalletInfo).Append("\n"); sb.Append(" SteamId: ").Append(SteamId).Append("\n"); @@ -156,9 +151,8 @@ public override bool Equals(object input) public bool Equals(TransactionSteamInfo input) { if (input == null) - { return false; - } + return ( this.WalletInfo == input.WalletInfo || @@ -197,25 +191,15 @@ public override int GetHashCode() { int hashCode = 41; if (this.WalletInfo != null) - { - hashCode = (hashCode * 59) + this.WalletInfo.GetHashCode(); - } + hashCode = hashCode * 59 + this.WalletInfo.GetHashCode(); if (this.SteamId != null) - { - hashCode = (hashCode * 59) + this.SteamId.GetHashCode(); - } + hashCode = hashCode * 59 + this.SteamId.GetHashCode(); if (this.OrderId != null) - { - hashCode = (hashCode * 59) + this.OrderId.GetHashCode(); - } + hashCode = hashCode * 59 + this.OrderId.GetHashCode(); if (this.SteamUrl != null) - { - hashCode = (hashCode * 59) + this.SteamUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.SteamUrl.GetHashCode(); if (this.TransId != null) - { - hashCode = (hashCode * 59) + this.TransId.GetHashCode(); - } + hashCode = hashCode * 59 + this.TransId.GetHashCode(); return hashCode; } } @@ -228,19 +212,19 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // SteamId (string) minLength - if (this.SteamId != null && this.SteamId.Length < 1) + if(this.SteamId != null && this.SteamId.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SteamId, length must be greater than 1.", new [] { "SteamId" }); } // OrderId (string) minLength - if (this.OrderId != null && this.OrderId.Length < 1) + if(this.OrderId != null && this.OrderId.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OrderId, length must be greater than 1.", new [] { "OrderId" }); } // TransId (string) minLength - if (this.TransId != null && this.TransId.Length < 1) + if(this.TransId != null && this.TransId.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TransId, length must be greater than 1.", new [] { "TransId" }); } diff --git a/src/VRChat.API/Model/TransactionSteamWalletInfo.cs b/src/VRChat.API/Model/TransactionSteamWalletInfo.cs index fddb2cd5..2b1d82f6 100644 --- a/src/VRChat.API/Model/TransactionSteamWalletInfo.cs +++ b/src/VRChat.API/Model/TransactionSteamWalletInfo.cs @@ -46,26 +46,22 @@ protected TransactionSteamWalletInfo() { } public TransactionSteamWalletInfo(string state = default(string), string country = "US", string currency = "USD", string status = default(string)) { // to ensure "state" is required (not null) - if (state == null) - { + if (state == null) { throw new ArgumentNullException("state is a required property for TransactionSteamWalletInfo and cannot be null"); } this.State = state; // to ensure "country" is required (not null) - if (country == null) - { + if (country == null) { throw new ArgumentNullException("country is a required property for TransactionSteamWalletInfo and cannot be null"); } this.Country = country; // to ensure "currency" is required (not null) - if (currency == null) - { + if (currency == null) { throw new ArgumentNullException("currency is a required property for TransactionSteamWalletInfo and cannot be null"); } this.Currency = currency; // to ensure "status" is required (not null) - if (status == null) - { + if (status == null) { throw new ArgumentNullException("status is a required property for TransactionSteamWalletInfo and cannot be null"); } this.Status = status; @@ -74,25 +70,25 @@ protected TransactionSteamWalletInfo() { } /// /// Gets or Sets State /// - [DataMember(Name = "state", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "state", IsRequired = true, EmitDefaultValue = false)] public string State { get; set; } /// /// Gets or Sets Country /// - [DataMember(Name = "country", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "country", IsRequired = true, EmitDefaultValue = false)] public string Country { get; set; } /// /// Gets or Sets Currency /// - [DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = false)] public string Currency { get; set; } /// /// Gets or Sets Status /// - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] public string Status { get; set; } /// @@ -101,7 +97,7 @@ protected TransactionSteamWalletInfo() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class TransactionSteamWalletInfo {\n"); sb.Append(" State: ").Append(State).Append("\n"); sb.Append(" Country: ").Append(Country).Append("\n"); @@ -138,9 +134,8 @@ public override bool Equals(object input) public bool Equals(TransactionSteamWalletInfo input) { if (input == null) - { return false; - } + return ( this.State == input.State || @@ -174,21 +169,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } + hashCode = hashCode * 59 + this.State.GetHashCode(); if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } + hashCode = hashCode * 59 + this.Country.GetHashCode(); if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } + hashCode = hashCode * 59 + this.Currency.GetHashCode(); if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } + hashCode = hashCode * 59 + this.Status.GetHashCode(); return hashCode; } } @@ -201,19 +188,19 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Country (string) minLength - if (this.Country != null && this.Country.Length < 2) + if(this.Country != null && this.Country.Length < 2) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Country, length must be greater than 2.", new [] { "Country" }); } // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) + if(this.Currency != null && this.Currency.Length < 3) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); } // Status (string) minLength - if (this.Status != null && this.Status.Length < 1) + if(this.Status != null && this.Status.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Status, length must be greater than 1.", new [] { "Status" }); } diff --git a/src/VRChat.API/Model/TwoFactorAuthCode.cs b/src/VRChat.API/Model/TwoFactorAuthCode.cs index da47e4bf..f6fe2fc5 100644 --- a/src/VRChat.API/Model/TwoFactorAuthCode.cs +++ b/src/VRChat.API/Model/TwoFactorAuthCode.cs @@ -43,8 +43,7 @@ protected TwoFactorAuthCode() { } public TwoFactorAuthCode(string code = default(string)) { // to ensure "code" is required (not null) - if (code == null) - { + if (code == null) { throw new ArgumentNullException("code is a required property for TwoFactorAuthCode and cannot be null"); } this.Code = code; @@ -53,7 +52,7 @@ protected TwoFactorAuthCode() { } /// /// Gets or Sets Code /// - [DataMember(Name = "code", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "code", IsRequired = true, EmitDefaultValue = false)] public string Code { get; set; } /// @@ -62,7 +61,7 @@ protected TwoFactorAuthCode() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class TwoFactorAuthCode {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append("}\n"); @@ -96,9 +95,8 @@ public override bool Equals(object input) public bool Equals(TwoFactorAuthCode input) { if (input == null) - { return false; - } + return ( this.Code == input.Code || @@ -117,9 +115,7 @@ public override int GetHashCode() { int hashCode = 41; if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } + hashCode = hashCode * 59 + this.Code.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/UnityPackage.cs b/src/VRChat.API/Model/UnityPackage.cs index 048d9306..fbfc401e 100644 --- a/src/VRChat.API/Model/UnityPackage.cs +++ b/src/VRChat.API/Model/UnityPackage.cs @@ -53,20 +53,17 @@ protected UnityPackage() { } { this.AssetVersion = assetVersion; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for UnityPackage and cannot be null"); } this.Id = id; // to ensure "platform" is required (not null) - if (platform == null) - { + if (platform == null) { throw new ArgumentNullException("platform is a required property for UnityPackage and cannot be null"); } this.Platform = platform; // to ensure "unityVersion" is required (not null) - if (unityVersion == null) - { + if (unityVersion == null) { throw new ArgumentNullException("unityVersion is a required property for UnityPackage and cannot be null"); } this.UnityVersion = unityVersion; @@ -93,7 +90,7 @@ protected UnityPackage() { } /// /// Gets or Sets AssetVersion /// - [DataMember(Name = "assetVersion", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "assetVersion", IsRequired = true, EmitDefaultValue = false)] public int AssetVersion { get; set; } /// @@ -105,14 +102,14 @@ protected UnityPackage() { } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// 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 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`. - [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "platform", IsRequired = true, EmitDefaultValue = false)] public string Platform { get; set; } /// @@ -136,7 +133,7 @@ protected UnityPackage() { } /// /// Gets or Sets UnityVersion /// - [DataMember(Name = "unityVersion", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "unityVersion", IsRequired = true, EmitDefaultValue = false)] public string UnityVersion { get; set; } /// @@ -145,7 +142,7 @@ protected UnityPackage() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class UnityPackage {\n"); sb.Append(" AssetUrl: ").Append(AssetUrl).Append("\n"); sb.Append(" AssetUrlObject: ").Append(AssetUrlObject).Append("\n"); @@ -188,9 +185,8 @@ public override bool Equals(object input) public bool Equals(UnityPackage input) { if (input == null) - { return false; - } + return ( this.AssetUrl == input.AssetUrl || @@ -252,39 +248,23 @@ public override int GetHashCode() { int hashCode = 41; if (this.AssetUrl != null) - { - hashCode = (hashCode * 59) + this.AssetUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.AssetUrl.GetHashCode(); if (this.AssetUrlObject != null) - { - hashCode = (hashCode * 59) + this.AssetUrlObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AssetVersion.GetHashCode(); + hashCode = hashCode * 59 + this.AssetUrlObject.GetHashCode(); + hashCode = hashCode * 59 + this.AssetVersion.GetHashCode(); if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Platform != null) - { - hashCode = (hashCode * 59) + this.Platform.GetHashCode(); - } + hashCode = hashCode * 59 + this.Platform.GetHashCode(); if (this.PluginUrl != null) - { - hashCode = (hashCode * 59) + this.PluginUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.PluginUrl.GetHashCode(); if (this.PluginUrlObject != null) - { - hashCode = (hashCode * 59) + this.PluginUrlObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UnitySortNumber.GetHashCode(); + hashCode = hashCode * 59 + this.PluginUrlObject.GetHashCode(); + hashCode = hashCode * 59 + this.UnitySortNumber.GetHashCode(); if (this.UnityVersion != null) - { - hashCode = (hashCode * 59) + this.UnityVersion.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityVersion.GetHashCode(); return hashCode; } } @@ -297,13 +277,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AssetUrl (string) minLength - if (this.AssetUrl != null && this.AssetUrl.Length < 1) + if(this.AssetUrl != null && this.AssetUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AssetUrl, length must be greater than 1.", new [] { "AssetUrl" }); } // AssetVersion (int) minimum - if (this.AssetVersion < (int)0) + if(this.AssetVersion < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AssetVersion, must be a value greater than or equal to 0.", new [] { "AssetVersion" }); } @@ -316,13 +296,13 @@ public override int GetHashCode() } // UnitySortNumber (long) minimum - if (this.UnitySortNumber < (long)0) + if(this.UnitySortNumber < (long)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UnitySortNumber, must be a value greater than or equal to 0.", new [] { "UnitySortNumber" }); } // UnityVersion (string) minLength - if (this.UnityVersion != null && this.UnityVersion.Length < 1) + if(this.UnityVersion != null && this.UnityVersion.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UnityVersion, length must be greater than 1.", new [] { "UnityVersion" }); } diff --git a/src/VRChat.API/Model/UpdateAvatarRequest.cs b/src/VRChat.API/Model/UpdateAvatarRequest.cs index 47a5e6dd..de8d34f0 100644 --- a/src/VRChat.API/Model/UpdateAvatarRequest.cs +++ b/src/VRChat.API/Model/UpdateAvatarRequest.cs @@ -44,7 +44,7 @@ public partial class UpdateAvatarRequest : IEquatable, IVal /// id. /// name. /// description. - /// . + /// tags. /// imageUrl. /// releaseStatus. /// version (default to 1M). @@ -87,9 +87,8 @@ public partial class UpdateAvatarRequest : IEquatable, IVal public string Description { get; set; } /// - /// + /// Gets or Sets Tags /// - /// [DataMember(Name = "tags", EmitDefaultValue = false)] public List Tags { get; set; } @@ -117,7 +116,7 @@ public partial class UpdateAvatarRequest : IEquatable, IVal /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class UpdateAvatarRequest {\n"); sb.Append(" AssetUrl: ").Append(AssetUrl).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); @@ -159,9 +158,8 @@ public override bool Equals(object input) public bool Equals(UpdateAvatarRequest input) { if (input == null) - { return false; - } + return ( this.AssetUrl == input.AssetUrl || @@ -219,35 +217,21 @@ public override int GetHashCode() { int hashCode = 41; if (this.AssetUrl != null) - { - hashCode = (hashCode * 59) + this.AssetUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.AssetUrl.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } + hashCode = hashCode * 59 + this.Description.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); if (this.ImageUrl != null) - { - hashCode = (hashCode * 59) + this.ImageUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReleaseStatus.GetHashCode(); - hashCode = (hashCode * 59) + this._Version.GetHashCode(); + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); + hashCode = hashCode * 59 + this.ReleaseStatus.GetHashCode(); + hashCode = hashCode * 59 + this._Version.GetHashCode(); if (this.UnityPackageUrl != null) - { - hashCode = (hashCode * 59) + this.UnityPackageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityPackageUrl.GetHashCode(); return hashCode; } } @@ -267,25 +251,25 @@ public override int GetHashCode() } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // Description (string) minLength - if (this.Description != null && this.Description.Length < 1) + if(this.Description != null && this.Description.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); } // ImageUrl (string) minLength - if (this.ImageUrl != null && this.ImageUrl.Length < 1) + if(this.ImageUrl != null && this.ImageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImageUrl, length must be greater than 1.", new [] { "ImageUrl" }); } // _Version (decimal) minimum - if (this._Version < (decimal)0) + if(this._Version < (decimal)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Version, must be a value greater than or equal to 0.", new [] { "_Version" }); } diff --git a/src/VRChat.API/Model/UpdateFavoriteGroupRequest.cs b/src/VRChat.API/Model/UpdateFavoriteGroupRequest.cs index e3e1e76c..656fde33 100644 --- a/src/VRChat.API/Model/UpdateFavoriteGroupRequest.cs +++ b/src/VRChat.API/Model/UpdateFavoriteGroupRequest.cs @@ -69,7 +69,7 @@ public partial class UpdateFavoriteGroupRequest : IEquatableString presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class UpdateFavoriteGroupRequest {\n"); sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); sb.Append(" Visibility: ").Append(Visibility).Append("\n"); @@ -105,9 +105,8 @@ public override bool Equals(object input) public bool Equals(UpdateFavoriteGroupRequest input) { if (input == null) - { return false; - } + return ( this.DisplayName == input.DisplayName || @@ -136,14 +135,10 @@ public override int GetHashCode() { int hashCode = 41; if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Visibility.GetHashCode(); + hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); + hashCode = hashCode * 59 + this.Visibility.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/UpdateGroupGalleryRequest.cs b/src/VRChat.API/Model/UpdateGroupGalleryRequest.cs new file mode 100644 index 00000000..7f4e693b --- /dev/null +++ b/src/VRChat.API/Model/UpdateGroupGalleryRequest.cs @@ -0,0 +1,238 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// UpdateGroupGalleryRequest + /// + [DataContract(Name = "UpdateGroupGalleryRequest")] + public partial class UpdateGroupGalleryRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Name of the gallery.. + /// Description of the gallery.. + /// Whether the gallery is members only. (default to false). + /// roleIdsToView. + /// roleIdsToSubmit. + /// roleIdsToAutoApprove. + /// roleIdsToManage. + public UpdateGroupGalleryRequest(string name = default(string), string description = default(string), bool membersOnly = false, List roleIdsToView = default(List), List roleIdsToSubmit = default(List), List roleIdsToAutoApprove = default(List), List roleIdsToManage = default(List)) + { + this.Name = name; + this.Description = description; + this.MembersOnly = membersOnly; + this.RoleIdsToView = roleIdsToView; + this.RoleIdsToSubmit = roleIdsToSubmit; + this.RoleIdsToAutoApprove = roleIdsToAutoApprove; + this.RoleIdsToManage = roleIdsToManage; + } + + /// + /// Name of the gallery. + /// + /// Name of the gallery. + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Description of the gallery. + /// + /// Description of the gallery. + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Whether the gallery is members only. + /// + /// Whether the gallery is members only. + [DataMember(Name = "membersOnly", EmitDefaultValue = true)] + public bool MembersOnly { get; set; } + + /// + /// Gets or Sets RoleIdsToView + /// + [DataMember(Name = "roleIdsToView", EmitDefaultValue = true)] + public List RoleIdsToView { get; set; } + + /// + /// Gets or Sets RoleIdsToSubmit + /// + [DataMember(Name = "roleIdsToSubmit", EmitDefaultValue = true)] + public List RoleIdsToSubmit { get; set; } + + /// + /// Gets or Sets RoleIdsToAutoApprove + /// + [DataMember(Name = "roleIdsToAutoApprove", EmitDefaultValue = true)] + public List RoleIdsToAutoApprove { get; set; } + + /// + /// Gets or Sets RoleIdsToManage + /// + [DataMember(Name = "roleIdsToManage", EmitDefaultValue = true)] + public List RoleIdsToManage { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateGroupGalleryRequest {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" MembersOnly: ").Append(MembersOnly).Append("\n"); + sb.Append(" RoleIdsToView: ").Append(RoleIdsToView).Append("\n"); + sb.Append(" RoleIdsToSubmit: ").Append(RoleIdsToSubmit).Append("\n"); + sb.Append(" RoleIdsToAutoApprove: ").Append(RoleIdsToAutoApprove).Append("\n"); + sb.Append(" RoleIdsToManage: ").Append(RoleIdsToManage).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateGroupGalleryRequest); + } + + /// + /// Returns true if UpdateGroupGalleryRequest instances are equal + /// + /// Instance of UpdateGroupGalleryRequest to be compared + /// Boolean + public bool Equals(UpdateGroupGalleryRequest input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.MembersOnly == input.MembersOnly || + this.MembersOnly.Equals(input.MembersOnly) + ) && + ( + this.RoleIdsToView == input.RoleIdsToView || + this.RoleIdsToView != null && + input.RoleIdsToView != null && + this.RoleIdsToView.SequenceEqual(input.RoleIdsToView) + ) && + ( + this.RoleIdsToSubmit == input.RoleIdsToSubmit || + this.RoleIdsToSubmit != null && + input.RoleIdsToSubmit != null && + this.RoleIdsToSubmit.SequenceEqual(input.RoleIdsToSubmit) + ) && + ( + this.RoleIdsToAutoApprove == input.RoleIdsToAutoApprove || + this.RoleIdsToAutoApprove != null && + input.RoleIdsToAutoApprove != null && + this.RoleIdsToAutoApprove.SequenceEqual(input.RoleIdsToAutoApprove) + ) && + ( + this.RoleIdsToManage == input.RoleIdsToManage || + this.RoleIdsToManage != null && + input.RoleIdsToManage != null && + this.RoleIdsToManage.SequenceEqual(input.RoleIdsToManage) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.MembersOnly.GetHashCode(); + if (this.RoleIdsToView != null) + hashCode = hashCode * 59 + this.RoleIdsToView.GetHashCode(); + if (this.RoleIdsToSubmit != null) + hashCode = hashCode * 59 + this.RoleIdsToSubmit.GetHashCode(); + if (this.RoleIdsToAutoApprove != null) + hashCode = hashCode * 59 + this.RoleIdsToAutoApprove.GetHashCode(); + if (this.RoleIdsToManage != null) + hashCode = hashCode * 59 + this.RoleIdsToManage.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Name (string) minLength + if(this.Name != null && this.Name.Length < 1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); + } + + // Description (string) minLength + if(this.Description != null && this.Description.Length < 0) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 0.", new [] { "Description" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/UpdateGroupMemberRequest.cs b/src/VRChat.API/Model/UpdateGroupMemberRequest.cs new file mode 100644 index 00000000..81924e36 --- /dev/null +++ b/src/VRChat.API/Model/UpdateGroupMemberRequest.cs @@ -0,0 +1,153 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// UpdateGroupMemberRequest + /// + [DataContract(Name = "UpdateGroupMemberRequest")] + public partial class UpdateGroupMemberRequest : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets Visibility + /// + [DataMember(Name = "visibility", EmitDefaultValue = false)] + public GroupUserVisibility? Visibility { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// visibility. + /// isSubscribedToAnnouncements. + /// managerNotes. + public UpdateGroupMemberRequest(GroupUserVisibility? visibility = default(GroupUserVisibility?), bool isSubscribedToAnnouncements = default(bool), string managerNotes = default(string)) + { + this.Visibility = visibility; + this.IsSubscribedToAnnouncements = isSubscribedToAnnouncements; + this.ManagerNotes = managerNotes; + } + + /// + /// Gets or Sets IsSubscribedToAnnouncements + /// + [DataMember(Name = "isSubscribedToAnnouncements", EmitDefaultValue = true)] + public bool IsSubscribedToAnnouncements { get; set; } + + /// + /// Gets or Sets ManagerNotes + /// + [DataMember(Name = "managerNotes", EmitDefaultValue = false)] + public string ManagerNotes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateGroupMemberRequest {\n"); + sb.Append(" Visibility: ").Append(Visibility).Append("\n"); + sb.Append(" IsSubscribedToAnnouncements: ").Append(IsSubscribedToAnnouncements).Append("\n"); + sb.Append(" ManagerNotes: ").Append(ManagerNotes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateGroupMemberRequest); + } + + /// + /// Returns true if UpdateGroupMemberRequest instances are equal + /// + /// Instance of UpdateGroupMemberRequest to be compared + /// Boolean + public bool Equals(UpdateGroupMemberRequest input) + { + if (input == null) + return false; + + return + ( + this.Visibility == input.Visibility || + this.Visibility.Equals(input.Visibility) + ) && + ( + this.IsSubscribedToAnnouncements == input.IsSubscribedToAnnouncements || + this.IsSubscribedToAnnouncements.Equals(input.IsSubscribedToAnnouncements) + ) && + ( + this.ManagerNotes == input.ManagerNotes || + (this.ManagerNotes != null && + this.ManagerNotes.Equals(input.ManagerNotes)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.Visibility.GetHashCode(); + hashCode = hashCode * 59 + this.IsSubscribedToAnnouncements.GetHashCode(); + if (this.ManagerNotes != null) + hashCode = hashCode * 59 + this.ManagerNotes.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/UpdateGroupRequest.cs b/src/VRChat.API/Model/UpdateGroupRequest.cs new file mode 100644 index 00000000..3c1f2626 --- /dev/null +++ b/src/VRChat.API/Model/UpdateGroupRequest.cs @@ -0,0 +1,309 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// UpdateGroupRequest + /// + [DataContract(Name = "UpdateGroupRequest")] + public partial class UpdateGroupRequest : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets JoinState + /// + [DataMember(Name = "joinState", EmitDefaultValue = false)] + public GroupJoinState? JoinState { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// name. + /// shortCode. + /// description. + /// joinState. + /// iconId (default to "null"). + /// bannerId (default to "null"). + /// 3 letter language code. + /// links. + /// rules. + /// tags. + public UpdateGroupRequest(string name = default(string), string shortCode = default(string), string description = default(string), GroupJoinState? joinState = default(GroupJoinState?), string iconId = "null", string bannerId = "null", List languages = default(List), List links = default(List), string rules = default(string), List tags = default(List)) + { + this.Name = name; + this.ShortCode = shortCode; + this.Description = description; + this.JoinState = joinState; + // use default value if no "iconId" provided + this.IconId = iconId ?? "null"; + // use default value if no "bannerId" provided + this.BannerId = bannerId ?? "null"; + this.Languages = languages; + this.Links = links; + this.Rules = rules; + this.Tags = tags; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets ShortCode + /// + [DataMember(Name = "shortCode", EmitDefaultValue = false)] + public string ShortCode { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Gets or Sets IconId + /// + [DataMember(Name = "iconId", EmitDefaultValue = true)] + public string IconId { get; set; } + + /// + /// Gets or Sets BannerId + /// + [DataMember(Name = "bannerId", EmitDefaultValue = true)] + public string BannerId { get; set; } + + /// + /// 3 letter language code + /// + /// 3 letter language code + [DataMember(Name = "languages", EmitDefaultValue = false)] + public List Languages { get; set; } + + /// + /// Gets or Sets Links + /// + [DataMember(Name = "links", EmitDefaultValue = false)] + public List Links { get; set; } + + /// + /// Gets or Sets Rules + /// + [DataMember(Name = "rules", EmitDefaultValue = false)] + public string Rules { get; set; } + + /// + /// Gets or Sets Tags + /// + [DataMember(Name = "tags", EmitDefaultValue = false)] + public List Tags { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateGroupRequest {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" ShortCode: ").Append(ShortCode).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" JoinState: ").Append(JoinState).Append("\n"); + sb.Append(" IconId: ").Append(IconId).Append("\n"); + sb.Append(" BannerId: ").Append(BannerId).Append("\n"); + sb.Append(" Languages: ").Append(Languages).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Rules: ").Append(Rules).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateGroupRequest); + } + + /// + /// Returns true if UpdateGroupRequest instances are equal + /// + /// Instance of UpdateGroupRequest to be compared + /// Boolean + public bool Equals(UpdateGroupRequest input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.ShortCode == input.ShortCode || + (this.ShortCode != null && + this.ShortCode.Equals(input.ShortCode)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.JoinState == input.JoinState || + this.JoinState.Equals(input.JoinState) + ) && + ( + this.IconId == input.IconId || + (this.IconId != null && + this.IconId.Equals(input.IconId)) + ) && + ( + this.BannerId == input.BannerId || + (this.BannerId != null && + this.BannerId.Equals(input.BannerId)) + ) && + ( + this.Languages == input.Languages || + this.Languages != null && + input.Languages != null && + this.Languages.SequenceEqual(input.Languages) + ) && + ( + this.Links == input.Links || + this.Links != null && + input.Links != null && + this.Links.SequenceEqual(input.Links) + ) && + ( + this.Rules == input.Rules || + (this.Rules != null && + this.Rules.Equals(input.Rules)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.ShortCode != null) + hashCode = hashCode * 59 + this.ShortCode.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.JoinState.GetHashCode(); + if (this.IconId != null) + hashCode = hashCode * 59 + this.IconId.GetHashCode(); + if (this.BannerId != null) + hashCode = hashCode * 59 + this.BannerId.GetHashCode(); + if (this.Languages != null) + hashCode = hashCode * 59 + this.Languages.GetHashCode(); + if (this.Links != null) + hashCode = hashCode * 59 + this.Links.GetHashCode(); + if (this.Rules != null) + hashCode = hashCode * 59 + this.Rules.GetHashCode(); + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // Name (string) maxLength + if(this.Name != null && this.Name.Length > 64) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be less than 64.", new [] { "Name" }); + } + + // Name (string) minLength + if(this.Name != null && this.Name.Length < 3) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 3.", new [] { "Name" }); + } + + // ShortCode (string) maxLength + if(this.ShortCode != null && this.ShortCode.Length > 6) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShortCode, length must be less than 6.", new [] { "ShortCode" }); + } + + // ShortCode (string) minLength + if(this.ShortCode != null && this.ShortCode.Length < 3) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShortCode, length must be greater than 3.", new [] { "ShortCode" }); + } + + // Description (string) maxLength + if(this.Description != null && this.Description.Length > 250) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 250.", new [] { "Description" }); + } + + // Description (string) minLength + if(this.Description != null && this.Description.Length < 0) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 0.", new [] { "Description" }); + } + + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/UpdateGroupRoleRequest.cs b/src/VRChat.API/Model/UpdateGroupRoleRequest.cs new file mode 100644 index 00000000..1e58b2ec --- /dev/null +++ b/src/VRChat.API/Model/UpdateGroupRoleRequest.cs @@ -0,0 +1,186 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.9.1 + * Contact: me@ariesclark.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; + +namespace VRChat.API.Model +{ + /// + /// UpdateGroupRoleRequest + /// + [DataContract(Name = "UpdateGroupRoleRequest")] + public partial class UpdateGroupRoleRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// name. + /// description. + /// isSelfAssignable (default to false). + /// permissions. + /// order. + public UpdateGroupRoleRequest(string name = default(string), string description = default(string), bool isSelfAssignable = false, List permissions = default(List), int order = default(int)) + { + this.Name = name; + this.Description = description; + this.IsSelfAssignable = isSelfAssignable; + this.Permissions = permissions; + this.Order = order; + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets Description + /// + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Gets or Sets IsSelfAssignable + /// + [DataMember(Name = "isSelfAssignable", EmitDefaultValue = true)] + public bool IsSelfAssignable { get; set; } + + /// + /// Gets or Sets Permissions + /// + [DataMember(Name = "permissions", EmitDefaultValue = false)] + public List Permissions { get; set; } + + /// + /// Gets or Sets Order + /// + [DataMember(Name = "order", EmitDefaultValue = false)] + public int Order { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateGroupRoleRequest {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" IsSelfAssignable: ").Append(IsSelfAssignable).Append("\n"); + sb.Append(" Permissions: ").Append(Permissions).Append("\n"); + sb.Append(" Order: ").Append(Order).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateGroupRoleRequest); + } + + /// + /// Returns true if UpdateGroupRoleRequest instances are equal + /// + /// Instance of UpdateGroupRoleRequest to be compared + /// Boolean + public bool Equals(UpdateGroupRoleRequest input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.IsSelfAssignable == input.IsSelfAssignable || + this.IsSelfAssignable.Equals(input.IsSelfAssignable) + ) && + ( + this.Permissions == input.Permissions || + this.Permissions != null && + input.Permissions != null && + this.Permissions.SequenceEqual(input.Permissions) + ) && + ( + this.Order == input.Order || + this.Order.Equals(input.Order) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.IsSelfAssignable.GetHashCode(); + if (this.Permissions != null) + hashCode = hashCode * 59 + this.Permissions.GetHashCode(); + hashCode = hashCode * 59 + this.Order.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/VRChat.API/Model/UpdateInviteMessageRequest.cs b/src/VRChat.API/Model/UpdateInviteMessageRequest.cs index 99060b23..40531159 100644 --- a/src/VRChat.API/Model/UpdateInviteMessageRequest.cs +++ b/src/VRChat.API/Model/UpdateInviteMessageRequest.cs @@ -43,8 +43,7 @@ protected UpdateInviteMessageRequest() { } public UpdateInviteMessageRequest(string message = default(string)) { // to ensure "message" is required (not null) - if (message == null) - { + if (message == null) { throw new ArgumentNullException("message is a required property for UpdateInviteMessageRequest and cannot be null"); } this.Message = message; @@ -53,7 +52,7 @@ protected UpdateInviteMessageRequest() { } /// /// Gets or Sets Message /// - [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = false)] public string Message { get; set; } /// @@ -62,7 +61,7 @@ protected UpdateInviteMessageRequest() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class UpdateInviteMessageRequest {\n"); sb.Append(" Message: ").Append(Message).Append("\n"); sb.Append("}\n"); @@ -96,9 +95,8 @@ public override bool Equals(object input) public bool Equals(UpdateInviteMessageRequest input) { if (input == null) - { return false; - } + return ( this.Message == input.Message || @@ -117,9 +115,7 @@ public override int GetHashCode() { int hashCode = 41; if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } + hashCode = hashCode * 59 + this.Message.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/UpdateUserRequest.cs b/src/VRChat.API/Model/UpdateUserRequest.cs index 52b9dec0..06f5573c 100644 --- a/src/VRChat.API/Model/UpdateUserRequest.cs +++ b/src/VRChat.API/Model/UpdateUserRequest.cs @@ -43,7 +43,7 @@ public partial class UpdateUserRequest : IEquatable, IValidat /// email. /// birthday. /// acceptedTOSVersion. - /// . + /// tags. /// status. /// statusDescription. /// bio. @@ -82,9 +82,8 @@ public partial class UpdateUserRequest : IEquatable, IValidat public decimal AcceptedTOSVersion { get; set; } /// - /// + /// Gets or Sets Tags /// - /// [DataMember(Name = "tags", EmitDefaultValue = false)] public List Tags { get; set; } @@ -119,7 +118,7 @@ public partial class UpdateUserRequest : IEquatable, IValidat /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class UpdateUserRequest {\n"); sb.Append(" Email: ").Append(Email).Append("\n"); sb.Append(" Birthday: ").Append(Birthday).Append("\n"); @@ -161,9 +160,8 @@ public override bool Equals(object input) public bool Equals(UpdateUserRequest input) { if (input == null) - { return false; - } + return ( this.Email == input.Email || @@ -222,35 +220,21 @@ public override int GetHashCode() { int hashCode = 41; if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } + hashCode = hashCode * 59 + this.Email.GetHashCode(); if (this.Birthday != null) - { - hashCode = (hashCode * 59) + this.Birthday.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AcceptedTOSVersion.GetHashCode(); + hashCode = hashCode * 59 + this.Birthday.GetHashCode(); + hashCode = hashCode * 59 + this.AcceptedTOSVersion.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + hashCode = hashCode * 59 + this.Status.GetHashCode(); if (this.StatusDescription != null) - { - hashCode = (hashCode * 59) + this.StatusDescription.GetHashCode(); - } + hashCode = hashCode * 59 + this.StatusDescription.GetHashCode(); if (this.Bio != null) - { - hashCode = (hashCode * 59) + this.Bio.GetHashCode(); - } + hashCode = hashCode * 59 + this.Bio.GetHashCode(); if (this.BioLinks != null) - { - hashCode = (hashCode * 59) + this.BioLinks.GetHashCode(); - } + hashCode = hashCode * 59 + this.BioLinks.GetHashCode(); if (this.UserIcon != null) - { - hashCode = (hashCode * 59) + this.UserIcon.GetHashCode(); - } + hashCode = hashCode * 59 + this.UserIcon.GetHashCode(); return hashCode; } } @@ -263,13 +247,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Bio (string) minLength - if (this.Bio != null && this.Bio.Length < 0) + if(this.Bio != null && this.Bio.Length < 0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bio, length must be greater than 0.", new [] { "Bio" }); } // UserIcon (string) minLength - if (this.UserIcon != null && this.UserIcon.Length < 0) + if(this.UserIcon != null && this.UserIcon.Length < 0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UserIcon, length must be greater than 0.", new [] { "UserIcon" }); } diff --git a/src/VRChat.API/Model/UpdateWorldRequest.cs b/src/VRChat.API/Model/UpdateWorldRequest.cs index 169cce04..6294b0d3 100644 --- a/src/VRChat.API/Model/UpdateWorldRequest.cs +++ b/src/VRChat.API/Model/UpdateWorldRequest.cs @@ -50,7 +50,7 @@ public partial class UpdateWorldRequest : IEquatable, IValid /// name. /// 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`.. /// releaseStatus. - /// . + /// tags. /// unityPackageUrl. /// unityVersion (default to "5.3.4p1"). public UpdateWorldRequest(string assetUrl = default(string), string assetVersion = default(string), string authorId = default(string), string authorName = default(string), int capacity = default(int), string description = default(string), string imageUrl = default(string), string name = default(string), string platform = default(string), ReleaseStatus? releaseStatus = default(ReleaseStatus?), List tags = default(List), string unityPackageUrl = default(string), string unityVersion = "5.3.4p1") @@ -128,9 +128,8 @@ public partial class UpdateWorldRequest : IEquatable, IValid public string Platform { get; set; } /// - /// + /// Gets or Sets Tags /// - /// [DataMember(Name = "tags", EmitDefaultValue = false)] public List Tags { get; set; } @@ -152,7 +151,7 @@ public partial class UpdateWorldRequest : IEquatable, IValid /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class UpdateWorldRequest {\n"); sb.Append(" AssetUrl: ").Append(AssetUrl).Append("\n"); sb.Append(" AssetVersion: ").Append(AssetVersion).Append("\n"); @@ -198,9 +197,8 @@ public override bool Equals(object input) public bool Equals(UpdateWorldRequest input) { if (input == null) - { return false; - } + return ( this.AssetUrl == input.AssetUrl || @@ -278,51 +276,29 @@ public override int GetHashCode() { int hashCode = 41; if (this.AssetUrl != null) - { - hashCode = (hashCode * 59) + this.AssetUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.AssetUrl.GetHashCode(); if (this.AssetVersion != null) - { - hashCode = (hashCode * 59) + this.AssetVersion.GetHashCode(); - } + hashCode = hashCode * 59 + this.AssetVersion.GetHashCode(); if (this.AuthorId != null) - { - hashCode = (hashCode * 59) + this.AuthorId.GetHashCode(); - } + hashCode = hashCode * 59 + this.AuthorId.GetHashCode(); if (this.AuthorName != null) - { - hashCode = (hashCode * 59) + this.AuthorName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Capacity.GetHashCode(); + hashCode = hashCode * 59 + this.AuthorName.GetHashCode(); + hashCode = hashCode * 59 + this.Capacity.GetHashCode(); if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } + hashCode = hashCode * 59 + this.Description.GetHashCode(); if (this.ImageUrl != null) - { - hashCode = (hashCode * 59) + this.ImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.Platform != null) - { - hashCode = (hashCode * 59) + this.Platform.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReleaseStatus.GetHashCode(); + hashCode = hashCode * 59 + this.Platform.GetHashCode(); + hashCode = hashCode * 59 + this.ReleaseStatus.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); if (this.UnityPackageUrl != null) - { - hashCode = (hashCode * 59) + this.UnityPackageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityPackageUrl.GetHashCode(); if (this.UnityVersion != null) - { - hashCode = (hashCode * 59) + this.UnityVersion.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityVersion.GetHashCode(); return hashCode; } } @@ -335,55 +311,55 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AssetUrl (string) minLength - if (this.AssetUrl != null && this.AssetUrl.Length < 1) + if(this.AssetUrl != null && this.AssetUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AssetUrl, length must be greater than 1.", new [] { "AssetUrl" }); } // AssetVersion (string) minLength - if (this.AssetVersion != null && this.AssetVersion.Length < 1) + if(this.AssetVersion != null && this.AssetVersion.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AssetVersion, length must be greater than 1.", new [] { "AssetVersion" }); } // AuthorName (string) minLength - if (this.AuthorName != null && this.AuthorName.Length < 1) + if(this.AuthorName != null && this.AuthorName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorName, length must be greater than 1.", new [] { "AuthorName" }); } // Capacity (int) maximum - if (this.Capacity > (int)40) + if(this.Capacity > (int)40) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Capacity, must be a value less than or equal to 40.", new [] { "Capacity" }); } // Capacity (int) minimum - if (this.Capacity < (int)0) + if(this.Capacity < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Capacity, must be a value greater than or equal to 0.", new [] { "Capacity" }); } // ImageUrl (string) minLength - if (this.ImageUrl != null && this.ImageUrl.Length < 1) + if(this.ImageUrl != null && this.ImageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImageUrl, length must be greater than 1.", new [] { "ImageUrl" }); } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // UnityPackageUrl (string) minLength - if (this.UnityPackageUrl != null && this.UnityPackageUrl.Length < 1) + if(this.UnityPackageUrl != null && this.UnityPackageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UnityPackageUrl, length must be greater than 1.", new [] { "UnityPackageUrl" }); } // UnityVersion (string) minLength - if (this.UnityVersion != null && this.UnityVersion.Length < 1) + if(this.UnityVersion != null && this.UnityVersion.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UnityVersion, length must be greater than 1.", new [] { "UnityVersion" }); } diff --git a/src/VRChat.API/Model/User.cs b/src/VRChat.API/Model/User.cs index 0c6607bc..9b6d8628 100644 --- a/src/VRChat.API/Model/User.cs +++ b/src/VRChat.API/Model/User.cs @@ -35,19 +35,19 @@ public partial class User : IEquatable, IValidatableObject /// /// Gets or Sets DeveloperType /// - [DataMember(Name = "developerType", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "developerType", IsRequired = true, EmitDefaultValue = false)] public DeveloperType DeveloperType { get; set; } /// /// Gets or Sets State /// - [DataMember(Name = "state", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "state", IsRequired = true, EmitDefaultValue = false)] public UserState State { get; set; } /// /// Gets or Sets Status /// - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] public UserStatus Status { get; set; } /// /// Initializes a new instance of the class. @@ -79,7 +79,7 @@ protected User() { } /// state (required). /// status (required). /// statusDescription (required). - /// (required). + /// tags (required). /// travelingToInstance. /// travelingToLocation. /// travelingToWorld. @@ -90,91 +90,77 @@ protected User() { } { this.AllowAvatarCopying = allowAvatarCopying; // to ensure "bio" is required (not null) - if (bio == null) - { + if (bio == null) { throw new ArgumentNullException("bio is a required property for User and cannot be null"); } this.Bio = bio; // to ensure "bioLinks" is required (not null) - if (bioLinks == null) - { + if (bioLinks == null) { throw new ArgumentNullException("bioLinks is a required property for User and cannot be null"); } this.BioLinks = bioLinks; // to ensure "currentAvatarImageUrl" is required (not null) - if (currentAvatarImageUrl == null) - { + if (currentAvatarImageUrl == null) { throw new ArgumentNullException("currentAvatarImageUrl is a required property for User and cannot be null"); } this.CurrentAvatarImageUrl = currentAvatarImageUrl; // to ensure "currentAvatarThumbnailImageUrl" is required (not null) - if (currentAvatarThumbnailImageUrl == null) - { + if (currentAvatarThumbnailImageUrl == null) { throw new ArgumentNullException("currentAvatarThumbnailImageUrl is a required property for User and cannot be null"); } this.CurrentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; this.DateJoined = dateJoined; this.DeveloperType = developerType; // to ensure "displayName" is required (not null) - if (displayName == null) - { + if (displayName == null) { throw new ArgumentNullException("displayName is a required property for User and cannot be null"); } this.DisplayName = displayName; // to ensure "friendKey" is required (not null) - if (friendKey == null) - { + if (friendKey == null) { throw new ArgumentNullException("friendKey is a required property for User and cannot be null"); } this.FriendKey = friendKey; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for User and cannot be null"); } this.Id = id; this.IsFriend = isFriend; // to ensure "lastActivity" is required (not null) - if (lastActivity == null) - { + if (lastActivity == null) { throw new ArgumentNullException("lastActivity is a required property for User and cannot be null"); } this.LastActivity = lastActivity; // to ensure "lastLogin" is required (not null) - if (lastLogin == null) - { + if (lastLogin == null) { throw new ArgumentNullException("lastLogin is a required property for User and cannot be null"); } this.LastLogin = lastLogin; // to ensure "lastPlatform" is required (not null) - if (lastPlatform == null) - { + if (lastPlatform == null) { throw new ArgumentNullException("lastPlatform is a required property for User and cannot be null"); } this.LastPlatform = lastPlatform; // to ensure "profilePicOverride" is required (not null) - if (profilePicOverride == null) - { + if (profilePicOverride == null) { throw new ArgumentNullException("profilePicOverride is a required property for User and cannot be null"); } this.ProfilePicOverride = profilePicOverride; this.State = state; this.Status = status; // to ensure "statusDescription" is required (not null) - if (statusDescription == null) - { + if (statusDescription == null) { throw new ArgumentNullException("statusDescription is a required property for User and cannot be null"); } this.StatusDescription = statusDescription; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for User and cannot be null"); } this.Tags = tags; // to ensure "userIcon" is required (not null) - if (userIcon == null) - { + if (userIcon == null) { throw new ArgumentNullException("userIcon is a required property for User and cannot be null"); } this.UserIcon = userIcon; @@ -198,33 +184,33 @@ protected User() { } /// /// Gets or Sets Bio /// - [DataMember(Name = "bio", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "bio", IsRequired = true, EmitDefaultValue = false)] public string Bio { get; set; } /// /// Gets or Sets BioLinks /// - [DataMember(Name = "bioLinks", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "bioLinks", IsRequired = true, EmitDefaultValue = false)] public List BioLinks { get; set; } /// /// When profilePicOverride is not empty, use it instead. /// /// When profilePicOverride is not empty, use it instead. - [DataMember(Name = "currentAvatarImageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "currentAvatarImageUrl", IsRequired = true, EmitDefaultValue = false)] public string CurrentAvatarImageUrl { get; set; } /// /// When profilePicOverride is not empty, use it instead. /// /// When profilePicOverride is not empty, use it instead. - [DataMember(Name = "currentAvatarThumbnailImageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "currentAvatarThumbnailImageUrl", IsRequired = true, EmitDefaultValue = false)] public string CurrentAvatarThumbnailImageUrl { get; set; } /// /// Gets or Sets DateJoined /// - [DataMember(Name = "date_joined", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "date_joined", IsRequired = true, EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime DateJoined { get; set; } @@ -232,13 +218,13 @@ protected User() { } /// 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. /// /// 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. - [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = false)] public string DisplayName { get; set; } /// /// Gets or Sets FriendKey /// - [DataMember(Name = "friendKey", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "friendKey", IsRequired = true, EmitDefaultValue = false)] public string FriendKey { get; set; } /// @@ -251,7 +237,7 @@ protected User() { } /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// @@ -272,21 +258,21 @@ protected User() { } /// Either a date-time or empty string. /// /// Either a date-time or empty string. - [DataMember(Name = "last_activity", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "last_activity", IsRequired = true, EmitDefaultValue = false)] public string LastActivity { get; set; } /// /// Either a date-time or empty string. /// /// Either a date-time or empty string. - [DataMember(Name = "last_login", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "last_login", IsRequired = true, EmitDefaultValue = false)] public string LastLogin { get; set; } /// /// 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 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`. - [DataMember(Name = "last_platform", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "last_platform", IsRequired = true, EmitDefaultValue = false)] public string LastPlatform { get; set; } /// @@ -305,20 +291,19 @@ protected User() { } /// /// Gets or Sets ProfilePicOverride /// - [DataMember(Name = "profilePicOverride", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "profilePicOverride", IsRequired = true, EmitDefaultValue = false)] public string ProfilePicOverride { get; set; } /// /// Gets or Sets StatusDescription /// - [DataMember(Name = "statusDescription", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "statusDescription", IsRequired = true, EmitDefaultValue = false)] public string StatusDescription { get; set; } /// - /// + /// Gets or Sets Tags /// - /// - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// @@ -342,7 +327,7 @@ protected User() { } /// /// Gets or Sets UserIcon /// - [DataMember(Name = "userIcon", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "userIcon", IsRequired = true, EmitDefaultValue = false)] public string UserIcon { get; set; } /// @@ -366,7 +351,7 @@ protected User() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class User {\n"); sb.Append(" AllowAvatarCopying: ").Append(AllowAvatarCopying).Append("\n"); sb.Append(" Bio: ").Append(Bio).Append("\n"); @@ -428,9 +413,8 @@ public override bool Equals(object input) public bool Equals(User input) { if (input == null) - { return false; - } + return ( this.AllowAvatarCopying == input.AllowAvatarCopying || @@ -585,107 +569,59 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.AllowAvatarCopying.GetHashCode(); + hashCode = hashCode * 59 + this.AllowAvatarCopying.GetHashCode(); if (this.Bio != null) - { - hashCode = (hashCode * 59) + this.Bio.GetHashCode(); - } + hashCode = hashCode * 59 + this.Bio.GetHashCode(); if (this.BioLinks != null) - { - hashCode = (hashCode * 59) + this.BioLinks.GetHashCode(); - } + hashCode = hashCode * 59 + this.BioLinks.GetHashCode(); if (this.CurrentAvatarImageUrl != null) - { - hashCode = (hashCode * 59) + this.CurrentAvatarImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.CurrentAvatarImageUrl.GetHashCode(); if (this.CurrentAvatarThumbnailImageUrl != null) - { - hashCode = (hashCode * 59) + this.CurrentAvatarThumbnailImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.CurrentAvatarThumbnailImageUrl.GetHashCode(); if (this.DateJoined != null) - { - hashCode = (hashCode * 59) + this.DateJoined.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DeveloperType.GetHashCode(); + hashCode = hashCode * 59 + this.DateJoined.GetHashCode(); + hashCode = hashCode * 59 + this.DeveloperType.GetHashCode(); if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } + hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); if (this.FriendKey != null) - { - hashCode = (hashCode * 59) + this.FriendKey.GetHashCode(); - } + hashCode = hashCode * 59 + this.FriendKey.GetHashCode(); if (this.FriendRequestStatus != null) - { - hashCode = (hashCode * 59) + this.FriendRequestStatus.GetHashCode(); - } + hashCode = hashCode * 59 + this.FriendRequestStatus.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.InstanceId != null) - { - hashCode = (hashCode * 59) + this.InstanceId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsFriend.GetHashCode(); + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + hashCode = hashCode * 59 + this.IsFriend.GetHashCode(); if (this.LastActivity != null) - { - hashCode = (hashCode * 59) + this.LastActivity.GetHashCode(); - } + hashCode = hashCode * 59 + this.LastActivity.GetHashCode(); if (this.LastLogin != null) - { - hashCode = (hashCode * 59) + this.LastLogin.GetHashCode(); - } + hashCode = hashCode * 59 + this.LastLogin.GetHashCode(); if (this.LastPlatform != null) - { - hashCode = (hashCode * 59) + this.LastPlatform.GetHashCode(); - } + hashCode = hashCode * 59 + this.LastPlatform.GetHashCode(); if (this.Location != null) - { - hashCode = (hashCode * 59) + this.Location.GetHashCode(); - } + hashCode = hashCode * 59 + this.Location.GetHashCode(); if (this.Note != null) - { - hashCode = (hashCode * 59) + this.Note.GetHashCode(); - } + hashCode = hashCode * 59 + this.Note.GetHashCode(); if (this.ProfilePicOverride != null) - { - hashCode = (hashCode * 59) + this.ProfilePicOverride.GetHashCode(); - } - hashCode = (hashCode * 59) + this.State.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); + hashCode = hashCode * 59 + this.ProfilePicOverride.GetHashCode(); + hashCode = hashCode * 59 + this.State.GetHashCode(); + hashCode = hashCode * 59 + this.Status.GetHashCode(); if (this.StatusDescription != null) - { - hashCode = (hashCode * 59) + this.StatusDescription.GetHashCode(); - } + hashCode = hashCode * 59 + this.StatusDescription.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); if (this.TravelingToInstance != null) - { - hashCode = (hashCode * 59) + this.TravelingToInstance.GetHashCode(); - } + hashCode = hashCode * 59 + this.TravelingToInstance.GetHashCode(); if (this.TravelingToLocation != null) - { - hashCode = (hashCode * 59) + this.TravelingToLocation.GetHashCode(); - } + hashCode = hashCode * 59 + this.TravelingToLocation.GetHashCode(); if (this.TravelingToWorld != null) - { - hashCode = (hashCode * 59) + this.TravelingToWorld.GetHashCode(); - } + hashCode = hashCode * 59 + this.TravelingToWorld.GetHashCode(); if (this.UserIcon != null) - { - hashCode = (hashCode * 59) + this.UserIcon.GetHashCode(); - } + hashCode = hashCode * 59 + this.UserIcon.GetHashCode(); if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } + hashCode = hashCode * 59 + this.Username.GetHashCode(); if (this.WorldId != null) - { - hashCode = (hashCode * 59) + this.WorldId.GetHashCode(); - } + hashCode = hashCode * 59 + this.WorldId.GetHashCode(); return hashCode; } } @@ -698,13 +634,13 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Bio (string) maxLength - if (this.Bio != null && this.Bio.Length > 512) + if(this.Bio != null && this.Bio.Length > 512) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bio, length must be less than 512.", new [] { "Bio" }); } // Bio (string) minLength - if (this.Bio != null && this.Bio.Length < 0) + if(this.Bio != null && this.Bio.Length < 0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bio, length must be greater than 0.", new [] { "Bio" }); } diff --git a/src/VRChat.API/Model/UserExists.cs b/src/VRChat.API/Model/UserExists.cs index eeb23eb0..784a09f3 100644 --- a/src/VRChat.API/Model/UserExists.cs +++ b/src/VRChat.API/Model/UserExists.cs @@ -58,7 +58,7 @@ public UserExists(bool userExists = false) /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class UserExists {\n"); sb.Append(" _UserExists: ").Append(_UserExists).Append("\n"); sb.Append("}\n"); @@ -92,9 +92,8 @@ public override bool Equals(object input) public bool Equals(UserExists input) { if (input == null) - { return false; - } + return ( this._UserExists == input._UserExists || @@ -111,7 +110,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this._UserExists.GetHashCode(); + hashCode = hashCode * 59 + this._UserExists.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/UserSubscription.cs b/src/VRChat.API/Model/UserSubscription.cs index c3b0a2d5..f2c02208 100644 --- a/src/VRChat.API/Model/UserSubscription.cs +++ b/src/VRChat.API/Model/UserSubscription.cs @@ -35,13 +35,13 @@ public partial class UserSubscription : IEquatable, IValidatab /// /// Gets or Sets Period /// - [DataMember(Name = "period", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "period", IsRequired = true, EmitDefaultValue = false)] public SubscriptionPeriod Period { get; set; } /// /// Gets or Sets Status /// - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] public TransactionStatus Status { get; set; } /// /// Initializes a new instance of the class. @@ -69,27 +69,23 @@ protected UserSubscription() { } public UserSubscription(string id = default(string), string transactionId = default(string), string store = default(string), string steamItemId = default(string), decimal amount = default(decimal), string description = default(string), SubscriptionPeriod period = default(SubscriptionPeriod), decimal tier = default(decimal), bool active = true, TransactionStatus status = default(TransactionStatus), DateTime expires = default(DateTime), DateTime createdAt = default(DateTime), DateTime updatedAt = default(DateTime), List licenseGroups = default(List), bool isGift = false) { // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for UserSubscription and cannot be null"); } this.Id = id; // to ensure "transactionId" is required (not null) - if (transactionId == null) - { + if (transactionId == null) { throw new ArgumentNullException("transactionId is a required property for UserSubscription and cannot be null"); } this.TransactionId = transactionId; // to ensure "store" is required (not null) - if (store == null) - { + if (store == null) { throw new ArgumentNullException("store is a required property for UserSubscription and cannot be null"); } this.Store = store; this.Amount = amount; // to ensure "description" is required (not null) - if (description == null) - { + if (description == null) { throw new ArgumentNullException("description is a required property for UserSubscription and cannot be null"); } this.Description = description; @@ -101,8 +97,7 @@ protected UserSubscription() { } this.CreatedAt = createdAt; this.UpdatedAt = updatedAt; // to ensure "licenseGroups" is required (not null) - if (licenseGroups == null) - { + if (licenseGroups == null) { throw new ArgumentNullException("licenseGroups is a required property for UserSubscription and cannot be null"); } this.LicenseGroups = licenseGroups; @@ -113,20 +108,20 @@ protected UserSubscription() { } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets TransactionId /// - [DataMember(Name = "transactionId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "transactionId", IsRequired = true, EmitDefaultValue = false)] public string TransactionId { get; set; } /// /// Which \"Store\" it came from. Right now only Stores are \"Steam\" and \"Admin\". /// /// Which \"Store\" it came from. Right now only Stores are \"Steam\" and \"Admin\". - [DataMember(Name = "store", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "store", IsRequired = true, EmitDefaultValue = false)] public string Store { get; set; } /// @@ -138,19 +133,19 @@ protected UserSubscription() { } /// /// Gets or Sets Amount /// - [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = false)] public decimal Amount { get; set; } /// /// Gets or Sets Description /// - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = false)] public string Description { get; set; } /// /// Gets or Sets Tier /// - [DataMember(Name = "tier", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tier", IsRequired = true, EmitDefaultValue = false)] public decimal Tier { get; set; } /// @@ -162,25 +157,25 @@ protected UserSubscription() { } /// /// Gets or Sets Expires /// - [DataMember(Name = "expires", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "expires", IsRequired = true, EmitDefaultValue = false)] public DateTime Expires { get; set; } /// /// Gets or Sets CreatedAt /// - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] public DateTime CreatedAt { get; set; } /// /// Gets or Sets UpdatedAt /// - [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } /// /// Gets or Sets LicenseGroups /// - [DataMember(Name = "licenseGroups", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "licenseGroups", IsRequired = true, EmitDefaultValue = false)] public List LicenseGroups { get; set; } /// @@ -195,7 +190,7 @@ protected UserSubscription() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class UserSubscription {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" TransactionId: ").Append(TransactionId).Append("\n"); @@ -243,9 +238,8 @@ public override bool Equals(object input) public bool Equals(UserSubscription input) { if (input == null) - { return false; - } + return ( this.Id == input.Id || @@ -329,47 +323,29 @@ public override int GetHashCode() { int hashCode = 41; if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.TransactionId != null) - { - hashCode = (hashCode * 59) + this.TransactionId.GetHashCode(); - } + hashCode = hashCode * 59 + this.TransactionId.GetHashCode(); if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } + hashCode = hashCode * 59 + this.Store.GetHashCode(); if (this.SteamItemId != null) - { - hashCode = (hashCode * 59) + this.SteamItemId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); + hashCode = hashCode * 59 + this.SteamItemId.GetHashCode(); + hashCode = hashCode * 59 + this.Amount.GetHashCode(); if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Period.GetHashCode(); - hashCode = (hashCode * 59) + this.Tier.GetHashCode(); - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.Period.GetHashCode(); + hashCode = hashCode * 59 + this.Tier.GetHashCode(); + hashCode = hashCode * 59 + this.Active.GetHashCode(); + hashCode = hashCode * 59 + this.Status.GetHashCode(); if (this.Expires != null) - { - hashCode = (hashCode * 59) + this.Expires.GetHashCode(); - } + hashCode = hashCode * 59 + this.Expires.GetHashCode(); if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); if (this.LicenseGroups != null) - { - hashCode = (hashCode * 59) + this.LicenseGroups.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsGift.GetHashCode(); + hashCode = hashCode * 59 + this.LicenseGroups.GetHashCode(); + hashCode = hashCode * 59 + this.IsGift.GetHashCode(); return hashCode; } } @@ -382,7 +358,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Id (string) minLength - if (this.Id != null && this.Id.Length < 1) + if(this.Id != null && this.Id.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Id, length must be greater than 1.", new [] { "Id" }); } @@ -395,13 +371,13 @@ public override int GetHashCode() } // Store (string) minLength - if (this.Store != null && this.Store.Length < 1) + if(this.Store != null && this.Store.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be greater than 1.", new [] { "Store" }); } // SteamItemId (string) minLength - if (this.SteamItemId != null && this.SteamItemId.Length < 1) + if(this.SteamItemId != null && this.SteamItemId.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SteamItemId, length must be greater than 1.", new [] { "SteamItemId" }); } diff --git a/src/VRChat.API/Model/Verify2FAResult.cs b/src/VRChat.API/Model/Verify2FAResult.cs index 848ff5c4..5c05e93e 100644 --- a/src/VRChat.API/Model/Verify2FAResult.cs +++ b/src/VRChat.API/Model/Verify2FAResult.cs @@ -57,7 +57,7 @@ protected Verify2FAResult() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class Verify2FAResult {\n"); sb.Append(" Verified: ").Append(Verified).Append("\n"); sb.Append("}\n"); @@ -91,9 +91,8 @@ public override bool Equals(object input) public bool Equals(Verify2FAResult input) { if (input == null) - { return false; - } + return ( this.Verified == input.Verified || @@ -110,7 +109,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Verified.GetHashCode(); + hashCode = hashCode * 59 + this.Verified.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/VerifyAuthTokenResult.cs b/src/VRChat.API/Model/VerifyAuthTokenResult.cs index 8c285481..8d353378 100644 --- a/src/VRChat.API/Model/VerifyAuthTokenResult.cs +++ b/src/VRChat.API/Model/VerifyAuthTokenResult.cs @@ -45,8 +45,7 @@ protected VerifyAuthTokenResult() { } { this.Ok = ok; // to ensure "token" is required (not null) - if (token == null) - { + if (token == null) { throw new ArgumentNullException("token is a required property for VerifyAuthTokenResult and cannot be null"); } this.Token = token; @@ -61,7 +60,7 @@ protected VerifyAuthTokenResult() { } /// /// Gets or Sets Token /// - [DataMember(Name = "token", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "token", IsRequired = true, EmitDefaultValue = false)] public string Token { get; set; } /// @@ -70,7 +69,7 @@ protected VerifyAuthTokenResult() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class VerifyAuthTokenResult {\n"); sb.Append(" Ok: ").Append(Ok).Append("\n"); sb.Append(" Token: ").Append(Token).Append("\n"); @@ -105,9 +104,8 @@ public override bool Equals(object input) public bool Equals(VerifyAuthTokenResult input) { if (input == null) - { return false; - } + return ( this.Ok == input.Ok || @@ -129,11 +127,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.Ok.GetHashCode(); + hashCode = hashCode * 59 + this.Ok.GetHashCode(); if (this.Token != null) - { - hashCode = (hashCode * 59) + this.Token.GetHashCode(); - } + hashCode = hashCode * 59 + this.Token.GetHashCode(); return hashCode; } } @@ -146,7 +142,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Token (string) minLength - if (this.Token != null && this.Token.Length < 1) + if(this.Token != null && this.Token.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Token, length must be greater than 1.", new [] { "Token" }); } diff --git a/src/VRChat.API/Model/World.cs b/src/VRChat.API/Model/World.cs index 75e89787..4571fae5 100644 --- a/src/VRChat.API/Model/World.cs +++ b/src/VRChat.API/Model/World.cs @@ -35,7 +35,7 @@ public partial class World : IEquatable, IValidatableObject /// /// Gets or Sets ReleaseStatus /// - [DataMember(Name = "releaseStatus", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "releaseStatus", IsRequired = true, EmitDefaultValue = false)] public ReleaseStatus ReleaseStatus { get; set; } /// /// Initializes a new instance of the class. @@ -67,7 +67,7 @@ protected World() { } /// Will always be `0` when unauthenticated. (default to 0). /// publicationDate (required). /// releaseStatus (required). - /// (required). + /// tags (required). /// thumbnailImageUrl (required). /// Empty if unauthenticated. (required). /// updatedAt (required). @@ -76,86 +76,73 @@ protected World() { } public World(string authorId = default(string), string authorName = default(string), int capacity = default(int), DateTime createdAt = default(DateTime), string description = default(string), int favorites = 0, bool featured = false, int heat = 0, string id = default(string), string imageUrl = default(string), List> instances = default(List>), string labsPublicationDate = default(string), string name = default(string), string _namespace = default(string), int occupants = 0, string organization = "vrchat", int popularity = 0, string previewYoutubeId = default(string), int privateOccupants = 0, int publicOccupants = 0, string publicationDate = default(string), ReleaseStatus releaseStatus = default(ReleaseStatus), List tags = default(List), string thumbnailImageUrl = default(string), List unityPackages = default(List), DateTime updatedAt = default(DateTime), int version = 0, int visits = 0) { // to ensure "authorId" is required (not null) - if (authorId == null) - { + if (authorId == null) { throw new ArgumentNullException("authorId is a required property for World and cannot be null"); } this.AuthorId = authorId; // to ensure "authorName" is required (not null) - if (authorName == null) - { + if (authorName == null) { throw new ArgumentNullException("authorName is a required property for World and cannot be null"); } this.AuthorName = authorName; this.Capacity = capacity; this.CreatedAt = createdAt; // to ensure "description" is required (not null) - if (description == null) - { + if (description == null) { throw new ArgumentNullException("description is a required property for World and cannot be null"); } this.Description = description; this.Featured = featured; this.Heat = heat; // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for World and cannot be null"); } this.Id = id; // to ensure "imageUrl" is required (not null) - if (imageUrl == null) - { + if (imageUrl == null) { throw new ArgumentNullException("imageUrl is a required property for World and cannot be null"); } this.ImageUrl = imageUrl; // to ensure "labsPublicationDate" is required (not null) - if (labsPublicationDate == null) - { + if (labsPublicationDate == null) { throw new ArgumentNullException("labsPublicationDate is a required property for World and cannot be null"); } this.LabsPublicationDate = labsPublicationDate; // to ensure "name" is required (not null) - if (name == null) - { + if (name == null) { throw new ArgumentNullException("name is a required property for World and cannot be null"); } this.Name = name; // to ensure "_namespace" is required (not null) - if (_namespace == null) - { + if (_namespace == null) { throw new ArgumentNullException("_namespace is a required property for World and cannot be null"); } this.Namespace = _namespace; // to ensure "organization" is required (not null) - if (organization == null) - { + if (organization == null) { throw new ArgumentNullException("organization is a required property for World and cannot be null"); } this.Organization = organization; this.Popularity = popularity; // to ensure "publicationDate" is required (not null) - if (publicationDate == null) - { + if (publicationDate == null) { throw new ArgumentNullException("publicationDate is a required property for World and cannot be null"); } this.PublicationDate = publicationDate; this.ReleaseStatus = releaseStatus; // to ensure "tags" is required (not null) - if (tags == null) - { + if (tags == null) { throw new ArgumentNullException("tags is a required property for World and cannot be null"); } this.Tags = tags; // to ensure "thumbnailImageUrl" is required (not null) - if (thumbnailImageUrl == null) - { + if (thumbnailImageUrl == null) { throw new ArgumentNullException("thumbnailImageUrl is a required property for World and cannot be null"); } this.ThumbnailImageUrl = thumbnailImageUrl; // to ensure "unityPackages" is required (not null) - if (unityPackages == null) - { + if (unityPackages == null) { throw new ArgumentNullException("unityPackages is a required property for World and cannot be null"); } this.UnityPackages = unityPackages; @@ -174,31 +161,31 @@ protected World() { } /// A users unique ID, usually in the form 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 users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. - [DataMember(Name = "authorId", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "authorId", IsRequired = true, EmitDefaultValue = false)] public string AuthorId { get; set; } /// /// Gets or Sets AuthorName /// - [DataMember(Name = "authorName", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "authorName", IsRequired = true, EmitDefaultValue = false)] public string AuthorName { get; set; } /// /// Gets or Sets Capacity /// - [DataMember(Name = "capacity", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "capacity", IsRequired = true, EmitDefaultValue = false)] public int Capacity { get; set; } /// /// Gets or Sets CreatedAt /// - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] public DateTime CreatedAt { get; set; } /// /// Gets or Sets Description /// - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = false)] public string Description { get; set; } /// @@ -216,20 +203,20 @@ protected World() { } /// /// Gets or Sets Heat /// - [DataMember(Name = "heat", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "heat", IsRequired = true, EmitDefaultValue = false)] public int Heat { get; set; } /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets ImageUrl /// - [DataMember(Name = "imageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "imageUrl", IsRequired = true, EmitDefaultValue = false)] public string ImageUrl { get; set; } /// @@ -242,19 +229,19 @@ protected World() { } /// /// Gets or Sets LabsPublicationDate /// - [DataMember(Name = "labsPublicationDate", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "labsPublicationDate", IsRequired = true, EmitDefaultValue = false)] public string LabsPublicationDate { get; set; } /// /// Gets or Sets Name /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// /// Gets or Sets Namespace /// - [DataMember(Name = "namespace", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "namespace", IsRequired = true, EmitDefaultValue = false)] public string Namespace { get; set; } /// @@ -267,13 +254,13 @@ protected World() { } /// /// Gets or Sets Organization /// - [DataMember(Name = "organization", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "organization", IsRequired = true, EmitDefaultValue = false)] public string Organization { get; set; } /// /// Gets or Sets Popularity /// - [DataMember(Name = "popularity", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "popularity", IsRequired = true, EmitDefaultValue = false)] public int Popularity { get; set; } /// @@ -299,45 +286,44 @@ protected World() { } /// /// Gets or Sets PublicationDate /// - [DataMember(Name = "publicationDate", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "publicationDate", IsRequired = true, EmitDefaultValue = false)] public string PublicationDate { get; set; } /// - /// + /// Gets or Sets Tags /// - /// - [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = false)] public List Tags { get; set; } /// /// Gets or Sets ThumbnailImageUrl /// - [DataMember(Name = "thumbnailImageUrl", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "thumbnailImageUrl", IsRequired = true, EmitDefaultValue = false)] public string ThumbnailImageUrl { get; set; } /// /// Empty if unauthenticated. /// /// Empty if unauthenticated. - [DataMember(Name = "unityPackages", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "unityPackages", IsRequired = true, EmitDefaultValue = false)] public List UnityPackages { get; set; } /// /// Gets or Sets UpdatedAt /// - [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } /// /// Gets or Sets _Version /// - [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = false)] public int _Version { get; set; } /// /// Gets or Sets Visits /// - [DataMember(Name = "visits", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "visits", IsRequired = true, EmitDefaultValue = false)] public int Visits { get; set; } /// @@ -346,7 +332,7 @@ protected World() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class World {\n"); sb.Append(" AuthorId: ").Append(AuthorId).Append("\n"); sb.Append(" AuthorName: ").Append(AuthorName).Append("\n"); @@ -407,9 +393,8 @@ public override bool Equals(object input) public bool Equals(World input) { if (input == null) - { return false; - } + return ( this.AuthorId == input.AuthorId || @@ -555,84 +540,50 @@ public override int GetHashCode() { int hashCode = 41; if (this.AuthorId != null) - { - hashCode = (hashCode * 59) + this.AuthorId.GetHashCode(); - } + hashCode = hashCode * 59 + this.AuthorId.GetHashCode(); if (this.AuthorName != null) - { - hashCode = (hashCode * 59) + this.AuthorName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Capacity.GetHashCode(); + hashCode = hashCode * 59 + this.AuthorName.GetHashCode(); + hashCode = hashCode * 59 + this.Capacity.GetHashCode(); if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Favorites.GetHashCode(); - hashCode = (hashCode * 59) + this.Featured.GetHashCode(); - hashCode = (hashCode * 59) + this.Heat.GetHashCode(); + hashCode = hashCode * 59 + this.Description.GetHashCode(); + hashCode = hashCode * 59 + this.Favorites.GetHashCode(); + hashCode = hashCode * 59 + this.Featured.GetHashCode(); + hashCode = hashCode * 59 + this.Heat.GetHashCode(); if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.ImageUrl != null) - { - hashCode = (hashCode * 59) + this.ImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); if (this.Instances != null) - { - hashCode = (hashCode * 59) + this.Instances.GetHashCode(); - } + hashCode = hashCode * 59 + this.Instances.GetHashCode(); if (this.LabsPublicationDate != null) - { - hashCode = (hashCode * 59) + this.LabsPublicationDate.GetHashCode(); - } + hashCode = hashCode * 59 + this.LabsPublicationDate.GetHashCode(); if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } + hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.Namespace != null) - { - hashCode = (hashCode * 59) + this.Namespace.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Occupants.GetHashCode(); + hashCode = hashCode * 59 + this.Namespace.GetHashCode(); + hashCode = hashCode * 59 + this.Occupants.GetHashCode(); if (this.Organization != null) - { - hashCode = (hashCode * 59) + this.Organization.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Popularity.GetHashCode(); + hashCode = hashCode * 59 + this.Organization.GetHashCode(); + hashCode = hashCode * 59 + this.Popularity.GetHashCode(); if (this.PreviewYoutubeId != null) - { - hashCode = (hashCode * 59) + this.PreviewYoutubeId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PrivateOccupants.GetHashCode(); - hashCode = (hashCode * 59) + this.PublicOccupants.GetHashCode(); + hashCode = hashCode * 59 + this.PreviewYoutubeId.GetHashCode(); + hashCode = hashCode * 59 + this.PrivateOccupants.GetHashCode(); + hashCode = hashCode * 59 + this.PublicOccupants.GetHashCode(); if (this.PublicationDate != null) - { - hashCode = (hashCode * 59) + this.PublicationDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReleaseStatus.GetHashCode(); + hashCode = hashCode * 59 + this.PublicationDate.GetHashCode(); + hashCode = hashCode * 59 + this.ReleaseStatus.GetHashCode(); if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } + hashCode = hashCode * 59 + this.Tags.GetHashCode(); if (this.ThumbnailImageUrl != null) - { - hashCode = (hashCode * 59) + this.ThumbnailImageUrl.GetHashCode(); - } + hashCode = hashCode * 59 + this.ThumbnailImageUrl.GetHashCode(); if (this.UnityPackages != null) - { - hashCode = (hashCode * 59) + this.UnityPackages.GetHashCode(); - } + hashCode = hashCode * 59 + this.UnityPackages.GetHashCode(); if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this._Version.GetHashCode(); - hashCode = (hashCode * 59) + this.Visits.GetHashCode(); + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); + hashCode = hashCode * 59 + this._Version.GetHashCode(); + hashCode = hashCode * 59 + this.Visits.GetHashCode(); return hashCode; } } @@ -645,37 +596,37 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AuthorName (string) minLength - if (this.AuthorName != null && this.AuthorName.Length < 1) + if(this.AuthorName != null && this.AuthorName.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorName, length must be greater than 1.", new [] { "AuthorName" }); } // Capacity (int) maximum - if (this.Capacity > (int)40) + if(this.Capacity > (int)40) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Capacity, must be a value less than or equal to 40.", new [] { "Capacity" }); } // Capacity (int) minimum - if (this.Capacity < (int)0) + if(this.Capacity < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Capacity, must be a value greater than or equal to 0.", new [] { "Capacity" }); } // Description (string) minLength - if (this.Description != null && this.Description.Length < 0) + if(this.Description != null && this.Description.Length < 0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 0.", new [] { "Description" }); } // Favorites (int) minimum - if (this.Favorites < (int)0) + if(this.Favorites < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Favorites, must be a value greater than or equal to 0.", new [] { "Favorites" }); } // Heat (int) minimum - if (this.Heat < (int)0) + if(this.Heat < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Heat, must be a value greater than or equal to 0.", new [] { "Heat" }); } @@ -688,73 +639,73 @@ public override int GetHashCode() } // ImageUrl (string) minLength - if (this.ImageUrl != null && this.ImageUrl.Length < 1) + if(this.ImageUrl != null && this.ImageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImageUrl, length must be greater than 1.", new [] { "ImageUrl" }); } // LabsPublicationDate (string) minLength - if (this.LabsPublicationDate != null && this.LabsPublicationDate.Length < 1) + if(this.LabsPublicationDate != null && this.LabsPublicationDate.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LabsPublicationDate, length must be greater than 1.", new [] { "LabsPublicationDate" }); } // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) + if(this.Name != null && this.Name.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); } // Occupants (int) minimum - if (this.Occupants < (int)0) + if(this.Occupants < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Occupants, must be a value greater than or equal to 0.", new [] { "Occupants" }); } // Organization (string) minLength - if (this.Organization != null && this.Organization.Length < 1) + if(this.Organization != null && this.Organization.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Organization, length must be greater than 1.", new [] { "Organization" }); } // Popularity (int) minimum - if (this.Popularity < (int)0) + if(this.Popularity < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Popularity, must be a value greater than or equal to 0.", new [] { "Popularity" }); } // PrivateOccupants (int) minimum - if (this.PrivateOccupants < (int)0) + if(this.PrivateOccupants < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PrivateOccupants, must be a value greater than or equal to 0.", new [] { "PrivateOccupants" }); } // PublicOccupants (int) minimum - if (this.PublicOccupants < (int)0) + if(this.PublicOccupants < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PublicOccupants, must be a value greater than or equal to 0.", new [] { "PublicOccupants" }); } // PublicationDate (string) minLength - if (this.PublicationDate != null && this.PublicationDate.Length < 1) + if(this.PublicationDate != null && this.PublicationDate.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PublicationDate, length must be greater than 1.", new [] { "PublicationDate" }); } // ThumbnailImageUrl (string) minLength - if (this.ThumbnailImageUrl != null && this.ThumbnailImageUrl.Length < 1) + if(this.ThumbnailImageUrl != null && this.ThumbnailImageUrl.Length < 1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThumbnailImageUrl, length must be greater than 1.", new [] { "ThumbnailImageUrl" }); } // _Version (int) minimum - if (this._Version < (int)0) + if(this._Version < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Version, must be a value greater than or equal to 0.", new [] { "_Version" }); } // Visits (int) minimum - if (this.Visits < (int)0) + if(this.Visits < (int)0) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Visits, must be a value greater than or equal to 0.", new [] { "Visits" }); } diff --git a/src/VRChat.API/Model/WorldMetadata.cs b/src/VRChat.API/Model/WorldMetadata.cs index fa416847..ea3b740a 100644 --- a/src/VRChat.API/Model/WorldMetadata.cs +++ b/src/VRChat.API/Model/WorldMetadata.cs @@ -44,14 +44,12 @@ protected WorldMetadata() { } public WorldMetadata(string id = default(string), Object metadata = default(Object)) { // to ensure "id" is required (not null) - if (id == null) - { + if (id == null) { throw new ArgumentNullException("id is a required property for WorldMetadata and cannot be null"); } this.Id = id; // to ensure "metadata" is required (not null) - if (metadata == null) - { + if (metadata == null) { throw new ArgumentNullException("metadata is a required property for WorldMetadata and cannot be null"); } this.Metadata = metadata; @@ -61,13 +59,13 @@ protected WorldMetadata() { } /// WorldID be \"offline\" on User profiles if you are not friends with that user. /// /// WorldID be \"offline\" on User profiles if you are not friends with that user. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] public string Id { get; set; } /// /// Gets or Sets Metadata /// - [DataMember(Name = "metadata", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "metadata", IsRequired = true, EmitDefaultValue = false)] public Object Metadata { get; set; } /// @@ -76,7 +74,7 @@ protected WorldMetadata() { } /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class WorldMetadata {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Metadata: ").Append(Metadata).Append("\n"); @@ -111,9 +109,8 @@ public override bool Equals(object input) public bool Equals(WorldMetadata input) { if (input == null) - { return false; - } + return ( this.Id == input.Id || @@ -137,13 +134,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } + hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } + hashCode = hashCode * 59 + this.Metadata.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/Model/WorldPublishStatus.cs b/src/VRChat.API/Model/WorldPublishStatus.cs index e8526c1c..ed904c75 100644 --- a/src/VRChat.API/Model/WorldPublishStatus.cs +++ b/src/VRChat.API/Model/WorldPublishStatus.cs @@ -57,7 +57,7 @@ public WorldPublishStatus(bool canPubilsh = true) /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class WorldPublishStatus {\n"); sb.Append(" CanPubilsh: ").Append(CanPubilsh).Append("\n"); sb.Append("}\n"); @@ -91,9 +91,8 @@ public override bool Equals(object input) public bool Equals(WorldPublishStatus input) { if (input == null) - { return false; - } + return ( this.CanPubilsh == input.CanPubilsh || @@ -110,7 +109,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.CanPubilsh.GetHashCode(); + hashCode = hashCode * 59 + this.CanPubilsh.GetHashCode(); return hashCode; } } diff --git a/src/VRChat.API/VRChat.API.csproj b/src/VRChat.API/VRChat.API.csproj index 979a6737..3e3650ec 100644 --- a/src/VRChat.API/VRChat.API.csproj +++ b/src/VRChat.API/VRChat.API.csproj @@ -1,7 +1,7 @@ - false + false netstandard2.0 VRChat.API VRChat.API @@ -23,18 +23,12 @@ - - - - + + + + - - - - - -