Class RestorePolicyProperties
java.lang.Object
com.azure.resourcemanager.storage.models.RestorePolicyProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RestorePolicyProperties>
public final class RestorePolicyProperties
extends Object
implements com.azure.json.JsonSerializable<RestorePolicyProperties>
The blob service properties for blob restore policy.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of RestorePolicyProperties class. -
Method Summary
Modifier and TypeMethodDescriptiondays()Get the days property: how long this blob can be restored.booleanenabled()Get the enabled property: Blob restore is enabled if set to true.static RestorePolicyPropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RestorePolicyProperties from the JsonReader.Get the lastEnabledTime property: Deprecated in favor of minRestoreTime property.Get the minRestoreTime property: Returns the minimum date and time that the restore can be started.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the days property: how long this blob can be restored.withEnabled(boolean enabled) Set the enabled property: Blob restore is enabled if set to true.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
RestorePolicyProperties
public RestorePolicyProperties()Creates an instance of RestorePolicyProperties class.
-
-
Method Details
-
enabled
public boolean enabled()Get the enabled property: Blob restore is enabled if set to true.- Returns:
- the enabled value.
-
withEnabled
Set the enabled property: Blob restore is enabled if set to true.- Parameters:
enabled- the enabled value to set.- Returns:
- the RestorePolicyProperties object itself.
-
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.
-
withDays
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.
-
lastEnabledTime
Get the lastEnabledTime property: Deprecated in favor of minRestoreTime property.- Returns:
- the lastEnabledTime value.
-
minRestoreTime
Get the minRestoreTime property: Returns the minimum date and time that the restore can be started.- Returns:
- the minRestoreTime value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<RestorePolicyProperties>- Throws:
IOException
-
fromJson
public static RestorePolicyProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the RestorePolicyProperties.
-