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 Details

    • SnapshotCreationData

      public SnapshotCreationData()
      Creates an instance of SnapshotCreationData class.
  • Method Details

    • sourceId

      public String 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

      public SnapshotCreationData withSourceId(String sourceId)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.