VolumeMount Class

  • java.lang.Object
    • com.azure.resourcemanager.containerinstance.models.VolumeMount

Implements

public final class VolumeMount
implements JsonSerializable<VolumeMount>

The properties of the volume mount.

Constructor Summary

Constructor Description
VolumeMount()

Creates an instance of VolumeMount class.

Method Summary

Modifier and Type Method and Description
static VolumeMount fromJson(JsonReader jsonReader)

Reads an instance of VolumeMount from the JsonReader.

String mountPath()

Get the mountPath property: The path within the container where the volume should be mounted.

String name()

Get the name property: The name of the volume mount.

Boolean readOnly()

Get the readOnly property: The flag indicating whether the volume mount is read-only.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

VolumeMount withMountPath(String mountPath)

Set the mountPath property: The path within the container where the volume should be mounted.

VolumeMount withName(String name)

Set the name property: The name of the volume mount.

VolumeMount withReadOnly(Boolean readOnly)

Set the readOnly property: The flag indicating whether the volume mount is read-only.

Methods inherited from java.lang.Object

Constructor Details

VolumeMount

public VolumeMount()

Creates an instance of VolumeMount class.

Method Details

fromJson

public static VolumeMount fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

mountPath

public String mountPath()

Get the mountPath property: The path within the container where the volume should be mounted. Must not contain colon (:).

Returns:

the mountPath value.

name

public String name()

Get the name property: The name of the volume mount.

Returns:

the name value.

readOnly

public Boolean readOnly()

Get the readOnly property: The flag indicating whether the volume mount is read-only.

Returns:

the readOnly value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withMountPath

public VolumeMount withMountPath(String mountPath)

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.

withName

public VolumeMount withName(String name)

Set the name property: The name of the volume mount.

Parameters:

name - the name value to set.

Returns:

the VolumeMount object itself.

withReadOnly

public VolumeMount withReadOnly(Boolean readOnly)

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.

Applies to