Class VolumeMount
java.lang.Object
com.azure.resourcemanager.containerinstance.models.VolumeMount
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VolumeMount>
public final class VolumeMount
extends Object
implements com.azure.json.JsonSerializable<VolumeMount>
The properties of the volume mount.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VolumeMountfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of VolumeMount from the JsonReader.Get the mountPath property: The path within the container where the volume should be mounted.name()Get the name property: The name of the volume mount.readOnly()Get the readOnly property: The flag indicating whether the volume mount is read-only.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withMountPath(String mountPath) Set the mountPath property: The path within the container where the volume should be mounted.Set the name property: The name of the volume mount.withReadOnly(Boolean readOnly) Set the readOnly property: The flag indicating whether the volume mount is read-only.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
-
VolumeMount
public VolumeMount()Creates an instance of VolumeMount class.
-
-
Method Details
-
name
Get the name property: The name of the volume mount.- Returns:
- the name value.
-
withName
Set the name property: The name of the volume mount.- Parameters:
name- the name value to set.- Returns:
- the VolumeMount object itself.
-
mountPath
Get the mountPath property: The path within the container where the volume should be mounted. Must not contain colon (:).- Returns:
- the mountPath value.
-
withMountPath
Set the mountPath property: The path within the container where the volume should be mounted. Must not contain colon (:).- Parameters:
mountPath- the mountPath value to set.- Returns:
- the VolumeMount object itself.
-
readOnly
Get the readOnly property: The flag indicating whether the volume mount is read-only.- Returns:
- the readOnly value.
-
withReadOnly
Set the readOnly property: The flag indicating whether the volume mount is read-only.- Parameters:
readOnly- the readOnly value to set.- Returns:
- the VolumeMount 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<VolumeMount>- Throws:
IOException
-
fromJson
Reads an instance of VolumeMount from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of VolumeMount 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 VolumeMount.
-