Class PolicyRule
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.rbac.v1beta1.PolicyRule
-
- All Implemented Interfaces:
com.marcnuri.yakc.model.Model
public class PolicyRule extends java.lang.Object implements com.marcnuri.yakc.model.Model
PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PolicyRule.Builder
-
Constructor Summary
Constructors Constructor Description PolicyRule()
PolicyRule(java.util.List<java.lang.String> apiGroups, java.util.List<java.lang.String> nonResourceURLs, java.util.List<java.lang.String> resourceNames, java.util.List<java.lang.String> resources, @NonNull java.util.List<java.lang.String> verbs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PolicyRule.Builder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.util.List<java.lang.String>
getApiGroups()
APIGroups is the name of the APIGroup that contains the resources.java.util.List<java.lang.String>
getNonResourceURLs()
NonResourceURLs is a set of partial urls that a user should have access to.java.util.List<java.lang.String>
getResourceNames()
ResourceNames is an optional white list of names that the rule applies to.java.util.List<java.lang.String>
getResources()
Resources is a list of resources this rule applies to.@NonNull java.util.List<java.lang.String>
getVerbs()
Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule.int
hashCode()
void
setApiGroups(java.util.List<java.lang.String> apiGroups)
APIGroups is the name of the APIGroup that contains the resources.void
setNonResourceURLs(java.util.List<java.lang.String> nonResourceURLs)
NonResourceURLs is a set of partial urls that a user should have access to.void
setResourceNames(java.util.List<java.lang.String> resourceNames)
ResourceNames is an optional white list of names that the rule applies to.void
setResources(java.util.List<java.lang.String> resources)
Resources is a list of resources this rule applies to.void
setVerbs(@NonNull java.util.List<java.lang.String> verbs)
Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule.PolicyRule.Builder
toBuilder()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PolicyRule
public PolicyRule(java.util.List<java.lang.String> apiGroups, java.util.List<java.lang.String> nonResourceURLs, java.util.List<java.lang.String> resourceNames, java.util.List<java.lang.String> resources, @NonNull @NonNull java.util.List<java.lang.String> verbs)
-
PolicyRule
public PolicyRule()
-
-
Method Detail
-
builder
public static PolicyRule.Builder builder()
-
toBuilder
public PolicyRule.Builder toBuilder()
-
getApiGroups
public java.util.List<java.lang.String> getApiGroups()
APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.
-
getNonResourceURLs
public java.util.List<java.lang.String> getNonResourceURLs()
NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
-
getResourceNames
public java.util.List<java.lang.String> getResourceNames()
ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
-
getResources
public java.util.List<java.lang.String> getResources()
Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.
-
getVerbs
@NonNull public @NonNull java.util.List<java.lang.String> getVerbs()
Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
-
setApiGroups
public void setApiGroups(java.util.List<java.lang.String> apiGroups)
APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.
-
setNonResourceURLs
public void setNonResourceURLs(java.util.List<java.lang.String> nonResourceURLs)
NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
-
setResourceNames
public void setResourceNames(java.util.List<java.lang.String> resourceNames)
ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
-
setResources
public void setResources(java.util.List<java.lang.String> resources)
Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.
-
setVerbs
public void setVerbs(@NonNull @NonNull java.util.List<java.lang.String> verbs)
Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-