Class V1Lifecycle

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-02-02T17:56:12.287571Z[Etc/UTC]") public class V1Lifecycle extends Object
Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.
  • Field Details

  • Constructor Details

    • V1Lifecycle

      public V1Lifecycle()
  • Method Details

    • postStart

      public V1Lifecycle postStart(V1LifecycleHandler postStart)
    • getPostStart

      @Nullable public V1LifecycleHandler getPostStart()
      Get postStart
      Returns:
      postStart
    • setPostStart

      public void setPostStart(V1LifecycleHandler postStart)
    • preStop

      public V1Lifecycle preStop(V1LifecycleHandler preStop)
    • getPreStop

      @Nullable public V1LifecycleHandler getPreStop()
      Get preStop
      Returns:
      preStop
    • setPreStop

      public void setPreStop(V1LifecycleHandler preStop)
    • 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
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates the JSON Object and throws an exception if issues found
      Parameters:
      jsonObj - JSON Object
      Throws:
      IOException - if the JSON Object is invalid with respect to V1Lifecycle
    • fromJson

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

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