Class InspectRestartPolicy

java.lang.Object
io.github.alersrt.pod4j.openapi.model.InspectRestartPolicy

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-11-19T11:19:05.435500352+07:00[Asia/Barnaul]", comments="Generator version: 7.7.0") public class InspectRestartPolicy extends Object
InspectRestartPolicy
  • Field Details

  • Constructor Details

    • InspectRestartPolicy

      public InspectRestartPolicy()
  • Method Details

    • maximumRetryCount

      public InspectRestartPolicy maximumRetryCount(Integer maximumRetryCount)
    • getMaximumRetryCount

      @Nullable public Integer getMaximumRetryCount()
      MaximumRetryCount is the maximum number of retries allowed if the \"on-failure\" restart policy is in use. Not used if \"on-failure\" is not set.
      Returns:
      maximumRetryCount
    • setMaximumRetryCount

      public void setMaximumRetryCount(Integer maximumRetryCount)
    • name

      public InspectRestartPolicy name(String name)
    • getName

      @Nullable public String getName()
      Name contains the container's restart policy. Allowable values are \"no\" or \"\" (take no action), \"on-failure\" (restart on non-zero exit code, with an optional max retry count), and \"always\" (always restart on container stop, unless explicitly requested by API). Note that this is NOT actually a name of any sort - the poor naming is for Docker compatibility.
      Returns:
      name
    • setName

      public void setName(String name)
    • 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 InspectRestartPolicy
    • fromJson

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

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