Record Class AuthAccount

java.lang.Object
java.lang.Record
ch.bztf.m226blb1.Auth.AuthAccount

public record AuthAccount(String apiKey, @NotBlank String email, @NotBlank String password) extends Record
Represents an account with the authentication data.
See Also:
API Note:
This record will be used for passing credentials to the server by the client.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AuthAccount(String apiKey, @NotBlank String email, @NotBlank String password)
    Creates an instance of a AuthAccount record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the apiKey record component.
    @NotBlank String
    Returns the value of the email record component.
    boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    @NotBlank String
    Returns the value of the password record component.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • AuthAccount

      public AuthAccount(String apiKey, @NotBlank @NotBlank String email, @NotBlank @NotBlank String password)
      Creates an instance of a AuthAccount record class.
      Parameters:
      apiKey - the value for the apiKey record component
      email - the value for the email record component
      password - the value for the password record component
  • Method Details

    • equals

      public boolean equals(Object obj)
      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:
      obj - the object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • hashCode

      public 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
    • toString

      public 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
    • apiKey

      public String apiKey()
      Returns the value of the apiKey record component.
      Returns:
      the value of the apiKey record component
    • email

      @NotBlank public @NotBlank String email()
      Returns the value of the email record component.
      Returns:
      the value of the email record component
    • password

      @NotBlank public @NotBlank String password()
      Returns the value of the password record component.
      Returns:
      the value of the password record component