Class V1ContainerRestartRule

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-09-11T18:00:16.154662Z[Etc/UTC]", comments="Generator version: 7.13.0") public class V1ContainerRestartRule extends Object
ContainerRestartRule describes how a container exit is handled.
  • Field Details

  • Constructor Details

    • V1ContainerRestartRule

      public V1ContainerRestartRule()
  • Method Details

    • action

      public V1ContainerRestartRule action(@Nonnull String action)
    • getAction

      @Nonnull public String getAction()
      Specifies the action taken on a container exit if the requirements are satisfied. The only possible value is \"Restart\" to restart the container.
      Returns:
      action
    • setAction

      public void setAction(@Nonnull String action)
    • exitCodes

      public V1ContainerRestartRule exitCodes(@Nullable V1ContainerRestartRuleOnExitCodes exitCodes)
    • getExitCodes

      @Nullable public V1ContainerRestartRuleOnExitCodes getExitCodes()
      Get exitCodes
      Returns:
      exitCodes
    • setExitCodes

      public void setExitCodes(@Nullable V1ContainerRestartRuleOnExitCodes exitCodes)
    • 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 V1ContainerRestartRule
    • fromJson

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

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