Class PodBasicConfig

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-11-29T01:29:49.168634544+07:00[Asia/Barnaul]", comments="Generator version: 7.7.0") public class PodBasicConfig extends Object
PodBasicConfig
  • Field Details

  • Constructor Details

    • PodBasicConfig

      public PodBasicConfig()
  • Method Details

    • 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 PodBasicConfig
    • fromJson

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

      public PodBasicConfig exitPolicy(String exitPolicy)
    • getExitPolicy

      @Nullable public String getExitPolicy()
      ExitPolicy determines the pod's exit and stop behaviour.
      Returns:
      exitPolicy
    • setExitPolicy

      public void setExitPolicy(String exitPolicy)
    • hostname

      public PodBasicConfig hostname(String hostname)
    • getHostname

      @Nullable public String getHostname()
      Hostname is the pod's hostname. If not set, the name of the pod will be used (if a name was not provided here, the name auto-generated for the pod will be used). This will be used by the infra container and all containers in the pod as long as the UTS namespace is shared. Optional.
      Returns:
      hostname
    • setHostname

      public void setHostname(String hostname)
    • infraCommand

      public PodBasicConfig infraCommand(List<String> infraCommand)
    • addInfraCommandItem

      public PodBasicConfig addInfraCommandItem(String infraCommandItem)
    • getInfraCommand

      @Nullable public List<String> getInfraCommand()
      InfraCommand sets the command that will be used to start the infra container. If not set, the default set in the Libpod configuration file will be used. Conflicts with NoInfra=true. Optional.
      Returns:
      infraCommand
    • setInfraCommand

      public void setInfraCommand(List<String> infraCommand)
    • infraConmonPidFile

      public PodBasicConfig infraConmonPidFile(String infraConmonPidFile)
    • getInfraConmonPidFile

      @Nullable public String getInfraConmonPidFile()
      InfraConmonPidFile is a custom path to store the infra container's conmon PID.
      Returns:
      infraConmonPidFile
    • setInfraConmonPidFile

      public void setInfraConmonPidFile(String infraConmonPidFile)
    • infraImage

      public PodBasicConfig infraImage(String infraImage)
    • getInfraImage

      @Nullable public String getInfraImage()
      InfraImage is the image that will be used for the infra container. If not set, the default set in the Libpod configuration file will be used. Conflicts with NoInfra=true. Optional.
      Returns:
      infraImage
    • setInfraImage

      public void setInfraImage(String infraImage)
    • infraName

      public PodBasicConfig infraName(String infraName)
    • getInfraName

      @Nullable public String getInfraName()
      InfraName is the name that will be used for the infra container. If not set, the default set in the Libpod configuration file will be used. Conflicts with NoInfra=true. Optional.
      Returns:
      infraName
    • setInfraName

      public void setInfraName(String infraName)
    • ipcns

      public PodBasicConfig ipcns(Namespace ipcns)
    • getIpcns

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

      public void setIpcns(Namespace ipcns)
    • labels

      public PodBasicConfig labels(Map<String,String> labels)
    • putLabelsItem

      public PodBasicConfig putLabelsItem(String key, String labelsItem)
    • getLabels

      @Nullable public Map<String,String> getLabels()
      Labels are key-value pairs that are used to add metadata to pods. Optional.
      Returns:
      labels
    • setLabels

      public void setLabels(Map<String,String> labels)
    • name

      public PodBasicConfig name(String name)
    • getName

      @Nullable public String getName()
      Name is the name of the pod. If not provided, a name will be generated when the pod is created. Optional.
      Returns:
      name
    • setName

      public void setName(String name)
    • noInfra

      public PodBasicConfig noInfra(Boolean noInfra)
    • getNoInfra

      @Nullable public Boolean getNoInfra()
      NoInfra tells the pod not to create an infra container. If this is done, many networking-related options will become unavailable. Conflicts with setting any options in PodNetworkConfig, and the InfraCommand and InfraImages in this struct. Optional.
      Returns:
      noInfra
    • setNoInfra

      public void setNoInfra(Boolean noInfra)
    • pidns

      public PodBasicConfig pidns(Namespace pidns)
    • getPidns

      @Nullable @Valid public @Valid Namespace getPidns()
      Get pidns
      Returns:
      pidns
    • setPidns

      public void setPidns(Namespace pidns)
    • podCreateCommand

      public PodBasicConfig podCreateCommand(List<String> podCreateCommand)
    • addPodCreateCommandItem

      public PodBasicConfig addPodCreateCommandItem(String podCreateCommandItem)
    • getPodCreateCommand

      @Nullable public List<String> getPodCreateCommand()
      Get podCreateCommand
      Returns:
      podCreateCommand
    • setPodCreateCommand

      public void setPodCreateCommand(List<String> podCreateCommand)
    • podDevices

      public PodBasicConfig podDevices(List<String> podDevices)
    • addPodDevicesItem

      public PodBasicConfig addPodDevicesItem(String podDevicesItem)
    • getPodDevices

      @Nullable public List<String> getPodDevices()
      Devices contains user specified Devices to be added to the Pod
      Returns:
      podDevices
    • setPodDevices

      public void setPodDevices(List<String> podDevices)
    • restartPolicy

      public PodBasicConfig restartPolicy(String restartPolicy)
    • getRestartPolicy

      @Nullable public String getRestartPolicy()
      RestartPolicy is the pod's restart policy - an action which will be taken when one or all the containers in the pod exits. If not given, the default policy will be set to Always, which restarts the containers in the pod when they exit indefinitely. Optional.
      Returns:
      restartPolicy
    • setRestartPolicy

      public void setRestartPolicy(String restartPolicy)
    • restartTries

      public PodBasicConfig restartTries(Integer restartTries)
    • getRestartTries

      @Nullable public Integer getRestartTries()
      RestartRetries is the number of attempts that will be made to restart the container. Only available when RestartPolicy is set to \"on-failure\". Optional.
      Returns:
      restartTries
    • setRestartTries

      public void setRestartTries(Integer restartTries)
    • shareParent

      public PodBasicConfig shareParent(Boolean shareParent)
    • getShareParent

      @Nullable public Boolean getShareParent()
      PodCreateCommand is the command used to create this pod. This will be shown in the output of Inspect() on the pod, and may also be used by some tools that wish to recreate the pod (e.g. `podman generate systemd --new`). Optional. ShareParent determines if all containers in the pod will share the pod's cgroup as the cgroup parent
      Returns:
      shareParent
    • setShareParent

      public void setShareParent(Boolean shareParent)
    • sharedNamespaces

      public PodBasicConfig sharedNamespaces(List<String> sharedNamespaces)
    • addSharedNamespacesItem

      public PodBasicConfig addSharedNamespacesItem(String sharedNamespacesItem)
    • getSharedNamespaces

      @Nullable public List<String> getSharedNamespaces()
      SharedNamespaces instructs the pod to share a set of namespaces. Shared namespaces will be joined (by default) by every container which joins the pod. If not set and NoInfra is false, the pod will set a default set of namespaces to share. Conflicts with NoInfra=true. Optional.
      Returns:
      sharedNamespaces
    • setSharedNamespaces

      public void setSharedNamespaces(List<String> sharedNamespaces)
    • sysctl

      public PodBasicConfig sysctl(Map<String,String> sysctl)
    • putSysctlItem

      public PodBasicConfig putSysctlItem(String key, String sysctlItem)
    • getSysctl

      @Nullable public Map<String,String> getSysctl()
      Sysctl sets kernel parameters for the pod
      Returns:
      sysctl
    • setSysctl

      public void setSysctl(Map<String,String> sysctl)
    • userns

      public PodBasicConfig userns(Namespace userns)
    • getUserns

      @Nullable @Valid public @Valid Namespace getUserns()
      Get userns
      Returns:
      userns
    • setUserns

      public void setUserns(Namespace userns)
    • utsns

      public PodBasicConfig utsns(Namespace utsns)
    • getUtsns

      @Nullable @Valid public @Valid Namespace getUtsns()
      Get utsns
      Returns:
      utsns
    • setUtsns

      public void setUtsns(Namespace utsns)
    • 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
    • toJson

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