Class ContainerBasicConfig

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

@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 ContainerBasicConfig extends Object
ContainerBasicConfig
  • Field Details

  • Constructor Details

    • ContainerBasicConfig

      public ContainerBasicConfig()
  • Method Details

    • annotations

      public ContainerBasicConfig annotations(Map<String,String> annotations)
    • putAnnotationsItem

      public ContainerBasicConfig putAnnotationsItem(String key, String annotationsItem)
    • getAnnotations

      @Nullable public Map<String,String> getAnnotations()
      Annotations are key-value options passed into the container runtime that can be used to trigger special behavior. Optional.
      Returns:
      annotations
    • setAnnotations

      public void setAnnotations(Map<String,String> annotations)
    • command

      public ContainerBasicConfig command(List<String> command)
    • addCommandItem

      public ContainerBasicConfig addCommandItem(String commandItem)
    • getCommand

      @Nullable public List<String> getCommand()
      Command is the container's command. If not given and Image is specified, this will be populated by the image's configuration. Optional.
      Returns:
      command
    • setCommand

      public void setCommand(List<String> command)
    • conmonPidFile

      public ContainerBasicConfig conmonPidFile(String conmonPidFile)
    • getConmonPidFile

      @Nullable public String getConmonPidFile()
      ConmonPidFile is a path at which a PID file for Conmon will be placed. If not given, a default location will be used. Optional.
      Returns:
      conmonPidFile
    • setConmonPidFile

      public void setConmonPidFile(String conmonPidFile)
    • containerCreateCommand

      public ContainerBasicConfig containerCreateCommand(List<String> containerCreateCommand)
    • addContainerCreateCommandItem

      public ContainerBasicConfig addContainerCreateCommandItem(String containerCreateCommandItem)
    • getContainerCreateCommand

      @Nullable public List<String> getContainerCreateCommand()
      ContainerCreateCommand is the command that was used to create this container. This will be shown in the output of Inspect() on the container, and may also be used by some tools that wish to recreate the container (e.g. `podman generate systemd --new`). Optional.
      Returns:
      containerCreateCommand
    • setContainerCreateCommand

      public void setContainerCreateCommand(List<String> containerCreateCommand)
    • dependencyContainers

      public ContainerBasicConfig dependencyContainers(List<String> dependencyContainers)
    • addDependencyContainersItem

      public ContainerBasicConfig addDependencyContainersItem(String dependencyContainersItem)
    • getDependencyContainers

      @Nullable public List<String> getDependencyContainers()
      DependencyContainers is an array of containers this container depends on. Dependency containers must be started before this container. Dependencies can be specified by name or full/partial ID. Optional.
      Returns:
      dependencyContainers
    • setDependencyContainers

      public void setDependencyContainers(List<String> dependencyContainers)
    • entrypoint

      public ContainerBasicConfig entrypoint(List<String> entrypoint)
    • addEntrypointItem

      public ContainerBasicConfig addEntrypointItem(String entrypointItem)
    • getEntrypoint

      @Nullable public List<String> getEntrypoint()
      Entrypoint is the container's entrypoint. If not given and Image is specified, this will be populated by the image's configuration. Optional.
      Returns:
      entrypoint
    • setEntrypoint

      public void setEntrypoint(List<String> entrypoint)
    • env

    • putEnvItem

      public ContainerBasicConfig putEnvItem(String key, String envItem)
    • getEnv

      @Nullable public Map<String,String> getEnv()
      Env is a set of environment variables that will be set in the container. Optional.
      Returns:
      env
    • setEnv

      public void setEnv(Map<String,String> env)
    • envHost

      public ContainerBasicConfig envHost(Boolean envHost)
    • getEnvHost

      @Nullable public Boolean getEnvHost()
      EnvHost indicates that the host environment should be added to container Optional.
      Returns:
      envHost
    • setEnvHost

      public void setEnvHost(Boolean envHost)
    • envmerge

      public ContainerBasicConfig envmerge(List<String> envmerge)
    • addEnvmergeItem

      public ContainerBasicConfig addEnvmergeItem(String envmergeItem)
    • getEnvmerge

      @Nullable public List<String> getEnvmerge()
      EnvMerge takes the specified environment variables from image and preprocess them before injecting them into the container. Optional.
      Returns:
      envmerge
    • setEnvmerge

      public void setEnvmerge(List<String> envmerge)
    • groupEntry

      public ContainerBasicConfig groupEntry(String groupEntry)
    • getGroupEntry

      @Nullable public String getGroupEntry()
      GroupEntry specifies an arbitrary string to append to the container's /etc/group file. Optional.
      Returns:
      groupEntry
    • setGroupEntry

      public void setGroupEntry(String groupEntry)
    • hostname

      public ContainerBasicConfig hostname(String hostname)
    • getHostname

      @Nullable public String getHostname()
      Hostname is the container's hostname. If not set, the hostname will not be modified (if UtsNS is not private) or will be set to the container ID (if UtsNS is private). Conflicts with UtsNS if UtsNS is not set to private. Optional.
      Returns:
      hostname
    • setHostname

      public void setHostname(String hostname)
    • hostusers

      public ContainerBasicConfig hostusers(List<String> hostusers)
    • addHostusersItem

      public ContainerBasicConfig addHostusersItem(String hostusersItem)
    • getHostusers

      @Nullable public List<String> getHostusers()
      HostUsers is a list of host usernames or UIDs to add to the container etc/passwd file
      Returns:
      hostusers
    • setHostusers

      public void setHostusers(List<String> hostusers)
    • httpproxy

      public ContainerBasicConfig httpproxy(Boolean httpproxy)
    • getHttpproxy

      @Nullable public Boolean getHttpproxy()
      EnvHTTPProxy indicates that the http host proxy environment variables should be added to container Optional.
      Returns:
      httpproxy
    • setHttpproxy

      public void setHttpproxy(Boolean httpproxy)
    • initContainerType

      public ContainerBasicConfig initContainerType(String initContainerType)
    • getInitContainerType

      @Nullable public String getInitContainerType()
      InitContainerType describes if this container is an init container and if so, what type: always or once. Optional.
      Returns:
      initContainerType
    • setInitContainerType

      public void setInitContainerType(String initContainerType)
    • labels

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

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

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

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

      public ContainerBasicConfig logConfiguration(LogConfigLibpod logConfiguration)
    • getLogConfiguration

      @Nullable public LogConfigLibpod getLogConfiguration()
      Get logConfiguration
      Returns:
      logConfiguration
    • setLogConfiguration

      public void setLogConfiguration(LogConfigLibpod logConfiguration)
    • managePassword

      public ContainerBasicConfig managePassword(Boolean managePassword)
    • getManagePassword

      @Nullable public Boolean getManagePassword()
      Passwd is a container run option that determines if we are validating users/groups before running the container
      Returns:
      managePassword
    • setManagePassword

      public void setManagePassword(Boolean managePassword)
    • name

      public ContainerBasicConfig name(String name)
    • getName

      @Nullable public String getName()
      Name is the name the container will be given. If no name is provided, one will be randomly generated. Optional.
      Returns:
      name
    • setName

      public void setName(String name)
    • ociRuntime

      public ContainerBasicConfig ociRuntime(String ociRuntime)
    • getOciRuntime

      @Nullable public String getOciRuntime()
      OCIRuntime is the name of the OCI runtime that will be used to create the container. If not specified, the default will be used. Optional.
      Returns:
      ociRuntime
    • setOciRuntime

      public void setOciRuntime(String ociRuntime)
    • passwdEntry

      public ContainerBasicConfig passwdEntry(String passwdEntry)
    • getPasswdEntry

      @Nullable public String getPasswdEntry()
      PasswdEntry specifies an arbitrary string to append to the container's /etc/passwd file. Optional.
      Returns:
      passwdEntry
    • setPasswdEntry

      public void setPasswdEntry(String passwdEntry)
    • personality

      public ContainerBasicConfig personality(LinuxPersonality personality)
    • getPersonality

      @Nullable public LinuxPersonality getPersonality()
      Get personality
      Returns:
      personality
    • setPersonality

      public void setPersonality(LinuxPersonality personality)
    • pidns

      public ContainerBasicConfig pidns(Namespace pidns)
    • getPidns

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

      public void setPidns(Namespace pidns)
    • pod

      public ContainerBasicConfig pod(String pod)
    • getPod

      @Nullable public String getPod()
      Pod is the ID of the pod the container will join. Optional.
      Returns:
      pod
    • setPod

      public void setPod(String pod)
    • remove

      public ContainerBasicConfig remove(Boolean remove)
    • getRemove

      @Nullable public Boolean getRemove()
      Remove indicates if the container should be removed once it has been started and exits. Optional.
      Returns:
      remove
    • setRemove

      public void setRemove(Boolean remove)
    • removeImage

      public ContainerBasicConfig removeImage(Boolean removeImage)
    • getRemoveImage

      @Nullable public Boolean getRemoveImage()
      RemoveImage indicates that the container should remove the image it was created from after it exits. Only allowed if Remove is set to true and Image, not Rootfs, is in use. Optional.
      Returns:
      removeImage
    • setRemoveImage

      public void setRemoveImage(Boolean removeImage)
    • restartPolicy

      public ContainerBasicConfig restartPolicy(String restartPolicy)
    • getRestartPolicy

      @Nullable public String getRestartPolicy()
      RestartPolicy is the container's restart policy - an action which will be taken when the container exits. If not given, the default policy, which does nothing, will be used. Optional.
      Returns:
      restartPolicy
    • setRestartPolicy

      public void setRestartPolicy(String restartPolicy)
    • restartTries

      public ContainerBasicConfig 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)
    • sdnotifyMode

      public ContainerBasicConfig sdnotifyMode(String sdnotifyMode)
    • getSdnotifyMode

      @Nullable public String getSdnotifyMode()
      Determine how to handle the NOTIFY_SOCKET - do we participate or pass it through \"container\" - let the OCI runtime deal with it, advertise conmon's MAINPID \"conmon-only\" - advertise conmon's MAINPID, send READY when started, don't pass to OCI \"ignore\" - unset NOTIFY_SOCKET Optional.
      Returns:
      sdnotifyMode
    • setSdnotifyMode

      public void setSdnotifyMode(String sdnotifyMode)
    • secretEnv

      public ContainerBasicConfig secretEnv(Map<String,String> secretEnv)
    • putSecretEnvItem

      public ContainerBasicConfig putSecretEnvItem(String key, String secretEnvItem)
    • getSecretEnv

      @Nullable public Map<String,String> getSecretEnv()
      EnvSecrets are secrets that will be set as environment variables Optional.
      Returns:
      secretEnv
    • setSecretEnv

      public void setSecretEnv(Map<String,String> secretEnv)
    • stdin

      public ContainerBasicConfig stdin(Boolean stdin)
    • getStdin

      @Nullable public Boolean getStdin()
      Stdin is whether the container will keep its STDIN open. Optional.
      Returns:
      stdin
    • setStdin

      public void setStdin(Boolean stdin)
    • stopSignal

      public ContainerBasicConfig stopSignal(Long stopSignal)
    • getStopSignal

      @Nullable public Long getStopSignal()
      It implements the [os.Signal] interface.
      Returns:
      stopSignal
    • setStopSignal

      public void setStopSignal(Long stopSignal)
    • stopTimeout

      public ContainerBasicConfig stopTimeout(Integer stopTimeout)
    • getStopTimeout

      @Nullable public Integer getStopTimeout()
      StopTimeout is a timeout between the container's stop signal being sent and SIGKILL being sent. If not provided, the default will be used. If 0 is used, stop signal will not be sent, and SIGKILL will be sent instead. Optional.
      Returns:
      stopTimeout
    • setStopTimeout

      public void setStopTimeout(Integer stopTimeout)
    • sysctl

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

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

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

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

      public ContainerBasicConfig systemd(String systemd)
    • getSystemd

      @Nullable public String getSystemd()
      Systemd is whether the container will be started in systemd mode. Valid options are \"true\", \"false\", and \"always\". \"true\" enables this mode only if the binary run in the container is sbin/init or systemd. \"always\" unconditionally enables systemd mode. \"false\" unconditionally disables systemd mode. If enabled, mounts and stop signal will be modified. If set to \"always\" or set to \"true\" and conditionally triggered, conflicts with StopSignal. If not specified, \"false\" will be assumed. Optional.
      Returns:
      systemd
    • setSystemd

      public void setSystemd(String systemd)
    • terminal

      public ContainerBasicConfig terminal(Boolean terminal)
    • getTerminal

      @Nullable public Boolean getTerminal()
      Terminal is whether the container will create a PTY. Optional.
      Returns:
      terminal
    • setTerminal

      public void setTerminal(Boolean terminal)
    • timeout

      public ContainerBasicConfig timeout(Integer timeout)
    • getTimeout

      @Nullable public Integer getTimeout()
      Timeout is a maximum time in seconds the container will run before main process is sent SIGKILL. If 0 is used, signal will not be sent. Container can run indefinitely if they do not stop after the default termination signal. Optional.
      Returns:
      timeout
    • setTimeout

      public void setTimeout(Integer timeout)
    • timezone

      public ContainerBasicConfig timezone(String timezone)
    • getTimezone

      @Nullable public String getTimezone()
      Timezone is the timezone inside the container. Local means it has the same timezone as the host machine Optional.
      Returns:
      timezone
    • setTimezone

      public void setTimezone(String timezone)
    • unsetenv

      public ContainerBasicConfig unsetenv(List<String> unsetenv)
    • addUnsetenvItem

      public ContainerBasicConfig addUnsetenvItem(String unsetenvItem)
    • getUnsetenv

      @Nullable public List<String> getUnsetenv()
      UnsetEnv unsets the specified default environment variables from the image or from built-in or containers.conf Optional.
      Returns:
      unsetenv
    • setUnsetenv

      public void setUnsetenv(List<String> unsetenv)
    • unsetenvall

      public ContainerBasicConfig unsetenvall(Boolean unsetenvall)
    • getUnsetenvall

      @Nullable public Boolean getUnsetenvall()
      UnsetEnvAll unsetall default environment variables from the image or from built-in or containers.conf UnsetEnvAll unsets all default environment variables from the image or from built-in Optional.
      Returns:
      unsetenvall
    • setUnsetenvall

      public void setUnsetenvall(Boolean unsetenvall)
    • utsns

      public ContainerBasicConfig utsns(Namespace utsns)
    • getUtsns

      @Nullable public 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
    • 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 ContainerBasicConfig
    • fromJson

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

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