// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
///
/// JobCondition describes current state of a job.
///
public partial class V1JobCondition
{
///
/// Initializes a new instance of the V1JobCondition class.
///
public V1JobCondition()
{
CustomInit();
}
///
/// Initializes a new instance of the V1JobCondition class.
///
/// Status of the condition, one of True, False,
/// Unknown.
/// Type of job condition, Complete or
/// Failed.
/// Last time the condition was
/// checked.
/// Last time the condition transit
/// from one status to another.
/// Human readable message indicating details
/// about last transition.
/// (brief) reason for the condition's last
/// transition.
public V1JobCondition(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();
}
///
/// An initialization method that performs custom operations like setting defaults
///
partial void CustomInit();
///
/// Gets or sets last time the condition was checked.
///
[JsonProperty(PropertyName = "lastProbeTime")]
public System.DateTime? LastProbeTime { get; set; }
///
/// Gets or sets last time the condition transit from one status to
/// another.
///
[JsonProperty(PropertyName = "lastTransitionTime")]
public System.DateTime? LastTransitionTime { get; set; }
///
/// Gets or sets human readable message indicating details about last
/// transition.
///
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
///
/// Gets or sets (brief) reason for the condition's last transition.
///
[JsonProperty(PropertyName = "reason")]
public string Reason { get; set; }
///
/// Gets or sets status of the condition, one of True, False, Unknown.
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
///
/// Gets or sets type of job condition, Complete or Failed.
///
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
///
/// Validate the object.
///
///
/// Thrown if validation fails
///
public virtual void Validate()
{
if (Status == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Status");
}
if (Type == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Type");
}
}
}
}