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
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.long
fileSize()
Returns the value of thefileSize
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of themessagingProduct
record component.mimeType()
Returns the value of themimeType
record component.sha256()
Returns the value of thesha256
record component.final String
toString()
Returns a string representation of this record class.url()
Returns the value of theurl
record component.
-
Constructor Details
-
Media
public Media(String sha256, FileType mimeType, String messagingProduct, String id, String url, long fileSize) Creates an instance of aMedia
record class.- Parameters:
sha256
- the value for thesha256
record componentmimeType
- the value for themimeType
record componentmessagingProduct
- the value for themessagingProduct
record componentid
- the value for theid
record componenturl
- the value for theurl
record componentfileSize
- the value for thefileSize
record 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 thesha256
record component.- Returns:
- the value of the
sha256
record component
-
mimeType
Returns the value of themimeType
record component.- Returns:
- the value of the
mimeType
record component
-
messagingProduct
Returns the value of themessagingProduct
record component.- Returns:
- the value of the
messagingProduct
record component
-
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
url
Returns the value of theurl
record component.- Returns:
- the value of the
url
record component
-
fileSize
public long fileSize()Returns the value of thefileSize
record component.- Returns:
- the value of the
fileSize
record component
-