Partager via


SoftDeletePolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.SoftDeletePolicy

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 SoftDeletePolicy class.

Method Summary

Modifier and Type Method and Description
static SoftDeletePolicy fromJson(JsonReader jsonReader)

Reads an instance of SoftDeletePolicy from the JsonReader.

Boolean isSoftDeleteEnabled()

Get the isSoftDeleteEnabled property: Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

SoftDeletePolicy withIsSoftDeleteEnabled(Boolean isSoftDeleteEnabled)

Set the isSoftDeleteEnabled property: Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time.

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:

jsonReader - The JsonReader being read.

Returns:

An instance of SoftDeletePolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the SoftDeletePolicy.

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:

the isSoftDeleteEnabled value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

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:

isSoftDeleteEnabled - the isSoftDeleteEnabled value to set.

Returns:

the SoftDeletePolicy object itself.

Applies to