Class V1ValidatingAdmissionPolicyBindingSpec
java.lang.Object
io.kubernetes.client.openapi.models.V1ValidatingAdmissionPolicyBindingSpec
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-04-23T13:45:09.091597Z[Etc/UTC]")
public class V1ValidatingAdmissionPolicyBindingSpec
extends Object
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddValidationActionsItem
(String validationActionsItem) boolean
Create an instance of V1ValidatingAdmissionPolicyBindingSpec given an JSON stringGet matchResourcesGet paramRefPolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced.int
hashCode()
matchResources
(V1MatchResources matchResources) paramRef
(V1ParamRef paramRef) policyName
(String policyName) void
setMatchResources
(V1MatchResources matchResources) void
setParamRef
(V1ParamRef paramRef) void
setPolicyName
(String policyName) void
setValidationActions
(List<String> validationActions) toJson()
Convert an instance of V1ValidatingAdmissionPolicyBindingSpec to an JSON stringtoString()
static void
validateJsonObject
(com.google.gson.JsonObject jsonObj) Validates the JSON Object and throws an exception if issues foundvalidationActions
(List<String> validationActions)
-
Field Details
-
SERIALIZED_NAME_MATCH_RESOURCES
- See Also:
-
SERIALIZED_NAME_PARAM_REF
- See Also:
-
SERIALIZED_NAME_POLICY_NAME
- See Also:
-
SERIALIZED_NAME_VALIDATION_ACTIONS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1ValidatingAdmissionPolicyBindingSpec
public V1ValidatingAdmissionPolicyBindingSpec()
-
-
Method Details
-
matchResources
-
getMatchResources
Get matchResources- Returns:
- matchResources
-
setMatchResources
-
paramRef
-
getParamRef
Get paramRef- Returns:
- paramRef
-
setParamRef
-
policyName
-
getPolicyName
PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.- Returns:
- policyName
-
setPolicyName
-
validationActions
-
addValidationActionsItem
public V1ValidatingAdmissionPolicyBindingSpec addValidationActionsItem(String validationActionsItem) -
getValidationActions
validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. The supported actions values are: \"Deny\" specifies that a validation failure results in a denied request. \"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. \"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"` Clients should expect to handle additional values by ignoring any values not recognized. \"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. Required.- Returns:
- validationActions
-
setValidationActions
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonObject
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 V1ValidatingAdmissionPolicyBindingSpec
-
fromJson
Create an instance of V1ValidatingAdmissionPolicyBindingSpec given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1ValidatingAdmissionPolicyBindingSpec
- Throws:
IOException
- if the JSON string is invalid with respect to V1ValidatingAdmissionPolicyBindingSpec
-
toJson
Convert an instance of V1ValidatingAdmissionPolicyBindingSpec to an JSON string- Returns:
- JSON string
-