Package com.whatsapp.api.domain.media
Record Class Media
java.lang.Object
java.lang.Record
com.whatsapp.api.domain.media.Media
public record Media(String sha256, FileType mimeType, String messagingProduct, String id, String url, long fileSize)
extends Record
The type Media.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longfileSize()Returns the value of thefileSizerecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of themessagingProductrecord component.mimeType()Returns the value of themimeTyperecord component.sha256()Returns the value of thesha256record component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
Media
public Media(String sha256, FileType mimeType, String messagingProduct, String id, String url, long fileSize) Creates an instance of aMediarecord class.- Parameters:
sha256- the value for thesha256record componentmimeType- the value for themimeTyperecord componentmessagingProduct- the value for themessagingProductrecord componentid- the value for theidrecord componenturl- the value for theurlrecord componentfileSize- the value for thefileSizerecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
sha256
Returns the value of thesha256record component.- Returns:
- the value of the
sha256record component
-
mimeType
Returns the value of themimeTyperecord component.- Returns:
- the value of the
mimeTyperecord component
-
messagingProduct
Returns the value of themessagingProductrecord component.- Returns:
- the value of the
messagingProductrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
fileSize
public long fileSize()Returns the value of thefileSizerecord component.- Returns:
- the value of the
fileSizerecord component
-