Record Class Permission.Grant

java.lang.Object
java.lang.Record
zeroecho.pki.server.Permission.Grant
Record Components:
grantId - stable grant identity
principalId - grantee identity
effect - allow or deny
action - exact action
resourceType - exact resource type
scope - exact non-wildcard realm and optional subscopes
relationship - own or any
dataView - maximum exact view
conditions - closed conditions
expiresAt - optional mandatory upper bound for temporary grants
enabled - whether the grant participates in decisions
Enclosing class:
Permission

public static record Permission.Grant(String grantId, String principalId, Permission.Effect effect, Permission.Action action, Permission.ResourceType resourceType, Permission.Scope scope, Permission.Relationship relationship, Permission.DataView dataView, Set<Permission.Condition> conditions, Optional<Instant> expiresAt, boolean enabled) extends Record
Immutable persisted permission grant.
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • grantId

      public String grantId()
      Returns the value of the grantId record component.
      Returns:
      the value of the grantId record component
    • principalId

      public String principalId()
      Returns the value of the principalId record component.
      Returns:
      the value of the principalId record component
    • effect

      public Permission.Effect effect()
      Returns the value of the effect record component.
      Returns:
      the value of the effect record component
    • action

      public Permission.Action action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • resourceType

      public Permission.ResourceType resourceType()
      Returns the value of the resourceType record component.
      Returns:
      the value of the resourceType record component
    • scope

      public Permission.Scope scope()
      Returns the value of the scope record component.
      Returns:
      the value of the scope record component
    • relationship

      public Permission.Relationship relationship()
      Returns the value of the relationship record component.
      Returns:
      the value of the relationship record component
    • dataView

      public Permission.DataView dataView()
      Returns the value of the dataView record component.
      Returns:
      the value of the dataView record component
    • conditions

      public Set<Permission.Condition> conditions()
      Returns the value of the conditions record component.
      Returns:
      the value of the conditions record component
    • expiresAt

      public Optional<Instant> expiresAt()
      Returns the value of the expiresAt record component.
      Returns:
      the value of the expiresAt record component
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component