Class V1beta2PolicyRulesWithSubjects
java.lang.Object
io.kubernetes.client.openapi.models.V1beta2PolicyRulesWithSubjects
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-02-02T17:56:12.287571Z[Etc/UTC]")
public class V1beta2PolicyRulesWithSubjects
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 ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNonResourceRulesItem
(V1beta2NonResourcePolicyRule nonResourceRulesItem) addResourceRulesItem
(V1beta2ResourcePolicyRule resourceRulesItem) addSubjectsItem
(V1beta2Subject subjectsItem) boolean
Create an instance of V1beta2PolicyRulesWithSubjects 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.int
hashCode()
nonResourceRules
(List<V1beta2NonResourcePolicyRule> nonResourceRules) resourceRules
(List<V1beta2ResourcePolicyRule> resourceRules) void
setNonResourceRules
(List<V1beta2NonResourcePolicyRule> nonResourceRules) void
setResourceRules
(List<V1beta2ResourcePolicyRule> resourceRules) void
setSubjects
(List<V1beta2Subject> subjects) subjects
(List<V1beta2Subject> subjects) toJson()
Convert an instance of V1beta2PolicyRulesWithSubjects to an JSON stringtoString()
static void
validateJsonObject
(com.google.gson.JsonObject jsonObj) Validates the JSON Object 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
-
V1beta2PolicyRulesWithSubjects
public V1beta2PolicyRulesWithSubjects()
-
-
Method Details
-
nonResourceRules
public V1beta2PolicyRulesWithSubjects nonResourceRules(List<V1beta2NonResourcePolicyRule> nonResourceRules) -
addNonResourceRulesItem
public V1beta2PolicyRulesWithSubjects addNonResourceRulesItem(V1beta2NonResourcePolicyRule 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
public V1beta2PolicyRulesWithSubjects addResourceRulesItem(V1beta2ResourcePolicyRule resourceRulesItem) -
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
-
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 V1beta2PolicyRulesWithSubjects
-
fromJson
Create an instance of V1beta2PolicyRulesWithSubjects given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1beta2PolicyRulesWithSubjects
- Throws:
IOException
- if the JSON string is invalid with respect to V1beta2PolicyRulesWithSubjects
-
toJson
Convert an instance of V1beta2PolicyRulesWithSubjects to an JSON string- Returns:
- JSON string
-