Class V1MatchResources
java.lang.Object
io.kubernetes.client.openapi.models.V1MatchResources
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-02-12T21:15:49.397498Z[Etc/UTC]",
comments="Generator version: 7.6.0")
public class V1MatchResources
extends Object
MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExcludeResourceRulesItem
(V1NamedRuleWithOperations excludeResourceRulesItem) addResourceRulesItem
(V1NamedRuleWithOperations resourceRulesItem) boolean
excludeResourceRules
(List<V1NamedRuleWithOperations> excludeResourceRules) static V1MatchResources
Create an instance of V1MatchResources given an JSON stringExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.matchPolicy defines how the \"MatchResources\" list is used to match incoming requests.Get namespaceSelectorGet objectSelectorResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.int
hashCode()
matchPolicy
(String matchPolicy) namespaceSelector
(V1LabelSelector namespaceSelector) objectSelector
(V1LabelSelector objectSelector) resourceRules
(List<V1NamedRuleWithOperations> resourceRules) void
setExcludeResourceRules
(List<V1NamedRuleWithOperations> excludeResourceRules) void
setMatchPolicy
(String matchPolicy) void
setNamespaceSelector
(V1LabelSelector namespaceSelector) void
setObjectSelector
(V1LabelSelector objectSelector) void
setResourceRules
(List<V1NamedRuleWithOperations> resourceRules) toJson()
Convert an instance of V1MatchResources 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_EXCLUDE_RESOURCE_RULES
- See Also:
-
SERIALIZED_NAME_MATCH_POLICY
- See Also:
-
SERIALIZED_NAME_NAMESPACE_SELECTOR
- See Also:
-
SERIALIZED_NAME_OBJECT_SELECTOR
- See Also:
-
SERIALIZED_NAME_RESOURCE_RULES
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1MatchResources
public V1MatchResources()
-
-
Method Details
-
excludeResourceRules
-
addExcludeResourceRulesItem
public V1MatchResources addExcludeResourceRulesItem(V1NamedRuleWithOperations excludeResourceRulesItem) -
getExcludeResourceRules
ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)- Returns:
- excludeResourceRules
-
setExcludeResourceRules
-
matchPolicy
-
getMatchPolicy
matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. Defaults to \"Equivalent\"- Returns:
- matchPolicy
-
setMatchPolicy
-
namespaceSelector
-
getNamespaceSelector
Get namespaceSelector- Returns:
- namespaceSelector
-
setNamespaceSelector
-
objectSelector
-
getObjectSelector
Get objectSelector- Returns:
- objectSelector
-
setObjectSelector
-
resourceRules
-
addResourceRulesItem
-
getResourceRules
ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.- Returns:
- resourceRules
-
setResourceRules
-
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 V1MatchResources
-
fromJson
Create an instance of V1MatchResources given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1MatchResources
- Throws:
IOException
- if the JSON string is invalid with respect to V1MatchResources
-
toJson
Convert an instance of V1MatchResources to an JSON string- Returns:
- JSON string
-