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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Create an instance of V1StatefulSetPersistentVolumeClaimRetentionPolicy given an JSON stringWhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted.WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down.int
hashCode()
void
setWhenDeleted
(String whenDeleted) void
setWhenScaled
(String whenScaled) toJson()
Convert an instance of V1StatefulSetPersistentVolumeClaimRetentionPolicy to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues foundwhenDeleted
(String whenDeleted) whenScaled
(String whenScaled)
-
Field Details
-
SERIALIZED_NAME_WHEN_DELETED
- See Also:
-
SERIALIZED_NAME_WHEN_SCALED
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1StatefulSetPersistentVolumeClaimRetentionPolicy
public V1StatefulSetPersistentVolumeClaimRetentionPolicy()
-
-
Method Details
-
whenDeleted
-
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
-
whenScaled
-
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
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
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
Convert an instance of V1StatefulSetPersistentVolumeClaimRetentionPolicy to an JSON string- Returns:
- JSON string
-