Skip to content

Commit

Permalink
Upgrade C# SDK to spec 1.17.5
Browse files Browse the repository at this point in the history
  • Loading branch information
VRCCat committed May 27, 2024
1 parent 00feb84 commit ffc651a
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ docs/InfoPushDataArticleContent.md
docs/InfoPushDataClickable.md
docs/Instance.md
docs/InstancePlatforms.md
docs/InstanceRegion.md
docs/InstanceShortNameResponse.md
docs/InstanceType.md
docs/InstancesApi.md
Expand Down Expand Up @@ -257,6 +258,7 @@ src/VRChat.API/Model/InfoPushDataArticleContent.cs
src/VRChat.API/Model/InfoPushDataClickable.cs
src/VRChat.API/Model/Instance.cs
src/VRChat.API/Model/InstancePlatforms.cs
src/VRChat.API/Model/InstanceRegion.cs
src/VRChat.API/Model/InstanceShortNameResponse.cs
src/VRChat.API/Model/InstanceType.cs
src/VRChat.API/Model/InviteMessage.cs
Expand Down
2 changes: 1 addition & 1 deletion docs/CreateInstanceRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**WorldId** | **string** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**Type** | **InstanceType** | |
**Region** | **Region** | |
**Region** | **InstanceRegion** | |
**OwnerId** | **string** | A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise | [optional]
**RoleIds** | **List<string>** | Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\" | [optional]
**GroupAccessType** | **GroupAccessType** | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/Instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Name | Type | Description | Notes
**Permanent** | **bool** | | [default to false]
**PhotonRegion** | **Region** | |
**Platforms** | [**InstancePlatforms**](InstancePlatforms.md) | |
**Region** | **Region** | |
**Region** | **InstanceRegion** | |
**SecureName** | **string** | |
**ShortName** | **string** | | [optional]
**Tags** | **List<string>** | The tags array on Instances usually contain the language tags of the people in the instance. |
Expand Down
10 changes: 10 additions & 0 deletions docs/InstanceRegion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# VRChat.API.Model.InstanceRegion
Instance region

## 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)

2 changes: 1 addition & 1 deletion docs/User.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AllowAvatarCopying** | **bool** | | [default to true]
**Badges** | [**List<Badge>**](Badge.md) | |
**Badges** | [**List<Badge>**](Badge.md) | | [optional]
**Bio** | **string** | |
**BioLinks** | **List<string>** | |
**CurrentAvatarImageUrl** | **string** | When profilePicOverride is not empty, use it instead. |
Expand Down
4 changes: 2 additions & 2 deletions src/VRChat.API/Model/CreateInstanceRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public partial class CreateInstanceRequest : IEquatable<CreateInstanceRequest>,
/// Gets or Sets Region
/// </summary>
[DataMember(Name = "region", IsRequired = true, EmitDefaultValue = true)]
public Region Region { get; set; }
public InstanceRegion Region { get; set; }

/// <summary>
/// Gets or Sets GroupAccessType
Expand All @@ -68,7 +68,7 @@ protected CreateInstanceRequest() { }
/// <param name="canRequestInvite">Only applies to invite type instances to make them invite+ (default to false).</param>
/// <param name="hardClose">Currently unused, but will eventually be a flag to set if the closing of the instance should kick people. (default to false).</param>
/// <param name="inviteOnly">inviteOnly (default to false).</param>
public CreateInstanceRequest(string worldId = default(string), InstanceType type = default(InstanceType), Region region = default(Region), string ownerId = default(string), List<string> roleIds = default(List<string>), GroupAccessType? groupAccessType = default(GroupAccessType?), bool queueEnabled = false, DateTime closedAt = default(DateTime), bool canRequestInvite = false, bool hardClose = false, bool inviteOnly = false)
public CreateInstanceRequest(string worldId = default(string), InstanceType type = default(InstanceType), InstanceRegion region = default(InstanceRegion), string ownerId = default(string), List<string> roleIds = default(List<string>), GroupAccessType? groupAccessType = default(GroupAccessType?), bool queueEnabled = false, DateTime closedAt = default(DateTime), bool canRequestInvite = false, bool hardClose = false, bool inviteOnly = false)
{
// to ensure "worldId" is required (not null)
if (worldId == null)
Expand Down
6 changes: 3 additions & 3 deletions src/VRChat.API/Model/GroupAccessType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public enum GroupAccessType
Plus = 2,

/// <summary>
/// Enum Member for value: member
/// Enum Members for value: members
/// </summary>
[EnumMember(Value = "member")]
Member = 3
[EnumMember(Value = "members")]
Members = 3

}

Expand Down
4 changes: 2 additions & 2 deletions src/VRChat.API/Model/Instance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public partial class Instance : IEquatable<Instance>, IValidatableObject
/// Gets or Sets Region
/// </summary>
[DataMember(Name = "region", IsRequired = true, EmitDefaultValue = true)]
public Region Region { get; set; }
public InstanceRegion Region { get; set; }

/// <summary>
/// Gets or Sets Type
Expand Down Expand Up @@ -99,7 +99,7 @@ protected Instance() { }
/// <param name="nonce">nonce.</param>
/// <param name="closedAt">closedAt.</param>
/// <param name="hardClose">hardClose.</param>
public Instance(bool active = true, bool canRequestInvite = true, int capacity = default(int), string clientNumber = default(string), bool full = false, string id = default(string), string instanceId = default(string), string location = default(string), int nUsers = default(int), string name = default(string), string ownerId = default(string), bool permanent = false, Region photonRegion = default(Region), InstancePlatforms platforms = default(InstancePlatforms), Region region = default(Region), string secureName = default(string), string shortName = default(string), List<string> tags = default(List<string>), InstanceType type = default(InstanceType), string worldId = default(string), string hidden = default(string), string friends = default(string), string _private = default(string), bool queueEnabled = default(bool), int queueSize = default(int), int recommendedCapacity = default(int), bool roleRestricted = default(bool), bool strict = default(bool), int userCount = default(int), World world = default(World), List<LimitedUser> users = default(List<LimitedUser>), GroupAccessType? groupAccessType = default(GroupAccessType?), bool hasCapacityForYou = default(bool), string nonce = default(string), DateTime? closedAt = default(DateTime?), bool? hardClose = default(bool?))
public Instance(bool active = true, bool canRequestInvite = true, int capacity = default(int), string clientNumber = default(string), bool full = false, string id = default(string), string instanceId = default(string), string location = default(string), int nUsers = default(int), string name = default(string), string ownerId = default(string), bool permanent = false, Region photonRegion = default(Region), InstancePlatforms platforms = default(InstancePlatforms), InstanceRegion region = default(InstanceRegion), string secureName = default(string), string shortName = default(string), List<string> tags = default(List<string>), InstanceType type = default(InstanceType), string worldId = default(string), string hidden = default(string), string friends = default(string), string _private = default(string), bool queueEnabled = default(bool), int queueSize = default(int), int recommendedCapacity = default(int), bool roleRestricted = default(bool), bool strict = default(bool), int userCount = default(int), World world = default(World), List<LimitedUser> users = default(List<LimitedUser>), GroupAccessType? groupAccessType = default(GroupAccessType?), bool hasCapacityForYou = default(bool), string nonce = default(string), DateTime? closedAt = default(DateTime?), bool? hardClose = default(bool?))
{
this.Active = active;
this.CanRequestInvite = canRequestInvite;
Expand Down
61 changes: 61 additions & 0 deletions src/VRChat.API/Model/InstanceRegion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* VRChat API Documentation
*
*
* The version of the OpenAPI document: 1.17.5
* Contact: [email protected]
* 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
{
/// <summary>
/// Instance region
/// </summary>
/// <value>Instance region</value>
[JsonConverter(typeof(StringEnumConverter))]
public enum InstanceRegion
{
/// <summary>
/// Enum Us for value: us
/// </summary>
[EnumMember(Value = "us")]
Us = 1,

/// <summary>
/// Enum Use for value: use
/// </summary>
[EnumMember(Value = "use")]
Use = 2,

/// <summary>
/// Enum Eu for value: eu
/// </summary>
[EnumMember(Value = "eu")]
Eu = 3,

/// <summary>
/// Enum Jp for value: jp
/// </summary>
[EnumMember(Value = "jp")]
Jp = 4

}

}
11 changes: 3 additions & 8 deletions src/VRChat.API/Model/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected User() { }
/// Initializes a new instance of the <see cref="User" /> class.
/// </summary>
/// <param name="allowAvatarCopying">allowAvatarCopying (required) (default to true).</param>
/// <param name="badges"> (required).</param>
/// <param name="badges"> .</param>
/// <param name="bio">bio (required).</param>
/// <param name="bioLinks">bioLinks (required).</param>
/// <param name="currentAvatarImageUrl">When profilePicOverride is not empty, use it instead. (required).</param>
Expand Down Expand Up @@ -92,12 +92,6 @@ protected User() { }
public User(bool allowAvatarCopying = true, List<Badge> badges = default(List<Badge>), string bio = default(string), List<string> bioLinks = default(List<string>), string currentAvatarImageUrl = default(string), string currentAvatarThumbnailImageUrl = default(string), List<string> currentAvatarTags = default(List<string>), DateTime dateJoined = default(DateTime), DeveloperType developerType = default(DeveloperType), string displayName = default(string), string friendKey = default(string), string friendRequestStatus = default(string), string id = default(string), string instanceId = default(string), bool isFriend = default(bool), string lastActivity = default(string), string lastLogin = default(string), string lastPlatform = default(string), string location = default(string), string note = default(string), string profilePicOverride = default(string), string pronouns = default(string), UserState state = default(UserState), UserStatus status = default(UserStatus), string statusDescription = default(string), List<string> tags = default(List<string>), string travelingToInstance = default(string), string travelingToLocation = default(string), string travelingToWorld = default(string), string userIcon = default(string), string username = default(string), string worldId = default(string))
{
this.AllowAvatarCopying = allowAvatarCopying;
// to ensure "badges" is required (not null)
if (badges == null)
{
throw new ArgumentNullException("badges is a required property for User and cannot be null");
}
this.Badges = badges;
// to ensure "bio" is required (not null)
if (bio == null)
{
Expand Down Expand Up @@ -199,6 +193,7 @@ protected User() { }
throw new ArgumentNullException("userIcon is a required property for User and cannot be null");
}
this.UserIcon = userIcon;
this.Badges = badges;
this.FriendRequestStatus = friendRequestStatus;
this.InstanceId = instanceId;
this.Location = location;
Expand All @@ -220,7 +215,7 @@ protected User() { }
///
/// </summary>
/// <value> </value>
[DataMember(Name = "badges", IsRequired = true, EmitDefaultValue = true)]
[DataMember(Name = "badges", EmitDefaultValue = false)]
public List<Badge> Badges { get; set; }

/// <summary>
Expand Down

0 comments on commit ffc651a

Please sign in to comment.