using System; using System.Collections.Generic; using UnityEngine.Scripting; using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Unity.Services.Lobbies.Http; namespace Unity.Services.Lobbies.Models { /// /// The body of a Join Lobby request using lobby code. /// The lobby code of the lobby the join. Mutually exclusive with `id`. This is used to join a private lobby where the lobby code was shared to other users manually. /// player param /// [Preserve] [DataContract(Name = "JoinByCodeRequest")] public class JoinByCodeRequest { /// /// The body of a Join Lobby request using lobby code. /// /// The lobby code of the lobby the join. Mutually exclusive with `id`. This is used to join a private lobby where the lobby code was shared to other users manually. /// player param [Preserve] public JoinByCodeRequest(string lobbyCode, Player player = default) { LobbyCode = lobbyCode; Player = player; } /// /// The lobby code of the lobby the join. Mutually exclusive with `id`. This is used to join a private lobby where the lobby code was shared to other users manually. /// [Preserve] [DataMember(Name = "lobbyCode", IsRequired = true, EmitDefaultValue = true)] public string LobbyCode{ get; } [Preserve] [DataMember(Name = "player", EmitDefaultValue = false)] public Player Player{ get; } } }