Class V1Lifecycle

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-05-20T20:47:13.890592Z[Etc/UTC]", comments="Generator version: 7.13.0") 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(@Nullable V1LifecycleHandler postStart)
    • getPostStart

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

      public void setPostStart(@Nullable V1LifecycleHandler postStart)
    • preStop

      public V1Lifecycle preStop(@Nullable V1LifecycleHandler preStop)
    • getPreStop

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

      public void setPreStop(@Nullable V1LifecycleHandler preStop)
    • stopSignal

      public V1Lifecycle stopSignal(@Nullable String stopSignal)
    • getStopSignal

      @Nullable public String getStopSignal()
      StopSignal defines which signal will be sent to a container when it is being stopped. If not specified, the default is defined by the container runtime in use. StopSignal can only be set for Pods with a non-empty .spec.os.name
      Returns:
      stopSignal
    • setStopSignal

      public void setStopSignal(@Nullable String stopSignal)
    • 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 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