// <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 Microsoft.Rest;
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// PersistentVolumeClaimCondition contails details about state of pvc
    /// </summary>
    public partial class V1PersistentVolumeClaimCondition
    {
        /// <summary>
        /// Initializes a new instance of the V1PersistentVolumeClaimCondition
        /// class.
        /// </summary>
        public V1PersistentVolumeClaimCondition()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the V1PersistentVolumeClaimCondition
        /// class.
        /// </summary>
        /// <param name="lastProbeTime">Last time we probed the
        /// condition.</param>
        /// <param name="lastTransitionTime">Last time the condition
        /// transitioned from one status to another.</param>
        /// <param name="message">Human-readable message indicating details
        /// about last transition.</param>
        /// <param name="reason">Unique, this should be a short, machine
        /// understandable string that gives the reason for condition's last
        /// transition. If it reports "ResizeStarted" that means the underlying
        /// persistent volume is being resized.</param>
        public V1PersistentVolumeClaimCondition(string status, string type, System.DateTime? lastProbeTime = default(System.DateTime?), System.DateTime? lastTransitionTime = default(System.DateTime?), string message = default(string), string reason = default(string))
        {
            LastProbeTime = lastProbeTime;
            LastTransitionTime = lastTransitionTime;
            Message = message;
            Reason = reason;
            Status = status;
            Type = type;
            CustomInit();
        }

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

        /// <summary>
        /// Gets or sets last time we probed the condition.
        /// </summary>
        [JsonProperty(PropertyName = "lastProbeTime")]
        public System.DateTime? LastProbeTime { get; set; }

        /// <summary>
        /// Gets or sets last time the condition transitioned from one status
        /// to another.
        /// </summary>
        [JsonProperty(PropertyName = "lastTransitionTime")]
        public System.DateTime? LastTransitionTime { get; set; }

        /// <summary>
        /// Gets or sets human-readable message indicating details about last
        /// transition.
        /// </summary>
        [JsonProperty(PropertyName = "message")]
        public string Message { get; set; }

        /// <summary>
        /// Gets or sets unique, this should be a short, machine understandable
        /// string that gives the reason for condition's last transition. If it
        /// reports "ResizeStarted" that means the underlying persistent volume
        /// is being resized.
        /// </summary>
        [JsonProperty(PropertyName = "reason")]
        public string Reason { get; set; }

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "status")]
        public string Status { get; set; }

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "type")]
        public string Type { get; set; }

        /// <summary>
        /// Validate the object.
        /// </summary>
        /// <exception cref="ValidationException">
        /// Thrown if validation fails
        /// </exception>
        public virtual void Validate()
        {
            if (Status == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "Status");
            }
            if (Type == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "Type");
            }
        }
    }
}
