Class RbacV1Subject

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-04-23T13:45:09.091597Z[Etc/UTC]") public class RbacV1Subject extends Object
Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.
  • Field Details

  • Constructor Details

    • RbacV1Subject

      public RbacV1Subject()
  • Method Details

    • apiGroup

      public RbacV1Subject apiGroup(String apiGroup)
    • getApiGroup

      @Nullable public String getApiGroup()
      APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.
      Returns:
      apiGroup
    • setApiGroup

      public void setApiGroup(String apiGroup)
    • kind

      public RbacV1Subject kind(String kind)
    • getKind

      @Nonnull public String getKind()
      Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
      Returns:
      kind
    • setKind

      public void setKind(String kind)
    • name

      public RbacV1Subject name(String name)
    • getName

      @Nonnull public String getName()
      Name of the object being referenced.
      Returns:
      name
    • setName

      public void setName(String name)
    • namespace

      public RbacV1Subject namespace(String namespace)
    • getNamespace

      @Nullable public String getNamespace()
      Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.
      Returns:
      namespace
    • setNamespace

      public void setNamespace(String namespace)
    • 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 RbacV1Subject
    • fromJson

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

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