// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace k8s.Models
{
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// HPAScalingRules configures the scaling behavior for one direction.
    /// These Rules are applied after calculating DesiredReplicas from metrics
    /// for the HPA. They can limit the scaling velocity by specifying scaling
    /// policies. They can prevent flapping by specifying the stabilization
    /// window, so that the number of replicas is not set instantly, instead,
    /// the safest value from the stabilization window is chosen.
    /// </summary>
    public partial class V2beta2HPAScalingRules
    {
        /// <summary>
        /// Initializes a new instance of the V2beta2HPAScalingRules class.
        /// </summary>
        public V2beta2HPAScalingRules()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the V2beta2HPAScalingRules class.
        /// </summary>
        /// <param name="policies">policies is a list of potential scaling
        /// polices which can be used during scaling. At least one policy must
        /// be specified, otherwise the HPAScalingRules will be discarded as
        /// invalid</param>
        /// <param name="selectPolicy">selectPolicy is used to specify which
        /// policy should be used. If not set, the default value
        /// MaxPolicySelect is used.</param>
        /// <param name="stabilizationWindowSeconds">StabilizationWindowSeconds
        /// is the number of seconds for which past recommendations should be
        /// considered while scaling up or scaling down.
        /// StabilizationWindowSeconds must be greater than or equal to zero
        /// and less than or equal to 3600 (one hour). If not set, use the
        /// default values: - For scale up: 0 (i.e. no stabilization is done).
        /// - For scale down: 300 (i.e. the stabilization window is 300 seconds
        /// long).</param>
        public V2beta2HPAScalingRules(IList<V2beta2HPAScalingPolicy> policies = default(IList<V2beta2HPAScalingPolicy>), string selectPolicy = default(string), int? stabilizationWindowSeconds = default(int?))
        {
            Policies = policies;
            SelectPolicy = selectPolicy;
            StabilizationWindowSeconds = stabilizationWindowSeconds;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets policies is a list of potential scaling polices which
        /// can be used during scaling. At least one policy must be specified,
        /// otherwise the HPAScalingRules will be discarded as invalid
        /// </summary>
        [JsonProperty(PropertyName = "policies")]
        public IList<V2beta2HPAScalingPolicy> Policies { get; set; }

        /// <summary>
        /// Gets or sets selectPolicy is used to specify which policy should be
        /// used. If not set, the default value MaxPolicySelect is used.
        /// </summary>
        [JsonProperty(PropertyName = "selectPolicy")]
        public string SelectPolicy { get; set; }

        /// <summary>
        /// Gets or sets stabilizationWindowSeconds is the number of seconds
        /// for which past recommendations should be considered while scaling
        /// up or scaling down. StabilizationWindowSeconds must be greater than
        /// or equal to zero and less than or equal to 3600 (one hour). If not
        /// set, use the default values: - For scale up: 0 (i.e. no
        /// stabilization is done). - For scale down: 300 (i.e. the
        /// stabilization window is 300 seconds long).
        /// </summary>
        [JsonProperty(PropertyName = "stabilizationWindowSeconds")]
        public int? StabilizationWindowSeconds { get; set; }

    }
}
