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
{
///
/// Data about an individual lobby.
/// id param
/// A short code that be used to join a lobby. This is only visible to lobby members. Typically this is displayed to the user so they can share it with other players out of game. Users with the code can join the lobby even when it is private.
/// The Unity project ID of the game.
/// The name of the lobby. Typically this shown in game UI to represent the lobby.
/// The maximum number of players that can be members of the lobby.
/// The number of remaining open slots for players before the lobby becomes full.
/// Whether the lobby is private or not. Private lobbies do not appear in query results.
/// The members of the lobby.
/// Properties of the lobby set by the host.
/// The ID of the player that is the lobby host.
/// When the lobby was created. The timestamp is in UTC and conforms to ISO 8601.
/// When the lobby was last updated. The timestamp is in UTC and conforms to ISO 8601.
///
[Preserve]
[DataContract(Name = "Lobby")]
public class Lobby
{
///
/// Data about an individual lobby.
///
/// id param
/// A short code that be used to join a lobby. This is only visible to lobby members. Typically this is displayed to the user so they can share it with other players out of game. Users with the code can join the lobby even when it is private.
/// The Unity project ID of the game.
/// The name of the lobby. Typically this shown in game UI to represent the lobby.
/// The maximum number of players that can be members of the lobby.
/// The number of remaining open slots for players before the lobby becomes full.
/// Whether the lobby is private or not. Private lobbies do not appear in query results.
/// The members of the lobby.
/// Properties of the lobby set by the host.
/// The ID of the player that is the lobby host.
/// When the lobby was created. The timestamp is in UTC and conforms to ISO 8601.
/// When the lobby was last updated. The timestamp is in UTC and conforms to ISO 8601.
[Preserve]
public Lobby(string id = default, string lobbyCode = default, string upid = default, string name = default, int maxPlayers = default, int availableSlots = default, bool isPrivate = default, List players = default, Dictionary data = default, string hostId = default, DateTime created = default, DateTime lastUpdated = default)
{
Id = id;
LobbyCode = lobbyCode;
Upid = upid;
Name = name;
MaxPlayers = maxPlayers;
AvailableSlots = availableSlots;
IsPrivate = isPrivate;
Players = players;
Data = data;
HostId = hostId;
Created = created;
LastUpdated = lastUpdated;
}
[Preserve]
[DataMember(Name = "id", EmitDefaultValue = false)]
public string Id{ get; }
///
/// A short code that be used to join a lobby. This is only visible to lobby members. Typically this is displayed to the user so they can share it with other players out of game. Users with the code can join the lobby even when it is private.
///
[Preserve]
[DataMember(Name = "lobbyCode", EmitDefaultValue = false)]
public string LobbyCode{ get; }
///
/// The Unity project ID of the game.
///
[Preserve]
[DataMember(Name = "upid", EmitDefaultValue = false)]
public string Upid{ get; }
///
/// The name of the lobby. Typically this shown in game UI to represent the lobby.
///
[Preserve]
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name{ get; }
///
/// The maximum number of players that can be members of the lobby.
///
[Preserve]
[DataMember(Name = "maxPlayers", EmitDefaultValue = false)]
public int MaxPlayers{ get; }
///
/// The number of remaining open slots for players before the lobby becomes full.
///
[Preserve]
[DataMember(Name = "availableSlots", EmitDefaultValue = false)]
public int AvailableSlots{ get; }
///
/// Whether the lobby is private or not. Private lobbies do not appear in query results.
///
[Preserve]
[DataMember(Name = "isPrivate", EmitDefaultValue = true)]
public bool IsPrivate{ get; }
///
/// The members of the lobby.
///
[Preserve]
[DataMember(Name = "players", EmitDefaultValue = false)]
public List Players{ get; }
///
/// Properties of the lobby set by the host.
///
[Preserve]
[DataMember(Name = "data", EmitDefaultValue = false)]
public Dictionary Data{ get; }
///
/// The ID of the player that is the lobby host.
///
[Preserve]
[DataMember(Name = "hostId", EmitDefaultValue = false)]
public string HostId{ get; }
///
/// When the lobby was created. The timestamp is in UTC and conforms to ISO 8601.
///
[Preserve]
[DataMember(Name = "created", EmitDefaultValue = false)]
public DateTime Created{ get; }
///
/// When the lobby was last updated. The timestamp is in UTC and conforms to ISO 8601.
///
[Preserve]
[DataMember(Name = "lastUpdated", EmitDefaultValue = false)]
public DateTime LastUpdated{ get; }
}
}