/// <summary>
 /// Initializes a new instance of the <see cref="V1beta1DeploymentRollback" /> class.
 /// </summary>
 /// <param name="ApiVersion">APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources.</param>
 /// <param name="Kind">Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds.</param>
 /// <param name="Name">Required: This must match the Name of a deployment. (required).</param>
 /// <param name="RollbackTo">The config of this deployment rollback. (required).</param>
 /// <param name="UpdatedAnnotations">The annotations to be updated to a deployment.</param>
 public V1beta1DeploymentRollback(string ApiVersion = default(string), string Kind = default(string), string Name = default(string), V1beta1RollbackConfig RollbackTo = default(V1beta1RollbackConfig), Dictionary <string, string> UpdatedAnnotations = default(Dictionary <string, string>))
 {
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for V1beta1DeploymentRollback and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     // to ensure "RollbackTo" is required (not null)
     if (RollbackTo == null)
     {
         throw new InvalidDataException("RollbackTo is a required property for V1beta1DeploymentRollback and cannot be null");
     }
     else
     {
         this.RollbackTo = RollbackTo;
     }
     this.ApiVersion         = ApiVersion;
     this.Kind               = Kind;
     this.UpdatedAnnotations = UpdatedAnnotations;
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1beta1DeploymentSpec" /> class.
 /// </summary>
 /// <param name="MinReadySeconds">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).</param>
 /// <param name="Paused">Indicates that the deployment is paused and will not be processed by the deployment controller..</param>
 /// <param name="ProgressDeadlineSeconds">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. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. This is not set by default..</param>
 /// <param name="Replicas">Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1..</param>
 /// <param name="RevisionHistoryLimit">The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified..</param>
 /// <param name="RollbackTo">The config this deployment is rolling back to. Will be cleared after rollback is done..</param>
 /// <param name="Selector">Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment..</param>
 /// <param name="Strategy">The deployment strategy to use to replace existing pods with new ones..</param>
 /// <param name="Template">Template describes the pods that will be created. (required).</param>
 public V1beta1DeploymentSpec(int?MinReadySeconds = default(int?), bool?Paused = default(bool?), int?ProgressDeadlineSeconds = default(int?), int?Replicas = default(int?), int?RevisionHistoryLimit = default(int?), V1beta1RollbackConfig RollbackTo = default(V1beta1RollbackConfig), UnversionedLabelSelector Selector = default(UnversionedLabelSelector), V1beta1DeploymentStrategy Strategy = default(V1beta1DeploymentStrategy), V1PodTemplateSpec Template = default(V1PodTemplateSpec))
 {
     // to ensure "Template" is required (not null)
     if (Template == null)
     {
         throw new InvalidDataException("Template is a required property for V1beta1DeploymentSpec and cannot be null");
     }
     else
     {
         this.Template = Template;
     }
     this.MinReadySeconds         = MinReadySeconds;
     this.Paused                  = Paused;
     this.ProgressDeadlineSeconds = ProgressDeadlineSeconds;
     this.Replicas                = Replicas;
     this.RevisionHistoryLimit    = RevisionHistoryLimit;
     this.RollbackTo              = RollbackTo;
     this.Selector                = Selector;
     this.Strategy                = Strategy;
 }