All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.k8s.api.batch.v1.JobStatus Maven / Gradle / Ivy

The newest version!
package io.k8s.api.batch.v1;

import java.lang.Long;
import java.lang.String;
import java.util.List;

/**
 * JobStatus represents the current state of a Job.
 */
public class JobStatus {
  public Long active;

  public String completedIndexes;

  public String completionTime;

  public List conditions;

  public Long failed;

  public String failedIndexes;

  public Long ready;

  public String startTime;

  public Long succeeded;

  public Long terminating;

  public UncountedTerminatedPods uncountedTerminatedPods;

  /**
   * The number of pending and running pods.
   */
  public JobStatus active(Long active) {
    this.active = active;
    return this;
  }

  /**
   * completedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7".
   */
  public JobStatus completedIndexes(String completedIndexes) {
    this.completedIndexes = completedIndexes;
    return this;
  }

  /**
   * Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON.  Wrappers are provided for many of the factory methods that the time package offers.
   */
  public JobStatus completionTime(String completionTime) {
    this.completionTime = completionTime;
    return this;
  }

  /**
   * The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
   */
  public JobStatus conditions(List conditions) {
    this.conditions = conditions;
    return this;
  }

  /**
   * The number of pods which reached phase Failed.
   */
  public JobStatus failed(Long failed) {
    this.failed = failed;
    return this;
  }

  /**
   * FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).
   */
  public JobStatus failedIndexes(String failedIndexes) {
    this.failedIndexes = failedIndexes;
    return this;
  }

  /**
   * The number of pods which have a Ready condition.
   */
  public JobStatus ready(Long ready) {
    this.ready = ready;
    return this;
  }

  /**
   * Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON.  Wrappers are provided for many of the factory methods that the time package offers.
   */
  public JobStatus startTime(String startTime) {
    this.startTime = startTime;
    return this;
  }

  /**
   * The number of pods which reached phase Succeeded.
   */
  public JobStatus succeeded(Long succeeded) {
    this.succeeded = succeeded;
    return this;
  }

  /**
   * The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp).
   *
   * This field is beta-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (enabled by default).
   */
  public JobStatus terminating(Long terminating) {
    this.terminating = terminating;
    return this;
  }

  public JobStatus uncountedTerminatedPods(UncountedTerminatedPods uncountedTerminatedPods) {
    this.uncountedTerminatedPods = uncountedTerminatedPods;
    return this;
  }

  public static JobStatus jobStatus() {
    return new JobStatus();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy