Class V1PolicyRule

java.lang.Object
io.kubernetes.client.openapi.models.V1PolicyRule

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-02-02T17:56:12.287571Z[Etc/UTC]") public class V1PolicyRule extends Object
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.
  • Field Details

  • Constructor Details

    • V1PolicyRule

      public V1PolicyRule()
  • Method Details

    • apiGroups

      public V1PolicyRule apiGroups(List<String> apiGroups)
    • addApiGroupsItem

      public V1PolicyRule addApiGroupsItem(String apiGroupsItem)
    • getApiGroups

      @Nullable public List<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. \"\" represents the core API group and \"*\" represents all API groups.
      Returns:
      apiGroups
    • setApiGroups

      public void setApiGroups(List<String> apiGroups)
    • nonResourceURLs

      public V1PolicyRule nonResourceURLs(List<String> nonResourceURLs)
    • addNonResourceURLsItem

      public V1PolicyRule addNonResourceURLsItem(String nonResourceURLsItem)
    • getNonResourceURLs

      @Nullable public List<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.
      Returns:
      nonResourceURLs
    • setNonResourceURLs

      public void setNonResourceURLs(List<String> nonResourceURLs)
    • resourceNames

      public V1PolicyRule resourceNames(List<String> resourceNames)
    • addResourceNamesItem

      public V1PolicyRule addResourceNamesItem(String resourceNamesItem)
    • getResourceNames

      @Nullable public List<String> getResourceNames()
      ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
      Returns:
      resourceNames
    • setResourceNames

      public void setResourceNames(List<String> resourceNames)
    • resources

      public V1PolicyRule resources(List<String> resources)
    • addResourcesItem

      public V1PolicyRule addResourcesItem(String resourcesItem)
    • getResources

      @Nullable public List<String> getResources()
      Resources is a list of resources this rule applies to. '*' represents all resources.
      Returns:
      resources
    • setResources

      public void setResources(List<String> resources)
    • verbs

      public V1PolicyRule verbs(List<String> verbs)
    • addVerbsItem

      public V1PolicyRule addVerbsItem(String verbsItem)
    • getVerbs

      @Nonnull public List<String> getVerbs()
      Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.
      Returns:
      verbs
    • setVerbs

      public void setVerbs(List<String> verbs)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      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 V1PolicyRule
    • fromJson

      public static V1PolicyRule fromJson(String jsonString) throws IOException
      Create an instance of V1PolicyRule given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of V1PolicyRule
      Throws:
      IOException - if the JSON string is invalid with respect to V1PolicyRule
    • toJson

      public String toJson()
      Convert an instance of V1PolicyRule to an JSON string
      Returns:
      JSON string