Class V1PodFailurePolicyOnExitCodesRequirement
java.lang.Object
io.kubernetes.client.openapi.models.V1PodFailurePolicyOnExitCodesRequirement
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-10-04T19:37:38.574271Z[Etc/UTC]",
comments="Generator version: 7.6.0")
public class V1PodFailurePolicyOnExitCodesRequirement
extends Object
PodFailurePolicyOnExitCodesRequirement describes the requirement for handling a failed pod based on its container exit codes. In particular, it lookups the .state.terminated.exitCode for each app container and init container status, represented by the .status.containerStatuses and .status.initContainerStatuses fields in the Pod status, respectively. Containers completed with success (exit code 0) are excluded from the requirement check.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddValuesItem
(Integer valuesItem) containerName
(String containerName) boolean
Create an instance of V1PodFailurePolicyOnExitCodesRequirement given an JSON stringRestricts the check for exit codes to the container with the specified name.Represents the relationship between the container exit code(s) and the specified values.Specifies the set of values.int
hashCode()
void
setContainerName
(String containerName) void
setOperator
(String operator) void
toJson()
Convert an instance of V1PodFailurePolicyOnExitCodesRequirement to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_CONTAINER_NAME
- See Also:
-
SERIALIZED_NAME_OPERATOR
- See Also:
-
SERIALIZED_NAME_VALUES
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1PodFailurePolicyOnExitCodesRequirement
public V1PodFailurePolicyOnExitCodesRequirement()
-
-
Method Details
-
containerName
-
getContainerName
Restricts the check for exit codes to the container with the specified name. When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in the pod template.- Returns:
- containerName
-
setContainerName
-
operator
-
getOperator
Represents the relationship between the container exit code(s) and the specified values. Containers completed with success (exit code 0) are excluded from the requirement check. Possible values are: - In: the requirement is satisfied if at least one container exit code (might be multiple if there are multiple containers not restricted by the 'containerName' field) is in the set of specified values. - NotIn: the requirement is satisfied if at least one container exit code (might be multiple if there are multiple containers not restricted by the 'containerName' field) is not in the set of specified values. Additional values are considered to be added in the future. Clients should react to an unknown operator by assuming the requirement is not satisfied.- Returns:
- operator
-
setOperator
-
values
-
addValuesItem
-
getValues
Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. The list of values must be ordered and must not contain duplicates. Value '0' cannot be used for the In operator. At least one element is required. At most 255 elements are allowed.- Returns:
- values
-
setValues
-
equals
-
hashCode
public int hashCode() -
toString
-
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 V1PodFailurePolicyOnExitCodesRequirement
-
fromJson
public static V1PodFailurePolicyOnExitCodesRequirement fromJson(String jsonString) throws IOException Create an instance of V1PodFailurePolicyOnExitCodesRequirement given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1PodFailurePolicyOnExitCodesRequirement
- Throws:
IOException
- if the JSON string is invalid with respect to V1PodFailurePolicyOnExitCodesRequirement
-
toJson
Convert an instance of V1PodFailurePolicyOnExitCodesRequirement to an JSON string- Returns:
- JSON string
-