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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind()Get the bind property: Bind Options of the mount.Get the consistency property: Consistency of the volume.static VolumeDefinitionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of VolumeDefinition from the JsonReader.readOnly()Get the readOnly property: Indicate whether to mount volume as readOnly.source()Get the source property: Source of the mount.target()Get the target property: Target of the mount.tmpfs()Get the tmpfs property: tmpfs option of the mount.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: Type of Volume Definition.voidvalidate()Validates the instance.volume()Get the volume property: Volume Options of the mount.withBind(BindOptions bind) Set the bind property: Bind Options of the mount.withConsistency(String consistency) Set the consistency property: Consistency of the volume.withReadOnly(Boolean readOnly) Set the readOnly property: Indicate whether to mount volume as readOnly.withSource(String source) Set the source property: Source of the mount.withTarget(String target) Set the target property: Target of the mount.withTmpfs(TmpfsOptions tmpfs) Set the tmpfs property: tmpfs option of the mount.withType(VolumeDefinitionType type) Set the type property: Type of Volume Definition.withVolume(VolumeOptions volume) Set the volume property: Volume Options of the mount.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
VolumeDefinition
public VolumeDefinition()Creates an instance of VolumeDefinition class.
-
-
Method Details
-
type
Get the type property: Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe.- Returns:
- the type value.
-
withType
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
Get the readOnly property: Indicate whether to mount volume as readOnly. Default value for this is false.- Returns:
- the readOnly value.
-
withReadOnly
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
Get the source property: Source of the mount. For bind mounts this is the host path.- Returns:
- the source value.
-
withSource
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
Get the target property: Target of the mount. For bind mounts this is the path in the container.- Returns:
- the target value.
-
withTarget
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
Get the consistency property: Consistency of the volume.- Returns:
- the consistency value.
-
withConsistency
Set the consistency property: Consistency of the volume.- Parameters:
consistency- the consistency value to set.- Returns:
- the VolumeDefinition object itself.
-
bind
Get the bind property: Bind Options of the mount.- Returns:
- the bind value.
-
withBind
Set the bind property: Bind Options of the mount.- Parameters:
bind- the bind value to set.- Returns:
- the VolumeDefinition object itself.
-
volume
Get the volume property: Volume Options of the mount.- Returns:
- the volume value.
-
withVolume
Set the volume property: Volume Options of the mount.- Parameters:
volume- the volume value to set.- Returns:
- the VolumeDefinition object itself.
-
tmpfs
Get the tmpfs property: tmpfs option of the mount.- Returns:
- the tmpfs value.
-
withTmpfs
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<VolumeDefinition>- Throws:
IOException
-
fromJson
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.
-