Record Class UtenzeApi.IdentitaAutenticata

java.lang.Object
java.lang.Record
it.unina.picus.utenze.api.UtenzeApi.IdentitaAutenticata
Record Components:
accountId - identificativo dell'account autenticato
ruolo - ruolo verificato
Enclosing interface:
UtenzeApi

public static record UtenzeApi.IdentitaAutenticata(UUID accountId, UtenzeApi.RuoloUtente ruolo) extends Record
Identità di chi esegue un caso d'uso. Il server la ricava dall'autenticazione o dalla sessione verificata. Il client può identificare una risorsa, mentre l'attore è stabilito dal server.
  • Constructor Details

    • IdentitaAutenticata

      public IdentitaAutenticata(UUID accountId, UtenzeApi.RuoloUtente ruolo)
      Creates an instance of a IdentitaAutenticata record class.
      Parameters:
      accountId - the value for the accountId record component
      ruolo - the value for the ruolo 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.
    • accountId

      public UUID accountId()
      Returns the value of the accountId record component.
      Returns:
      the value of the accountId record component
    • ruolo

      public UtenzeApi.RuoloUtente ruolo()
      Returns the value of the ruolo record component.
      Returns:
      the value of the ruolo record component