Class V1SuccessPolicy

java.lang.Object
io.kubernetes.client.openapi.models.V1SuccessPolicy

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-02-12T21:15:49.397498Z[Etc/UTC]", comments="Generator version: 7.6.0") public class V1SuccessPolicy extends Object
SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes.
  • Field Details

  • Constructor Details

    • V1SuccessPolicy

      public V1SuccessPolicy()
  • Method Details

    • rules

      public V1SuccessPolicy rules(List<V1SuccessPolicyRule> rules)
    • addRulesItem

      public V1SuccessPolicy addRulesItem(V1SuccessPolicyRule rulesItem)
    • getRules

      @Nonnull public List<V1SuccessPolicyRule> getRules()
      rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the \"SucceededCriteriaMet\" condition is added, and the lingering pods are removed. The terminal state for such a Job has the \"Complete\" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
      Returns:
      rules
    • setRules

      public void setRules(List<V1SuccessPolicyRule> rules)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to V1SuccessPolicy
    • fromJson

      public static V1SuccessPolicy fromJson(String jsonString) throws IOException
      Create an instance of V1SuccessPolicy given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of V1SuccessPolicy
      Throws:
      IOException - if the JSON string is invalid with respect to V1SuccessPolicy
    • toJson

      public String toJson()
      Convert an instance of V1SuccessPolicy to an JSON string
      Returns:
      JSON string