Class V1PolicyRulesWithSubjects
java.lang.Object
io.kubernetes.client.openapi.models.V1PolicyRulesWithSubjects
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-02-04T19:05:53.712211Z[Etc/UTC]",
comments="Generator version: 7.6.0")
public class V1PolicyRulesWithSubjects
extends Object
PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNonResourceRulesItem(V1NonResourcePolicyRule nonResourceRulesItem) addResourceRulesItem(V1ResourcePolicyRule resourceRulesItem) addSubjectsItem(FlowcontrolV1Subject subjectsItem) booleanstatic V1PolicyRulesWithSubjectsCreate an instance of V1PolicyRulesWithSubjects given an JSON string`nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.`resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource.subjects is the list of normal user, serviceaccount, or group that this rule cares about.inthashCode()nonResourceRules(List<V1NonResourcePolicyRule> nonResourceRules) resourceRules(List<V1ResourcePolicyRule> resourceRules) voidsetNonResourceRules(List<V1NonResourcePolicyRule> nonResourceRules) voidsetResourceRules(List<V1ResourcePolicyRule> resourceRules) voidsetSubjects(List<FlowcontrolV1Subject> subjects) subjects(List<FlowcontrolV1Subject> subjects) toJson()Convert an instance of V1PolicyRulesWithSubjects 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_NON_RESOURCE_RULES
- See Also:
-
SERIALIZED_NAME_RESOURCE_RULES
- See Also:
-
SERIALIZED_NAME_SUBJECTS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1PolicyRulesWithSubjects
public V1PolicyRulesWithSubjects()
-
-
Method Details
-
nonResourceRules
-
addNonResourceRulesItem
public V1PolicyRulesWithSubjects addNonResourceRulesItem(V1NonResourcePolicyRule nonResourceRulesItem) -
getNonResourceRules
`nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.- Returns:
- nonResourceRules
-
setNonResourceRules
-
resourceRules
-
addResourceRulesItem
-
getResourceRules
`resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.- Returns:
- resourceRules
-
setResourceRules
-
subjects
-
addSubjectsItem
-
getSubjects
subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.- Returns:
- subjects
-
setSubjects
-
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 V1PolicyRulesWithSubjects
-
fromJson
Create an instance of V1PolicyRulesWithSubjects given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of V1PolicyRulesWithSubjects
- Throws:
IOException- if the JSON string is invalid with respect to V1PolicyRulesWithSubjects
-
toJson
Convert an instance of V1PolicyRulesWithSubjects to an JSON string- Returns:
- JSON string
-