ImmutabilityPolicy Class

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

Implements

public final class ImmutabilityPolicy
implements JsonSerializable<ImmutabilityPolicy>

The immutability policy currently applied to a snapshot.

Method Summary

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

Reads an instance of ImmutabilityPolicy from the JsonReader.

Integer immutabilityDurationDays()

Get the immutabilityDurationDays property: The immutability duration for the snapshot, in number of days.

Boolean isPolicyExpired()

Get the isPolicyExpired property: Indicates whether the immutability policy has expired.

OffsetDateTime policyExpirationTime()

Get the policyExpirationTime property: The time when the immutability policy will expire on the snapshot.

OffsetDateTime policyStartTime()

Get the policyStartTime property: The time when the immutability policy was set on the snapshot.

JsonWriter toJson(JsonWriter jsonWriter)
ImmutabilityPolicyType type()

Get the type property: The type of the immutability policy.

void validate()

Validates the instance.

Methods inherited from java.lang.Object

Method Details

fromJson

public static ImmutabilityPolicy fromJson(JsonReader jsonReader)

Reads an instance of ImmutabilityPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ImmutabilityPolicy 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 ImmutabilityPolicy.

immutabilityDurationDays

public Integer immutabilityDurationDays()

Get the immutabilityDurationDays property: The immutability duration for the snapshot, in number of days.

Returns:

the immutabilityDurationDays value.

isPolicyExpired

public Boolean isPolicyExpired()

Get the isPolicyExpired property: Indicates whether the immutability policy has expired.

Returns:

the isPolicyExpired value.

policyExpirationTime

public OffsetDateTime policyExpirationTime()

Get the policyExpirationTime property: The time when the immutability policy will expire on the snapshot.

Returns:

the policyExpirationTime value.

policyStartTime

public OffsetDateTime policyStartTime()

Get the policyStartTime property: The time when the immutability policy was set on the snapshot.

Returns:

the policyStartTime value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public ImmutabilityPolicyType type()

Get the type property: The type of the immutability policy.

Returns:

the type value.

validate

public void validate()

Validates the instance.

Applies to