Record Class TokenDto

java.lang.Object
java.lang.Record
hu.rts.mike.example.dev.crm.model.TokenDto

public record TokenDto(String token, Instant tokenExpiration, Set<Privilege> privileges, String refresh, Instant refreshExpiration) extends Record
  • Field Details

    • token

      private final String token
      The field for the token record component.
    • tokenExpiration

      private final Instant tokenExpiration
      The field for the tokenExpiration record component.
    • privileges

      private final Set<Privilege> privileges
      The field for the privileges record component.
    • refresh

      private final String refresh
      The field for the refresh record component.
    • refreshExpiration

      private final Instant refreshExpiration
      The field for the refreshExpiration record component.
  • Constructor Details

    • TokenDto

      public TokenDto(String token, Instant tokenExpiration, Set<Privilege> privileges, String refresh, Instant refreshExpiration)
      Creates an instance of a TokenDto record class.
      Parameters:
      token - the value for the token record component
      tokenExpiration - the value for the tokenExpiration record component
      privileges - the value for the privileges record component
      refresh - the value for the refresh record component
      refreshExpiration - the value for the refreshExpiration record component
  • 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. 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.
    • token

      public String token()
      Returns the value of the token record component.
      Returns:
      the value of the token record component
    • tokenExpiration

      public Instant tokenExpiration()
      Returns the value of the tokenExpiration record component.
      Returns:
      the value of the tokenExpiration record component
    • privileges

      public Set<Privilege> privileges()
      Returns the value of the privileges record component.
      Returns:
      the value of the privileges record component
    • refresh

      public String refresh()
      Returns the value of the refresh record component.
      Returns:
      the value of the refresh record component
    • refreshExpiration

      public Instant refreshExpiration()
      Returns the value of the refreshExpiration record component.
      Returns:
      the value of the refreshExpiration record component