Class ContainerStorageConfig

java.lang.Object
io.github.alersrt.pod4j.openapi.model.ContainerStorageConfig
All Implemented Interfaces:
Serializable

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class ContainerStorageConfig extends Object implements Serializable
ContainerStorageConfig contains information on the storage configuration of a container.
See Also:
  • Field Details

  • Constructor Details

    • ContainerStorageConfig

      public ContainerStorageConfig()
  • Method Details

    • chrootDirectories

      public ContainerStorageConfig chrootDirectories(List<String> chrootDirectories)
    • addChrootDirectoriesItem

      public ContainerStorageConfig addChrootDirectoriesItem(String chrootDirectoriesItem)
    • getChrootDirectories

      @Nullable public List<String> getChrootDirectories()
      ChrootDirs is an additional set of directories that need to be treated as root directories. Standard bind mounts will be mounted into paths relative to these directories. Optional.
      Returns:
      chrootDirectories
    • setChrootDirectories

      public void setChrootDirectories(List<String> chrootDirectories)
    • createWorkingDir

      public ContainerStorageConfig createWorkingDir(Boolean createWorkingDir)
    • getCreateWorkingDir

      @Nullable public Boolean getCreateWorkingDir()
      Create the working directory if it doesn't exist. If unset, it doesn't create it. Optional.
      Returns:
      createWorkingDir
    • setCreateWorkingDir

      public void setCreateWorkingDir(Boolean createWorkingDir)
    • deviceCgroupRule

      public ContainerStorageConfig deviceCgroupRule(List<LinuxDeviceCgroup> deviceCgroupRule)
    • addDeviceCgroupRuleItem

      public ContainerStorageConfig addDeviceCgroupRuleItem(LinuxDeviceCgroup deviceCgroupRuleItem)
    • getDeviceCgroupRule

      @Nullable @Valid public @Valid List<LinuxDeviceCgroup> getDeviceCgroupRule()
      DeviceCgroupRule are device cgroup rules that allow containers to use additional types of devices.
      Returns:
      deviceCgroupRule
    • setDeviceCgroupRule

      public void setDeviceCgroupRule(List<LinuxDeviceCgroup> deviceCgroupRule)
    • devices

      public ContainerStorageConfig devices(List<LinuxDevice> devices)
    • addDevicesItem

      public ContainerStorageConfig addDevicesItem(LinuxDevice devicesItem)
    • getDevices

      @Nullable @Valid public @Valid List<LinuxDevice> getDevices()
      Devices are devices that will be added to the container. Optional.
      Returns:
      devices
    • setDevices

      public void setDevices(List<LinuxDevice> devices)
    • devicesFrom

      public ContainerStorageConfig devicesFrom(List<String> devicesFrom)
    • addDevicesFromItem

      public ContainerStorageConfig addDevicesFromItem(String devicesFromItem)
    • getDevicesFrom

      @Nullable public List<String> getDevicesFrom()
      DevicesFrom specifies that this container will mount the device(s) from other container(s). Optional.
      Returns:
      devicesFrom
    • setDevicesFrom

      public void setDevicesFrom(List<String> devicesFrom)
    • hostDeviceList

      public ContainerStorageConfig hostDeviceList(List<LinuxDevice> hostDeviceList)
    • addHostDeviceListItem

      public ContainerStorageConfig addHostDeviceListItem(LinuxDevice hostDeviceListItem)
    • getHostDeviceList

      @Nullable @Valid public @Valid List<LinuxDevice> getHostDeviceList()
      HostDeviceList is used to recreate the mounted device on inherited containers
      Returns:
      hostDeviceList
    • setHostDeviceList

      public void setHostDeviceList(List<LinuxDevice> hostDeviceList)
    • image

      public ContainerStorageConfig image(String image)
    • getImage

      @Nullable public String getImage()
      Image is the image the container will be based on. The image will be used as the container's root filesystem, and its environment vars, volumes, and other configuration will be applied to the container. Conflicts with Rootfs. At least one of Image or Rootfs must be specified.
      Returns:
      image
    • setImage

      public void setImage(String image)
    • imageArch

      public ContainerStorageConfig imageArch(String imageArch)
    • getImageArch

      @Nullable public String getImageArch()
      ImageArch is the user-specified image architecture. Used to select a different variant from a manifest list. Optional.
      Returns:
      imageArch
    • setImageArch

      public void setImageArch(String imageArch)
    • imageOs

      public ContainerStorageConfig imageOs(String imageOs)
    • getImageOs

      @Nullable public String getImageOs()
      ImageOS is the user-specified OS of the image. Used to select a different variant from a manifest list. Optional.
      Returns:
      imageOs
    • setImageOs

      public void setImageOs(String imageOs)
    • imageVariant

      public ContainerStorageConfig imageVariant(String imageVariant)
    • getImageVariant

      @Nullable public String getImageVariant()
      ImageVariant is the user-specified image variant. Used to select a different variant from a manifest list. Optional.
      Returns:
      imageVariant
    • setImageVariant

      public void setImageVariant(String imageVariant)
    • imageVolumeMode

      public ContainerStorageConfig imageVolumeMode(String imageVolumeMode)
    • getImageVolumeMode

      @Nullable public String getImageVolumeMode()
      ImageVolumeMode indicates how image volumes will be created. Supported modes are \"ignore\" (do not create), \"tmpfs\" (create as tmpfs), and \"anonymous\" (create as anonymous volumes). The default if unset is anonymous. Optional.
      Returns:
      imageVolumeMode
    • setImageVolumeMode

      public void setImageVolumeMode(String imageVolumeMode)
    • imageVolumes

      public ContainerStorageConfig imageVolumes(List<ImageVolume> imageVolumes)
    • addImageVolumesItem

      public ContainerStorageConfig addImageVolumesItem(ImageVolume imageVolumesItem)
    • getImageVolumes

      @Nullable @Valid public @Valid List<ImageVolume> getImageVolumes()
      Image volumes bind-mount a container-image mount into the container. Optional.
      Returns:
      imageVolumes
    • setImageVolumes

      public void setImageVolumes(List<ImageVolume> imageVolumes)
    • init

      public ContainerStorageConfig init(Boolean init)
    • getInit

      @Nullable public Boolean getInit()
      Init specifies that an init binary will be mounted into the container, and will be used as PID1. Optional.
      Returns:
      init
    • setInit

      public void setInit(Boolean init)
    • initPath

      public ContainerStorageConfig initPath(String initPath)
    • getInitPath

      @Nullable public String getInitPath()
      InitPath specifies the path to the init binary that will be added if Init is specified above. If not specified, the default set in the Libpod config will be used. Ignored if Init above is not set. Optional.
      Returns:
      initPath
    • setInitPath

      public void setInitPath(String initPath)
    • ipcns

      public ContainerStorageConfig ipcns(Namespace ipcns)
    • getIpcns

      @Nullable @Valid public @Valid Namespace getIpcns()
      Get ipcns
      Returns:
      ipcns
    • setIpcns

      public void setIpcns(Namespace ipcns)
    • mounts

      public ContainerStorageConfig mounts(List<Mount> mounts)
    • addMountsItem

      public ContainerStorageConfig addMountsItem(Mount mountsItem)
    • getMounts

      @Nullable @Valid public @Valid List<Mount> getMounts()
      Mounts are mounts that will be added to the container. These will supersede Image Volumes and VolumesFrom volumes where there are conflicts. Optional.
      Returns:
      mounts
    • setMounts

      public void setMounts(List<Mount> mounts)
    • overlayVolumes

      public ContainerStorageConfig overlayVolumes(List<OverlayVolume> overlayVolumes)
    • addOverlayVolumesItem

      public ContainerStorageConfig addOverlayVolumesItem(OverlayVolume overlayVolumesItem)
    • getOverlayVolumes

      @Nullable @Valid public @Valid List<OverlayVolume> getOverlayVolumes()
      Overlay volumes are named volumes that will be added to the container. Optional.
      Returns:
      overlayVolumes
    • setOverlayVolumes

      public void setOverlayVolumes(List<OverlayVolume> overlayVolumes)
    • rawImageName

      public ContainerStorageConfig rawImageName(String rawImageName)
    • getRawImageName

      @Nullable public String getRawImageName()
      RawImageName is the user-specified and unprocessed input referring to a local or a remote image. Optional, but strongly encouraged to be set if Image is set.
      Returns:
      rawImageName
    • setRawImageName

      public void setRawImageName(String rawImageName)
    • rootfs

      public ContainerStorageConfig rootfs(String rootfs)
    • getRootfs

      @Nullable public String getRootfs()
      Rootfs is the path to a directory that will be used as the container's root filesystem. No modification will be made to the directory, it will be directly mounted into the container as root. Conflicts with Image. At least one of Image or Rootfs must be specified.
      Returns:
      rootfs
    • setRootfs

      public void setRootfs(String rootfs)
    • rootfsMapping

      public ContainerStorageConfig rootfsMapping(String rootfsMapping)
    • getRootfsMapping

      @Nullable public String getRootfsMapping()
      RootfsMapping specifies if there are UID/GID mappings to apply to the rootfs. Optional.
      Returns:
      rootfsMapping
    • setRootfsMapping

      public void setRootfsMapping(String rootfsMapping)
    • rootfsOverlay

      public ContainerStorageConfig rootfsOverlay(Boolean rootfsOverlay)
    • getRootfsOverlay

      @Nullable public Boolean getRootfsOverlay()
      RootfsOverlay tells if rootfs is actually an overlay on top of base path. Optional.
      Returns:
      rootfsOverlay
    • setRootfsOverlay

      public void setRootfsOverlay(Boolean rootfsOverlay)
    • rootfsPropagation

      public ContainerStorageConfig rootfsPropagation(String rootfsPropagation)
    • getRootfsPropagation

      @Nullable public String getRootfsPropagation()
      RootfsPropagation is the rootfs propagation mode for the container. If not set, the default of rslave will be used. Optional.
      Returns:
      rootfsPropagation
    • setRootfsPropagation

      public void setRootfsPropagation(String rootfsPropagation)
    • secrets

      public ContainerStorageConfig secrets(List<Secret> secrets)
    • addSecretsItem

      public ContainerStorageConfig addSecretsItem(Secret secretsItem)
    • getSecrets

      @Nullable @Valid public @Valid List<Secret> getSecrets()
      Secrets are the secrets that will be added to the container Optional.
      Returns:
      secrets
    • setSecrets

      public void setSecrets(List<Secret> secrets)
    • shmSize

      public ContainerStorageConfig shmSize(Long shmSize)
    • getShmSize

      @Nullable public Long getShmSize()
      ShmSize is the size of the tmpfs to mount in at /dev/shm, in bytes. Conflicts with ShmSize if IpcNS is not private. Optional.
      Returns:
      shmSize
    • setShmSize

      public void setShmSize(Long shmSize)
    • shmSizeSystemd

      public ContainerStorageConfig shmSizeSystemd(Long shmSizeSystemd)
    • getShmSizeSystemd

      @Nullable public Long getShmSizeSystemd()
      ShmSizeSystemd is the size of systemd-specific tmpfs mounts specifically /run, /run/lock, /var/log/journal and /tmp. Optional
      Returns:
      shmSizeSystemd
    • setShmSizeSystemd

      public void setShmSizeSystemd(Long shmSizeSystemd)
    • storageOpts

      public ContainerStorageConfig storageOpts(Map<String,String> storageOpts)
    • putStorageOptsItem

      public ContainerStorageConfig putStorageOptsItem(String key, String storageOptsItem)
    • getStorageOpts

      @Nullable public Map<String,String> getStorageOpts()
      StorageOpts is the container's storage options Optional.
      Returns:
      storageOpts
    • setStorageOpts

      public void setStorageOpts(Map<String,String> storageOpts)
    • _volatile

      public ContainerStorageConfig _volatile(Boolean _volatile)
    • getVolatile

      @Nullable public Boolean getVolatile()
      Volatile specifies whether the container storage can be optimized at the cost of not syncing all the dirty files in memory. Optional.
      Returns:
      _volatile
    • setVolatile

      public void setVolatile(Boolean _volatile)
    • volumes

      public ContainerStorageConfig volumes(List<NamedVolume> volumes)
    • addVolumesItem

      public ContainerStorageConfig addVolumesItem(NamedVolume volumesItem)
    • getVolumes

      @Nullable @Valid public @Valid List<NamedVolume> getVolumes()
      Volumes are named volumes that will be added to the container. These will supersede Image Volumes and VolumesFrom volumes where there are conflicts. Optional.
      Returns:
      volumes
    • setVolumes

      public void setVolumes(List<NamedVolume> volumes)
    • volumesFrom

      public ContainerStorageConfig volumesFrom(List<String> volumesFrom)
    • addVolumesFromItem

      public ContainerStorageConfig addVolumesFromItem(String volumesFromItem)
    • getVolumesFrom

      @Nullable public List<String> getVolumesFrom()
      VolumesFrom is a set of containers whose volumes will be added to this container. The name or ID of the container must be provided, and may optionally be followed by a : and then one or more comma-separated options. Valid options are 'ro', 'rw', and 'z'. Options will be used for all volumes sourced from the container. Optional.
      Returns:
      volumesFrom
    • setVolumesFrom

      public void setVolumesFrom(List<String> volumesFrom)
    • workDir

      public ContainerStorageConfig workDir(String workDir)
    • getWorkDir

      @Nullable public String getWorkDir()
      WorkDir is the container's working directory. If unset, the default, /, will be used. Optional.
      Returns:
      workDir
    • setWorkDir

      public void setWorkDir(String workDir)
    • 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 ContainerStorageConfig
    • fromJson

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

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