DeleteRetentionPolicy Class
- java.
lang. Object - com.
azure. resourcemanager. storage. models. DeleteRetentionPolicy
- com.
Implements
public final class DeleteRetentionPolicy
implements JsonSerializable<DeleteRetentionPolicy>
The service properties for soft delete.
Constructor Summary
Constructor | Description |
---|---|
DeleteRetentionPolicy() |
Creates an instance of Delete |
Method Summary
Modifier and Type | Method and Description |
---|---|
Boolean |
allowPermanentDelete()
Get the allow |
Integer |
days()
Get the days property: Indicates the number of days that the deleted item should be retained. |
Boolean |
enabled()
Get the enabled property: Indicates whether Delete |
static
Delete |
fromJson(JsonReader jsonReader)
Reads an instance of Delete |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Delete |
withAllowPermanentDelete(Boolean allowPermanentDelete)
Set the allow |
Delete |
withDays(Integer days)
Set the days property: Indicates the number of days that the deleted item should be retained. |
Delete |
withEnabled(Boolean enabled)
Set the enabled property: Indicates whether Delete |
Methods inherited from java.lang.Object
Constructor Details
DeleteRetentionPolicy
public DeleteRetentionPolicy()
Creates an instance of DeleteRetentionPolicy class.
Method Details
allowPermanentDelete
public Boolean allowPermanentDelete()
Get the allowPermanentDelete property: This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be used blob restore policy. This property only applies to blob service and does not apply to containers or file share.
Returns:
days
public Integer days()
Get the days property: Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365.
Returns:
enabled
public Boolean enabled()
Get the enabled property: Indicates whether DeleteRetentionPolicy is enabled.
Returns:
fromJson
public static DeleteRetentionPolicy fromJson(JsonReader jsonReader)
Reads an instance of DeleteRetentionPolicy from the JsonReader.
Parameters:
Returns:
Throws:
toJson
validate
public void validate()
Validates the instance.
withAllowPermanentDelete
public DeleteRetentionPolicy withAllowPermanentDelete(Boolean allowPermanentDelete)
Set the allowPermanentDelete property: This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be used blob restore policy. This property only applies to blob service and does not apply to containers or file share.
Parameters:
Returns:
withDays
public DeleteRetentionPolicy withDays(Integer days)
Set the days property: Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365.
Parameters:
Returns:
withEnabled
public DeleteRetentionPolicy withEnabled(Boolean enabled)
Set the enabled property: Indicates whether DeleteRetentionPolicy is enabled.
Parameters:
Returns:
Applies to
Azure SDK for Java