
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace HathoraCloud.Models.Shared
{
    using HathoraCloud.Models.Shared;
    using Newtonsoft.Json;
    using System;
    using UnityEngine;
    
    /// <summary>
    /// A lobby object allows you to store and manage metadata for your rooms.
    /// </summary>
    [Serializable]
    public class Lobby
    {

        /// <summary>
        /// System generated unique identifier for an application.
        /// </summary>
        [SerializeField]
        [JsonProperty("appId")]
        public string AppId { get; set; } = default!;

        /// <summary>
        /// When the lobby was created.
        /// </summary>
        [SerializeField]
        [JsonProperty("createdAt")]
        public DateTime CreatedAt { get; set; } = default!;

        /// <summary>
        /// UserId or email address for the user that created the lobby.
        /// </summary>
        [SerializeField]
        [JsonProperty("createdBy")]
        public CreatedBy CreatedBy { get; set; } = default!;

        /// <summary>
        /// User input to initialize the game state. Object must be smaller than 64KB.
        /// </summary>
        [SerializeField]
        [JsonProperty("initialConfig")]
        public object InitialConfig { get; set; } = default!;

        [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")]
        [SerializeField]
        [JsonProperty("local")]
        public bool Local { get; set; } = default!;

        [SerializeField]
        [JsonProperty("region")]
        public Region Region { get; set; } = default!;

        /// <summary>
        /// Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own.<br/>
        /// 
        /// <remarks>
        /// Note: error will be returned if `roomId` is not globally unique.
        /// </remarks>
        /// </summary>
        [SerializeField]
        [JsonProperty("roomId")]
        public string RoomId { get; set; } = default!;

        [SerializeField]
        [JsonProperty("shortCode", NullValueHandling = NullValueHandling.Include)]
        public string? ShortCode { get; set; } = default!;

        /// <summary>
        /// JSON blob to store metadata for a room. Must be smaller than 1MB.
        /// </summary>
        [SerializeField]
        [JsonProperty("state")]
        public object? State { get; set; }

        /// <summary>
        /// Types of lobbies a player can create.<br/>
        /// 
        /// <remarks>
        /// <br/>
        /// `private`: the player who created the room must share the roomId with their friends<br/>
        /// <br/>
        /// `public`: visible in the public lobby list, anyone can join<br/>
        /// <br/>
        /// `local`: for testing with a server running locally
        /// </remarks>
        /// </summary>
        [SerializeField]
        [JsonProperty("visibility")]
        public LobbyVisibility Visibility { get; set; } = default!;
    }
}