Package google.registry.util
Record Class EmailMessage.Attachment
java.lang.Object
java.lang.Record
google.registry.util.EmailMessage.Attachment
- Enclosing class:
EmailMessage
public static record EmailMessage.Attachment(com.google.common.net.MediaType contentType, String filename, String content)
extends Record
An attachment to the email, if one exists.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionAttachment
(com.google.common.net.MediaType contentType, String filename, String content) Creates an instance of aAttachment
record class. -
Method Summary
Modifier and TypeMethodDescriptioncontent()
Returns the value of thecontent
record component.com.google.common.net.MediaType
Returns the value of thecontentType
record component.final boolean
Indicates whether some other object is "equal to" this one.filename()
Returns the value of thefilename
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Attachment
Creates an instance of aAttachment
record class.- Parameters:
contentType
- the value for thecontentType
record componentfilename
- the value for thefilename
record componentcontent
- the value for thecontent
record component
-
-
Method Details
-
newBuilder
-
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)
. -
contentType
public com.google.common.net.MediaType contentType()Returns the value of thecontentType
record component.- Returns:
- the value of the
contentType
record component
-
filename
Returns the value of thefilename
record component.- Returns:
- the value of the
filename
record component
-
content
Returns the value of thecontent
record component.- Returns:
- the value of the
content
record component
-