Class SourceCreationData

java.lang.Object
com.azure.resourcemanager.elasticsan.models.SourceCreationData
All Implemented Interfaces:
com.azure.json.JsonSerializable<SourceCreationData>

public final class SourceCreationData extends Object implements com.azure.json.JsonSerializable<SourceCreationData>
Data source used when creating the volume.
  • Constructor Details

    • SourceCreationData

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

    • createSource

      public VolumeCreateOption createSource()
      Get the createSource property: This enumerates the possible sources of a volume creation.
      Returns:
      the createSource value.
    • withCreateSource

      public SourceCreationData withCreateSource(VolumeCreateOption createSource)
      Set the createSource property: This enumerates the possible sources of a volume creation.
      Parameters:
      createSource - the createSource value to set.
      Returns:
      the SourceCreationData object itself.
    • sourceId

      public String sourceId()
      Get the sourceId property: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}".
      Returns:
      the sourceId value.
    • withSourceId

      public SourceCreationData withSourceId(String sourceId)
      Set the sourceId property: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}".
      Parameters:
      sourceId - the sourceId value to set.
      Returns:
      the SourceCreationData 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<SourceCreationData>
      Throws:
      IOException
    • fromJson

      public static SourceCreationData fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SourceCreationData from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SourceCreationData 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 SourceCreationData.