Package ch.bztf.m226blb1.Auth
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
ConstructorDescriptionAuthAccount
(String apiKey, @NotBlank String email, @NotBlank String password) Creates an instance of aAuthAccount
record class. -
Method Summary
Modifier and TypeMethodDescriptionapiKey()
Returns the value of theapiKey
record component.@NotBlank String
email()
Returns the value of theemail
record component.boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.@NotBlank String
password()
Returns the value of thepassword
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
AuthAccount
public AuthAccount(String apiKey, @NotBlank @NotBlank String email, @NotBlank @NotBlank String password) Creates an instance of aAuthAccount
record class.- Parameters:
apiKey
- the value for theapiKey
record componentemail
- the value for theemail
record componentpassword
- the value for thepassword
record component
-
-
Method Details
-
equals
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 withObjects::equals(Object,Object)
. -
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. -
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. -
apiKey
Returns the value of theapiKey
record component.- Returns:
- the value of the
apiKey
record component
-
email
Returns the value of theemail
record component.- Returns:
- the value of the
email
record component
-
password
Returns the value of thepassword
record component.- Returns:
- the value of the
password
record component
-