Record Class VmDefinition.Grant

java.lang.Object
java.lang.Record
org.jdrupes.vmoperator.common.VmDefinition.Grant
Record Components:
user - the user
role - the role
may - the may
Enclosing class:
VmDefinition

public static record VmDefinition.Grant(String user, String role, Set<VmDefinition.Permission> may) extends Record
Permissions granted to a user or role.
  • Constructor Details

    • Grant

      public Grant(String user, String role, Set<VmDefinition.Permission> may)
      Creates an instance of a Grant record class.
      Parameters:
      user - the value for the user record component
      role - the value for the role record component
      may - the value for the may record component
  • Method Details

    • toString

      public String toString()
      To string.
      Specified by:
      toString in class Record
      Returns:
      the string
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • user

      public String user()
      Returns the value of the user record component.
      Returns:
      the value of the user record component
    • role

      public String role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component
    • may

      Returns the value of the may record component.
      Returns:
      the value of the may record component