// // 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 Microsoft.Rest; using Newtonsoft.Json; using System.Linq; /// /// ReplicaSetSpec is the specification of a ReplicaSet. /// public partial class V1ReplicaSetSpec { /// /// Initializes a new instance of the V1ReplicaSetSpec class. /// public V1ReplicaSetSpec() { CustomInit(); } /// /// Initializes a new instance of the V1ReplicaSetSpec class. /// /// Selector is a label query over pods that /// should match the replica count. Label keys and values that must /// match in order to be controlled by this replica set. It must match /// the pod template's labels. More info: /// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors /// Minimum number of seconds for which a /// newly created pod should be ready without any of its container /// crashing, for it to be considered available. Defaults to 0 (pod /// will be considered available as soon as it is ready) /// Replicas is the number of desired replicas. /// This is a pointer to distinguish between explicit zero and /// unspecified. Defaults to 1. More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller /// Template is the object that describes the /// pod that will be created if insufficient replicas are detected. /// More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template public V1ReplicaSetSpec(V1LabelSelector selector, int? minReadySeconds = default(int?), int? replicas = default(int?), V1PodTemplateSpec template = default(V1PodTemplateSpec)) { MinReadySeconds = minReadySeconds; Replicas = replicas; Selector = selector; Template = template; CustomInit(); } /// /// An initialization method that performs custom operations like setting defaults /// partial void CustomInit(); /// /// Gets or sets minimum number of seconds for which a newly created /// pod should be ready without any of its container crashing, for it /// to be considered available. Defaults to 0 (pod will be considered /// available as soon as it is ready) /// [JsonProperty(PropertyName = "minReadySeconds")] public int? MinReadySeconds { get; set; } /// /// Gets or sets replicas is the number of desired replicas. This is a /// pointer to distinguish between explicit zero and unspecified. /// Defaults to 1. More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller /// [JsonProperty(PropertyName = "replicas")] public int? Replicas { get; set; } /// /// Gets or sets selector is a label query over pods that should match /// the replica count. Label keys and values that must match in order /// to be controlled by this replica set. It must match the pod /// template's labels. More info: /// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors /// [JsonProperty(PropertyName = "selector")] public V1LabelSelector Selector { get; set; } /// /// Gets or sets template is the object that describes the pod that /// will be created if insufficient replicas are detected. More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template /// [JsonProperty(PropertyName = "template")] public V1PodTemplateSpec Template { get; set; } /// /// Validate the object. /// /// /// Thrown if validation fails /// public virtual void Validate() { if (Selector == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Selector"); } if (Template != null) { Template.Validate(); } } } }