// <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.Linq;

    /// <summary>
    /// CustomResourceSubresources defines the status and scale subresources
    /// for CustomResources.
    /// </summary>
    public partial class V1beta1CustomResourceSubresources
    {
        /// <summary>
        /// Initializes a new instance of the V1beta1CustomResourceSubresources
        /// class.
        /// </summary>
        public V1beta1CustomResourceSubresources()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the V1beta1CustomResourceSubresources
        /// class.
        /// </summary>
        /// <param name="scale">scale indicates the custom resource should
        /// serve a `/scale` subresource that returns an `autoscaling/v1` Scale
        /// object.</param>
        /// <param name="status">status indicates the custom resource should
        /// serve a `/status` subresource. When enabled: 1. requests to the
        /// custom resource primary endpoint ignore changes to the `status`
        /// stanza of the object. 2. requests to the custom resource `/status`
        /// subresource ignore changes to anything other than the `status`
        /// stanza of the object.</param>
        public V1beta1CustomResourceSubresources(V1beta1CustomResourceSubresourceScale scale = default(V1beta1CustomResourceSubresourceScale), object status = default(object))
        {
            Scale = scale;
            Status = status;
            CustomInit();
        }

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

        /// <summary>
        /// Gets or sets scale indicates the custom resource should serve a
        /// `/scale` subresource that returns an `autoscaling/v1` Scale object.
        /// </summary>
        [JsonProperty(PropertyName = "scale")]
        public V1beta1CustomResourceSubresourceScale Scale { get; set; }

        /// <summary>
        /// Gets or sets status indicates the custom resource should serve a
        /// `/status` subresource. When enabled: 1. requests to the custom
        /// resource primary endpoint ignore changes to the `status` stanza of
        /// the object. 2. requests to the custom resource `/status`
        /// subresource ignore changes to anything other than the `status`
        /// stanza of the object.
        /// </summary>
        [JsonProperty(PropertyName = "status")]
        public object Status { get; set; }

        /// <summary>
        /// Validate the object.
        /// </summary>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown if validation fails
        /// </exception>
        public virtual void Validate()
        {
            if (Scale != null)
            {
                Scale.Validate();
            }
        }
    }
}
