Class V1StatefulSetPersistentVolumeClaimRetentionPolicy

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-02-12T21:15:49.397498Z[Etc/UTC]", comments="Generator version: 7.6.0") public class V1StatefulSetPersistentVolumeClaimRetentionPolicy extends Object
StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.
  • Field Details

  • Constructor Details

    • V1StatefulSetPersistentVolumeClaimRetentionPolicy

      public V1StatefulSetPersistentVolumeClaimRetentionPolicy()
  • Method Details

    • whenDeleted

    • getWhenDeleted

      @Nullable public String getWhenDeleted()
      WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of `Retain` causes PVCs to not be affected by StatefulSet deletion. The `Delete` policy causes those PVCs to be deleted.
      Returns:
      whenDeleted
    • setWhenDeleted

      public void setWhenDeleted(String whenDeleted)
    • whenScaled

    • getWhenScaled

      @Nullable public String getWhenScaled()
      WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of `Retain` causes PVCs to not be affected by a scaledown. The `Delete` policy causes the associated PVCs for any excess pods above the replica count to be deleted.
      Returns:
      whenScaled
    • setWhenScaled

      public void setWhenScaled(String whenScaled)
    • 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 V1StatefulSetPersistentVolumeClaimRetentionPolicy
    • fromJson

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

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