Class VolumeDefinition

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

public final class VolumeDefinition extends Object implements com.azure.json.JsonSerializable<VolumeDefinition>
Describes the volume configuration for the container.
  • Constructor Details

    • VolumeDefinition

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

    • type

      public VolumeDefinitionType type()
      Get the type property: Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe.
      Returns:
      the type value.
    • withType

      public VolumeDefinition withType(VolumeDefinitionType type)
      Set the type property: Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe.
      Parameters:
      type - the type value to set.
      Returns:
      the VolumeDefinition object itself.
    • readOnly

      public Boolean readOnly()
      Get the readOnly property: Indicate whether to mount volume as readOnly. Default value for this is false.
      Returns:
      the readOnly value.
    • withReadOnly

      public VolumeDefinition withReadOnly(Boolean readOnly)
      Set the readOnly property: Indicate whether to mount volume as readOnly. Default value for this is false.
      Parameters:
      readOnly - the readOnly value to set.
      Returns:
      the VolumeDefinition object itself.
    • source

      public String source()
      Get the source property: Source of the mount. For bind mounts this is the host path.
      Returns:
      the source value.
    • withSource

      public VolumeDefinition withSource(String source)
      Set the source property: Source of the mount. For bind mounts this is the host path.
      Parameters:
      source - the source value to set.
      Returns:
      the VolumeDefinition object itself.
    • target

      public String target()
      Get the target property: Target of the mount. For bind mounts this is the path in the container.
      Returns:
      the target value.
    • withTarget

      public VolumeDefinition withTarget(String target)
      Set the target property: Target of the mount. For bind mounts this is the path in the container.
      Parameters:
      target - the target value to set.
      Returns:
      the VolumeDefinition object itself.
    • consistency

      public String consistency()
      Get the consistency property: Consistency of the volume.
      Returns:
      the consistency value.
    • withConsistency

      public VolumeDefinition withConsistency(String consistency)
      Set the consistency property: Consistency of the volume.
      Parameters:
      consistency - the consistency value to set.
      Returns:
      the VolumeDefinition object itself.
    • bind

      public BindOptions bind()
      Get the bind property: Bind Options of the mount.
      Returns:
      the bind value.
    • withBind

      public VolumeDefinition withBind(BindOptions bind)
      Set the bind property: Bind Options of the mount.
      Parameters:
      bind - the bind value to set.
      Returns:
      the VolumeDefinition object itself.
    • volume

      public VolumeOptions volume()
      Get the volume property: Volume Options of the mount.
      Returns:
      the volume value.
    • withVolume

      public VolumeDefinition withVolume(VolumeOptions volume)
      Set the volume property: Volume Options of the mount.
      Parameters:
      volume - the volume value to set.
      Returns:
      the VolumeDefinition object itself.
    • tmpfs

      public TmpfsOptions tmpfs()
      Get the tmpfs property: tmpfs option of the mount.
      Returns:
      the tmpfs value.
    • withTmpfs

      public VolumeDefinition withTmpfs(TmpfsOptions tmpfs)
      Set the tmpfs property: tmpfs option of the mount.
      Parameters:
      tmpfs - the tmpfs value to set.
      Returns:
      the VolumeDefinition 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<VolumeDefinition>
      Throws:
      IOException
    • fromJson

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