//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
namespace k8s.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
///
/// StatefulSetStatus represents the current state of a StatefulSet.
///
public partial class V1beta1StatefulSetStatus
{
///
/// Initializes a new instance of the V1beta1StatefulSetStatus class.
///
public V1beta1StatefulSetStatus()
{
CustomInit();
}
///
/// Initializes a new instance of the V1beta1StatefulSetStatus class.
///
/// replicas is the number of Pods created by
/// the StatefulSet controller.
/// collisionCount is the count of hash
/// collisions for the StatefulSet. The StatefulSet controller uses
/// this field as a collision avoidance mechanism when it needs to
/// create the name for the newest ControllerRevision.
/// Represents the latest available
/// observations of a statefulset's current state.
/// currentReplicas is the number of Pods
/// created by the StatefulSet controller from the StatefulSet version
/// indicated by currentRevision.
/// currentRevision, if not empty,
/// indicates the version of the StatefulSet used to generate Pods in
/// the sequence [0,currentReplicas).
/// observedGeneration is the most
/// recent generation observed for this StatefulSet. It corresponds to
/// the StatefulSet's generation, which is updated on mutation by the
/// API Server.
/// readyReplicas is the number of Pods
/// created by the StatefulSet controller that have a Ready
/// Condition.
/// updateRevision, if not empty,
/// indicates the version of the StatefulSet used to generate Pods in
/// the sequence [replicas-updatedReplicas,replicas)
/// updatedReplicas is the number of Pods
/// created by the StatefulSet controller from the StatefulSet version
/// indicated by updateRevision.
public V1beta1StatefulSetStatus(int replicas, int? collisionCount = default(int?), IList conditions = default(IList), int? currentReplicas = default(int?), string currentRevision = default(string), long? observedGeneration = default(long?), int? readyReplicas = default(int?), string updateRevision = default(string), int? updatedReplicas = default(int?))
{
CollisionCount = collisionCount;
Conditions = conditions;
CurrentReplicas = currentReplicas;
CurrentRevision = currentRevision;
ObservedGeneration = observedGeneration;
ReadyReplicas = readyReplicas;
Replicas = replicas;
UpdateRevision = updateRevision;
UpdatedReplicas = updatedReplicas;
CustomInit();
}
///
/// An initialization method that performs custom operations like setting defaults
///
partial void CustomInit();
///
/// Gets or sets collisionCount is the count of hash collisions for the
/// StatefulSet. The StatefulSet controller uses this field as a
/// collision avoidance mechanism when it needs to create the name for
/// the newest ControllerRevision.
///
[JsonProperty(PropertyName = "collisionCount")]
public int? CollisionCount { get; set; }
///
/// Gets or sets represents the latest available observations of a
/// statefulset's current state.
///
[JsonProperty(PropertyName = "conditions")]
public IList Conditions { get; set; }
///
/// Gets or sets currentReplicas is the number of Pods created by the
/// StatefulSet controller from the StatefulSet version indicated by
/// currentRevision.
///
[JsonProperty(PropertyName = "currentReplicas")]
public int? CurrentReplicas { get; set; }
///
/// Gets or sets currentRevision, if not empty, indicates the version
/// of the StatefulSet used to generate Pods in the sequence
/// [0,currentReplicas).
///
[JsonProperty(PropertyName = "currentRevision")]
public string CurrentRevision { get; set; }
///
/// Gets or sets observedGeneration is the most recent generation
/// observed for this StatefulSet. It corresponds to the StatefulSet's
/// generation, which is updated on mutation by the API Server.
///
[JsonProperty(PropertyName = "observedGeneration")]
public long? ObservedGeneration { get; set; }
///
/// Gets or sets readyReplicas is the number of Pods created by the
/// StatefulSet controller that have a Ready Condition.
///
[JsonProperty(PropertyName = "readyReplicas")]
public int? ReadyReplicas { get; set; }
///
/// Gets or sets replicas is the number of Pods created by the
/// StatefulSet controller.
///
[JsonProperty(PropertyName = "replicas")]
public int Replicas { get; set; }
///
/// Gets or sets updateRevision, if not empty, indicates the version of
/// the StatefulSet used to generate Pods in the sequence
/// [replicas-updatedReplicas,replicas)
///
[JsonProperty(PropertyName = "updateRevision")]
public string UpdateRevision { get; set; }
///
/// Gets or sets updatedReplicas is the number of Pods created by the
/// StatefulSet controller from the StatefulSet version indicated by
/// updateRevision.
///
[JsonProperty(PropertyName = "updatedReplicas")]
public int? UpdatedReplicas { get; set; }
///
/// Validate the object.
///
///
/// Thrown if validation fails
///
public virtual void Validate()
{
if (Conditions != null)
{
foreach (var element in Conditions)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}