
//------------------------------------------------------------------------------
// <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.Collections.Generic;
    using System;
    using UnityEngine;
    
    /// <summary>
    /// Deployment is a versioned configuration for a build that describes runtime behavior.
    /// </summary>
    [Serializable]
    public class DeploymentV1
    {

        /// <summary>
        /// Additional ports your server listens on.
        /// </summary>
        [SerializeField]
        [JsonProperty("additionalContainerPorts")]
        public List<ContainerPort> AdditionalContainerPorts { get; set; } = default!;

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

        /// <summary>
        /// System generated id for a build. Increments by 1.
        /// </summary>
        [SerializeField]
        [JsonProperty("buildId")]
        public int BuildId { get; set; } = default!;

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

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

        [SerializeField]
        [JsonProperty("createdBy")]
        public string CreatedBy { get; set; } = default!;

        /// <summary>
        /// A container port object represents the transport configruations for how your server will listen.
        /// </summary>
        [SerializeField]
        [JsonProperty("defaultContainerPort")]
        public ContainerPort DefaultContainerPort { get; set; } = default!;

        /// <summary>
        /// System generated id for a deployment. Increments by 1.
        /// </summary>
        [SerializeField]
        [JsonProperty("deploymentId")]
        public int DeploymentId { get; set; } = default!;

        /// <summary>
        /// The environment variable that our process will have access to at runtime.
        /// </summary>
        [SerializeField]
        [JsonProperty("env")]
        public List<DeploymentV1Env> Env { get; set; } = default!;

        /// <summary>
        /// Option to shut down processes that have had no new connections or rooms<br/>
        /// 
        /// <remarks>
        /// for five minutes.
        /// </remarks>
        /// </summary>
        [SerializeField]
        [JsonProperty("idleTimeoutEnabled")]
        public bool? IdleTimeoutEnabled { get; set; }

        /// <summary>
        /// A plan defines how much CPU and memory is required to run an instance of your game server.<br/>
        /// 
        /// <remarks>
        /// <br/>
        /// `tiny`: shared core, 1gb memory<br/>
        /// <br/>
        /// `small`: 1 core, 2gb memory<br/>
        /// <br/>
        /// `medium`: 2 core, 4gb memory<br/>
        /// <br/>
        /// `large`: 4 core, 8gb memory
        /// </remarks>
        /// </summary>
        [SerializeField]
        [JsonProperty("planName")]
        public PlanName PlanName { get; set; } = default!;

        /// <summary>
        /// The number of cores allocated to your process.
        /// </summary>
        [SerializeField]
        [JsonProperty("requestedCPU")]
        public double RequestedCPU { get; set; } = default!;

        /// <summary>
        /// The amount of memory allocated to your process.
        /// </summary>
        [SerializeField]
        [JsonProperty("requestedMemoryMB")]
        public int RequestedMemoryMB { get; set; } = default!;

        /// <summary>
        /// Governs how many <a href="https://hathora.dev/docs/concepts/hathora-entities#room">rooms</a> can be scheduled in a process.
        /// </summary>
        [SerializeField]
        [JsonProperty("roomsPerProcess")]
        public int RoomsPerProcess { get; set; } = default!;

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