SoftDeletePolicy Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. SoftDeletePolicy
- com.
Implements
public final class SoftDeletePolicy
implements JsonSerializable<SoftDeletePolicy>
Contains information about the soft deletion policy of the gallery.
Constructor Summary
| Constructor | Description |
|---|---|
| SoftDeletePolicy() |
Creates an instance of Soft |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Soft |
fromJson(JsonReader jsonReader)
Reads an instance of Soft |
| Integer |
gracePeriodInDays()
Get the grace |
| Boolean |
isSoftDeleteEnabled()
Get the is |
| Integer |
retentionPeriodInDays()
Get the retention |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Soft |
withGracePeriodInDays(Integer gracePeriodInDays)
Set the grace |
|
Soft |
withIsSoftDeleteEnabled(Boolean isSoftDeleteEnabled)
Set the is |
|
Soft |
withRetentionPeriodInDays(Integer retentionPeriodInDays)
Set the retention |
Methods inherited from java.lang.Object
Constructor Details
SoftDeletePolicy
public SoftDeletePolicy()
Creates an instance of SoftDeletePolicy class.
Method Details
fromJson
public static SoftDeletePolicy fromJson(JsonReader jsonReader)
Reads an instance of SoftDeletePolicy from the JsonReader.
Parameters:
Returns:
Throws:
gracePeriodInDays
public Integer gracePeriodInDays()
Get the gracePeriodInDays property: The grace period in days for a simulated hard-deleted resource. During this period the gallery image version is unusable but can still be recovered if required. After this period elapses, the gallery image version is permanently (hard) deleted.
Returns:
isSoftDeleteEnabled
public Boolean isSoftDeleteEnabled()
Get the isSoftDeleteEnabled property: Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time.
Returns:
retentionPeriodInDays
public Integer retentionPeriodInDays()
Get the retentionPeriodInDays property: The retention period in days for a soft-deleted resource. After this period elapses, the soft-deleted gallery image version transitions to a simulated hard-deleted state.
Returns:
toJson
validate
public void validate()
Validates the instance.
withGracePeriodInDays
public SoftDeletePolicy withGracePeriodInDays(Integer gracePeriodInDays)
Set the gracePeriodInDays property: The grace period in days for a simulated hard-deleted resource. During this period the gallery image version is unusable but can still be recovered if required. After this period elapses, the gallery image version is permanently (hard) deleted.
Parameters:
Returns:
withIsSoftDeleteEnabled
public SoftDeletePolicy withIsSoftDeleteEnabled(Boolean isSoftDeleteEnabled)
Set the isSoftDeleteEnabled property: Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time.
Parameters:
Returns:
withRetentionPeriodInDays
public SoftDeletePolicy withRetentionPeriodInDays(Integer retentionPeriodInDays)
Set the retentionPeriodInDays property: The retention period in days for a soft-deleted resource. After this period elapses, the soft-deleted gallery image version transitions to a simulated hard-deleted state.
Parameters:
Returns: