Class SnapshotCreationData
java.lang.Object
com.azure.resourcemanager.elasticsan.models.SnapshotCreationData
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SnapshotCreationData>
public final class SnapshotCreationData
extends Object
implements com.azure.json.JsonSerializable<SnapshotCreationData>
Data used when creating a volume snapshot.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SnapshotCreationData
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of SnapshotCreationData from the JsonReader.sourceId()
Get the sourceId property: Fully qualified resource ID of the volume.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withSourceId
(String sourceId) Set the sourceId property: Fully qualified resource ID of the volume.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
-
SnapshotCreationData
public SnapshotCreationData()Creates an instance of SnapshotCreationData class.
-
-
Method Details
-
sourceId
Get the sourceId property: Fully qualified resource ID of the volume. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}".- Returns:
- the sourceId value.
-
withSourceId
Set the sourceId property: Fully qualified resource ID of the volume. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}".- Parameters:
sourceId
- the sourceId value to set.- Returns:
- the SnapshotCreationData object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<SnapshotCreationData>
- Throws:
IOException
-
fromJson
public static SnapshotCreationData fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SnapshotCreationData from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of SnapshotCreationData 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 SnapshotCreationData.
-