RestorePolicyProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.storage.models.RestorePolicyProperties

Implements

public final class RestorePolicyProperties
implements JsonSerializable<RestorePolicyProperties>

The blob service properties for blob restore policy.

Constructor Summary

Constructor Description
RestorePolicyProperties()

Creates an instance of RestorePolicyProperties class.

Method Summary

Modifier and Type Method and Description
Integer days()

Get the days property: how long this blob can be restored.

boolean enabled()

Get the enabled property: Blob restore is enabled if set to true.

static RestorePolicyProperties fromJson(JsonReader jsonReader)

Reads an instance of RestorePolicyProperties from the JsonReader.

OffsetDateTime lastEnabledTime()

Get the lastEnabledTime property: Deprecated in favor of minRestoreTime property.

OffsetDateTime minRestoreTime()

Get the minRestoreTime property: Returns the minimum date and time that the restore can be started.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

RestorePolicyProperties withDays(Integer days)

Set the days property: how long this blob can be restored.

RestorePolicyProperties withEnabled(boolean enabled)

Set the enabled property: Blob restore is enabled if set to true.

Methods inherited from java.lang.Object

Constructor Details

RestorePolicyProperties

public RestorePolicyProperties()

Creates an instance of RestorePolicyProperties class.

Method Details

days

public Integer days()

Get the days property: how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days.

Returns:

the days value.

enabled

public boolean enabled()

Get the enabled property: Blob restore is enabled if set to true.

Returns:

the enabled value.

fromJson

public static RestorePolicyProperties fromJson(JsonReader jsonReader)

Reads an instance of RestorePolicyProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

lastEnabledTime

public OffsetDateTime lastEnabledTime()

Get the lastEnabledTime property: Deprecated in favor of minRestoreTime property.

Returns:

the lastEnabledTime value.

minRestoreTime

public OffsetDateTime minRestoreTime()

Get the minRestoreTime property: Returns the minimum date and time that the restore can be started.

Returns:

the minRestoreTime value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDays

public RestorePolicyProperties withDays(Integer days)

Set the days property: how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days.

Parameters:

days - the days value to set.

Returns:

the RestorePolicyProperties object itself.

withEnabled

public RestorePolicyProperties withEnabled(boolean enabled)

Set the enabled property: Blob restore is enabled if set to true.

Parameters:

enabled - the enabled value to set.

Returns:

the RestorePolicyProperties object itself.

Applies to