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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddInfraCommandItem(String infraCommandItem) addPodCreateCommandItem(String podCreateCommandItem) addPodDevicesItem(String podDevicesItem) addSharedNamespacesItem(String sharedNamespacesItem) booleanexitPolicy(String exitPolicy) static PodBasicConfigCreate an instance of PodBasicConfig given an JSON stringExitPolicy determines the pod's exit and stop behaviour.Hostname is the pod's hostname.InfraCommand sets the command that will be used to start the infra container.InfraConmonPidFile is a custom path to store the infra container's conmon PID.InfraImage is the image that will be used for the infra container.InfraName is the name that will be used for the infra container.@Valid NamespacegetIpcns()Get ipcnsLabels are key-value pairs that are used to add metadata to pods.getName()Name is the name of the pod.NoInfra tells the pod not to create an infra container.@Valid NamespacegetPidns()Get pidnsGet podCreateCommandDevices contains user specified Devices to be added to the PodRestartPolicy is the pod's restart policy - an action which will be taken when one or all the containers in the pod exits.RestartRetries is the number of attempts that will be made to restart the container.SharedNamespaces instructs the pod to share a set of namespaces.PodCreateCommand is the command used to create this pod.Sysctl sets kernel parameters for the pod@Valid NamespaceGet userns@Valid NamespacegetUtsns()Get utsnsinthashCode()infraCommand(List<String> infraCommand) infraConmonPidFile(String infraConmonPidFile) infraImage(String infraImage) podCreateCommand(List<String> podCreateCommand) podDevices(List<String> podDevices) putLabelsItem(String key, String labelsItem) putSysctlItem(String key, String sysctlItem) restartPolicy(String restartPolicy) restartTries(Integer restartTries) voidsetExitPolicy(String exitPolicy) voidsetHostname(String hostname) voidsetInfraCommand(List<String> infraCommand) voidsetInfraConmonPidFile(String infraConmonPidFile) voidsetInfraImage(String infraImage) voidsetInfraName(String infraName) voidvoidvoidvoidsetNoInfra(Boolean noInfra) voidvoidsetPodCreateCommand(List<String> podCreateCommand) voidsetPodDevices(List<String> podDevices) voidsetRestartPolicy(String restartPolicy) voidsetRestartTries(Integer restartTries) voidsetSharedNamespaces(List<String> sharedNamespaces) voidsetShareParent(Boolean shareParent) voidvoidvoidsharedNamespaces(List<String> sharedNamespaces) shareParent(Boolean shareParent) toJson()Convert an instance of PodBasicConfig to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_EXIT_POLICY
- See Also:
-
SERIALIZED_NAME_HOSTNAME
- See Also:
-
SERIALIZED_NAME_INFRA_COMMAND
- See Also:
-
SERIALIZED_NAME_INFRA_CONMON_PID_FILE
- See Also:
-
SERIALIZED_NAME_INFRA_IMAGE
- See Also:
-
SERIALIZED_NAME_INFRA_NAME
- See Also:
-
SERIALIZED_NAME_IPCNS
- See Also:
-
SERIALIZED_NAME_LABELS
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_NO_INFRA
- See Also:
-
SERIALIZED_NAME_PIDNS
- See Also:
-
SERIALIZED_NAME_POD_CREATE_COMMAND
- See Also:
-
SERIALIZED_NAME_POD_DEVICES
- See Also:
-
SERIALIZED_NAME_RESTART_POLICY
- See Also:
-
SERIALIZED_NAME_RESTART_TRIES
- See Also:
-
SERIALIZED_NAME_SHARE_PARENT
- See Also:
-
SERIALIZED_NAME_SHARED_NAMESPACES
- See Also:
-
SERIALIZED_NAME_SYSCTL
- See Also:
-
SERIALIZED_NAME_USERNS
- See Also:
-
SERIALIZED_NAME_UTSNS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
PodBasicConfig
public PodBasicConfig()
-
-
Method Details
-
validateJsonElement
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
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
-
getExitPolicy
ExitPolicy determines the pod's exit and stop behaviour.- Returns:
- exitPolicy
-
setExitPolicy
-
hostname
-
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
-
infraCommand
-
addInfraCommandItem
-
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
-
infraConmonPidFile
-
getInfraConmonPidFile
InfraConmonPidFile is a custom path to store the infra container's conmon PID.- Returns:
- infraConmonPidFile
-
setInfraConmonPidFile
-
infraImage
-
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
-
infraName
-
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
-
ipcns
-
getIpcns
Get ipcns- Returns:
- ipcns
-
setIpcns
-
labels
-
putLabelsItem
-
getLabels
Labels are key-value pairs that are used to add metadata to pods. Optional.- Returns:
- labels
-
setLabels
-
name
-
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
-
noInfra
-
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
-
pidns
-
getPidns
Get pidns- Returns:
- pidns
-
setPidns
-
podCreateCommand
-
addPodCreateCommandItem
-
getPodCreateCommand
Get podCreateCommand- Returns:
- podCreateCommand
-
setPodCreateCommand
-
podDevices
-
addPodDevicesItem
-
getPodDevices
Devices contains user specified Devices to be added to the Pod- Returns:
- podDevices
-
setPodDevices
-
restartPolicy
-
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
-
restartTries
-
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
-
sysctl
-
putSysctlItem
-
getSysctl
Sysctl sets kernel parameters for the pod- Returns:
- sysctl
-
setSysctl
-
userns
-
getUserns
Get userns- Returns:
- userns
-
setUserns
-
utsns
-
getUtsns
Get utsns- Returns:
- utsns
-
setUtsns
-
equals
-
hashCode
public int hashCode() -
toString
-
toJson
Convert an instance of PodBasicConfig to an JSON string- Returns:
- JSON string
-