Class ResourceRestoreParameters
java.lang.Object
com.azure.resourcemanager.cosmos.models.RestoreParametersBase
com.azure.resourcemanager.cosmos.models.ResourceRestoreParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RestoreParametersBase>
Parameters to indicate the information about the restore.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ResourceRestoreParameters class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceRestoreParameters
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ResourceRestoreParameters from the JsonReader.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withRestoreSource
(String restoreSource) Set the restoreSource property: The id of the restorable database account from which the restore has to be initiated.withRestoreTimestampInUtc
(OffsetDateTime restoreTimestampInUtc) Set the restoreTimestampInUtc property: Time to which the account has to be restored (ISO-8601 format).withRestoreWithTtlDisabled
(Boolean restoreWithTtlDisabled) Set the restoreWithTtlDisabled property: Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.Methods inherited from class com.azure.resourcemanager.cosmos.models.RestoreParametersBase
restoreSource, restoreTimestampInUtc, restoreWithTtlDisabled
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ResourceRestoreParameters
public ResourceRestoreParameters()Creates an instance of ResourceRestoreParameters class.
-
-
Method Details
-
withRestoreSource
Set the restoreSource property: The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}.- Overrides:
withRestoreSource
in classRestoreParametersBase
- Parameters:
restoreSource
- the restoreSource value to set.- Returns:
- the RestoreParametersBase object itself.
-
withRestoreTimestampInUtc
Set the restoreTimestampInUtc property: Time to which the account has to be restored (ISO-8601 format).- Overrides:
withRestoreTimestampInUtc
in classRestoreParametersBase
- Parameters:
restoreTimestampInUtc
- the restoreTimestampInUtc value to set.- Returns:
- the RestoreParametersBase object itself.
-
withRestoreWithTtlDisabled
Set the restoreWithTtlDisabled property: Specifies whether the restored account will have Time-To-Live disabled upon the successful restore.- Overrides:
withRestoreWithTtlDisabled
in classRestoreParametersBase
- Parameters:
restoreWithTtlDisabled
- the restoreWithTtlDisabled value to set.- Returns:
- the RestoreParametersBase object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validate
in classRestoreParametersBase
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<RestoreParametersBase>
- Overrides:
toJson
in classRestoreParametersBase
- Throws:
IOException
-
fromJson
public static ResourceRestoreParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ResourceRestoreParameters from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ResourceRestoreParameters 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 ResourceRestoreParameters.
-