Record Class MailpitClient.Message
java.lang.Object
java.lang.Record
com.irurueta.authserver.testsupport.MailpitClient.Message
- Record Components:
id- identifier Mailpit gave it.subject- subject of the message.text- plain-text body.html- HTML body, empty when the message has none.
- Enclosing class:
MailpitClient
public static record MailpitClient.Message(String id, String subject, String text, String html)
extends Record
A message Mailpit received.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()Reads the numeric code of the message.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.html()Returns the value of thehtmlrecord component.id()Returns the value of theidrecord component.link()Reads the full magic link of the message, as the user would open it.Reads the token of the magic link the message carries.subject()Returns the value of thesubjectrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
Method Details
-
linkToken
Reads the token of the magic link the message carries.- Returns:
- the token of the link.
- Throws:
IllegalStateException- if the message carries no link.
-
link
Reads the full magic link of the message, as the user would open it.- Returns:
- the URL of the link.
- Throws:
IllegalStateException- if the message carries no link.
-
code
Reads the numeric code of the message.- Returns:
- the digits of the code.
- Throws:
IllegalStateException- if the message carries no code.
-
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. -
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. -
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
subject
Returns the value of thesubjectrecord component.- Returns:
- the value of the
subjectrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
html
Returns the value of thehtmlrecord component.- Returns:
- the value of the
htmlrecord component
-