Class Subject

  • All Implemented Interfaces:
    com.marcnuri.yakc.model.Model

    public class Subject
    extends java.lang.Object
    implements com.marcnuri.yakc.model.Model
    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.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Subject.Builder  
    • Constructor Summary

      Constructors 
      Constructor Description
      Subject()  
      Subject​(java.lang.String apiGroup, @NonNull java.lang.String kind, @NonNull java.lang.String name, java.lang.String namespace)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Subject.Builder builder()  
      protected boolean canEqual​(java.lang.Object other)  
      boolean equals​(java.lang.Object o)  
      java.lang.String getApiGroup()
      APIGroup holds the API group of the referenced subject.
      @NonNull java.lang.String getKind()
      Kind of object being referenced.
      @NonNull java.lang.String getName()
      Name of the object being referenced.
      java.lang.String getNamespace()
      Namespace of the referenced object.
      int hashCode()  
      void setApiGroup​(java.lang.String apiGroup)
      APIGroup holds the API group of the referenced subject.
      void setKind​(@NonNull java.lang.String kind)
      Kind of object being referenced.
      void setName​(@NonNull java.lang.String name)
      Name of the object being referenced.
      void setNamespace​(java.lang.String namespace)
      Namespace of the referenced object.
      Subject.Builder toBuilder()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Subject

        public Subject​(java.lang.String apiGroup,
                       @NonNull
                       @NonNull java.lang.String kind,
                       @NonNull
                       @NonNull java.lang.String name,
                       java.lang.String namespace)
      • Subject

        public Subject()
    • Method Detail

      • getApiGroup

        public java.lang.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.
      • getKind

        @NonNull
        public @NonNull java.lang.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.
      • getName

        @NonNull
        public @NonNull java.lang.String getName()
        Name of the object being referenced.
      • getNamespace

        public java.lang.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.
      • setApiGroup

        public void setApiGroup​(java.lang.String apiGroup)
        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.
      • setKind

        public void setKind​(@NonNull
                            @NonNull java.lang.String kind)
        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.
      • setName

        public void setName​(@NonNull
                            @NonNull java.lang.String name)
        Name of the object being referenced.
      • setNamespace

        public void setNamespace​(java.lang.String namespace)
        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.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object