Class NamedVolume

java.lang.Object
io.github.alersrt.pod4j.openapi.model.NamedVolume

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-11-19T11:19:05.435500352+07:00[Asia/Barnaul]", comments="Generator version: 7.7.0") public class NamedVolume extends Object
NamedVolume holds information about a named volume that will be mounted into the container.
  • Field Details

  • Constructor Details

    • NamedVolume

      public NamedVolume()
  • Method Details

    • dest

      public NamedVolume dest(String dest)
    • getDest

      @Nullable public String getDest()
      Destination to mount the named volume within the container. Must be an absolute path. Path will be created if it does not exist.
      Returns:
      dest
    • setDest

      public void setDest(String dest)
    • isAnonymous

      public NamedVolume isAnonymous(Boolean isAnonymous)
    • getIsAnonymous

      @Nullable public Boolean getIsAnonymous()
      IsAnonymous sets the named volume as anonymous even if it has a name This is used for emptyDir volumes from a kube yaml
      Returns:
      isAnonymous
    • setIsAnonymous

      public void setIsAnonymous(Boolean isAnonymous)
    • name

      public NamedVolume name(String name)
    • getName

      @Nullable public String getName()
      Name is the name of the named volume to be mounted. May be empty. If empty, a new named volume with a pseudorandomly generated name will be mounted at the given destination.
      Returns:
      name
    • setName

      public void setName(String name)
    • options

      public NamedVolume options(List<String> options)
    • addOptionsItem

      public NamedVolume addOptionsItem(String optionsItem)
    • getOptions

      @Nullable public List<String> getOptions()
      Options are options that the named volume will be mounted with.
      Returns:
      options
    • setOptions

      public void setOptions(List<String> options)
    • subPath

      public NamedVolume subPath(String subPath)
    • getSubPath

      @Nullable public String getSubPath()
      SubPath stores the sub directory of the named volume to be mounted in the container
      Returns:
      subPath
    • setSubPath

      public void setSubPath(String subPath)
    • 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
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to NamedVolume
    • fromJson

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

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