// // 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; /// /// DeploymentSpec is the specification of the desired behavior of the /// Deployment. /// public partial class Appsv1beta1DeploymentSpec { /// /// Initializes a new instance of the Appsv1beta1DeploymentSpec class. /// public Appsv1beta1DeploymentSpec() { CustomInit(); } /// /// Initializes a new instance of the Appsv1beta1DeploymentSpec class. /// /// Template describes the pods that will be /// created. /// 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) /// Indicates that the deployment is /// paused. /// The maximum time in seconds /// for a deployment to make progress before it is considered to be /// failed. The deployment controller will continue to process failed /// deployments and a condition with a ProgressDeadlineExceeded reason /// will be surfaced in the deployment status. Note that progress will /// not be estimated during the time a deployment is paused. Defaults /// to 600s. /// Number of desired pods. This is a pointer to /// distinguish between explicit zero and not specified. Defaults to /// 1. /// The number of old ReplicaSets to /// retain to allow rollback. This is a pointer to distinguish between /// explicit zero and not specified. Defaults to 2. /// DEPRECATED. The config this deployment is /// rolling back to. Will be cleared after rollback is done. /// Label selector for pods. Existing /// ReplicaSets whose pods are selected by this will be the ones /// affected by this deployment. /// The deployment strategy to use to replace /// existing pods with new ones. public Appsv1beta1DeploymentSpec(V1PodTemplateSpec template, int? minReadySeconds = default(int?), bool? paused = default(bool?), int? progressDeadlineSeconds = default(int?), int? replicas = default(int?), int? revisionHistoryLimit = default(int?), Appsv1beta1RollbackConfig rollbackTo = default(Appsv1beta1RollbackConfig), V1LabelSelector selector = default(V1LabelSelector), Appsv1beta1DeploymentStrategy strategy = default(Appsv1beta1DeploymentStrategy)) { MinReadySeconds = minReadySeconds; Paused = paused; ProgressDeadlineSeconds = progressDeadlineSeconds; Replicas = replicas; RevisionHistoryLimit = revisionHistoryLimit; RollbackTo = rollbackTo; Selector = selector; Strategy = strategy; 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 indicates that the deployment is paused. /// [JsonProperty(PropertyName = "paused")] public bool? Paused { get; set; } /// /// Gets or sets the maximum time in seconds for a deployment to make /// progress before it is considered to be failed. The deployment /// controller will continue to process failed deployments and a /// condition with a ProgressDeadlineExceeded reason will be surfaced /// in the deployment status. Note that progress will not be estimated /// during the time a deployment is paused. Defaults to 600s. /// [JsonProperty(PropertyName = "progressDeadlineSeconds")] public int? ProgressDeadlineSeconds { get; set; } /// /// Gets or sets number of desired pods. This is a pointer to /// distinguish between explicit zero and not specified. Defaults to 1. /// [JsonProperty(PropertyName = "replicas")] public int? Replicas { get; set; } /// /// Gets or sets the number of old ReplicaSets to retain to allow /// rollback. This is a pointer to distinguish between explicit zero /// and not specified. Defaults to 2. /// [JsonProperty(PropertyName = "revisionHistoryLimit")] public int? RevisionHistoryLimit { get; set; } /// /// Gets or sets DEPRECATED. The config this deployment is rolling back /// to. Will be cleared after rollback is done. /// [JsonProperty(PropertyName = "rollbackTo")] public Appsv1beta1RollbackConfig RollbackTo { get; set; } /// /// Gets or sets label selector for pods. Existing ReplicaSets whose /// pods are selected by this will be the ones affected by this /// deployment. /// [JsonProperty(PropertyName = "selector")] public V1LabelSelector Selector { get; set; } /// /// Gets or sets the deployment strategy to use to replace existing /// pods with new ones. /// [JsonProperty(PropertyName = "strategy")] public Appsv1beta1DeploymentStrategy Strategy { get; set; } /// /// Gets or sets template describes the pods that will be created. /// [JsonProperty(PropertyName = "template")] public V1PodTemplateSpec Template { get; set; } /// /// Validate the object. /// /// /// Thrown if validation fails /// public virtual void Validate() { if (Template == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Template"); } if (Template != null) { Template.Validate(); } } } }