Class V1VolumeMount

java.lang.Object
io.kubernetes.client.openapi.models.V1VolumeMount

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-02-02T17:56:12.287571Z[Etc/UTC]") public class V1VolumeMount extends Object
VolumeMount describes a mounting of a Volume within a container.
  • Field Details

  • Constructor Details

    • V1VolumeMount

      public V1VolumeMount()
  • Method Details

    • mountPath

      public V1VolumeMount mountPath(String mountPath)
    • getMountPath

      @Nonnull public String getMountPath()
      Path within the container at which the volume should be mounted. Must not contain ':'.
      Returns:
      mountPath
    • setMountPath

      public void setMountPath(String mountPath)
    • mountPropagation

      public V1VolumeMount mountPropagation(String mountPropagation)
    • getMountPropagation

      @Nullable public String getMountPropagation()
      mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.
      Returns:
      mountPropagation
    • setMountPropagation

      public void setMountPropagation(String mountPropagation)
    • name

      public V1VolumeMount name(String name)
    • getName

      @Nonnull public String getName()
      This must match the Name of a Volume.
      Returns:
      name
    • setName

      public void setName(String name)
    • readOnly

      public V1VolumeMount readOnly(Boolean readOnly)
    • getReadOnly

      @Nullable public Boolean getReadOnly()
      Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
      Returns:
      readOnly
    • setReadOnly

      public void setReadOnly(Boolean readOnly)
    • subPath

      public V1VolumeMount subPath(String subPath)
    • getSubPath

      @Nullable public String getSubPath()
      Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).
      Returns:
      subPath
    • setSubPath

      public void setSubPath(String subPath)
    • subPathExpr

      public V1VolumeMount subPathExpr(String subPathExpr)
    • getSubPathExpr

      @Nullable public String getSubPathExpr()
      Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.
      Returns:
      subPathExpr
    • setSubPathExpr

      public void setSubPathExpr(String subPathExpr)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates the JSON Object and throws an exception if issues found
      Parameters:
      jsonObj - JSON Object
      Throws:
      IOException - if the JSON Object is invalid with respect to V1VolumeMount
    • fromJson

      public static V1VolumeMount fromJson(String jsonString) throws IOException
      Create an instance of V1VolumeMount given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of V1VolumeMount
      Throws:
      IOException - if the JSON string is invalid with respect to V1VolumeMount
    • toJson

      public String toJson()
      Convert an instance of V1VolumeMount to an JSON string
      Returns:
      JSON string