Package com.whatsapp.api.domain.webhook
Record Class Referral
java.lang.Object
java.lang.Record
com.whatsapp.api.domain.webhook.Referral
- Record Components:
videoUrl- Added if media_type is “video”. Contains a URL to the video.mediaType- Media present in the ad or post the user clicked. Supported values are "image" or "video".imageUrl- Added if media_type is “image”. Contains a URL to the raw image.sourceType- Specifies the type of the ad's source. Supported values are "ad" or "post".sourceId- Specifies the Meta ID for an ad or post.body- The description, or body, from the ad or post that generated the message.thumbnailUrl- Added if media_type is “video”. Contains a URL to the thumbnail image of the clicked video.headline- Specifies the headline used in the ad or post that generated the message.sourceUrl- Specifies the URL that leads to the ad or post clicked by the user. Opening this URL takes you to the ad viewed by your user.
public record Referral(String videoUrl, String mediaType, String imageUrl, String sourceType, String sourceId, String body, String thumbnailUrl, String headline, String sourceUrl)
extends Record
The type Referral.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headline()Returns the value of theheadlinerecord component.imageUrl()Returns the value of theimageUrlrecord component.Returns the value of themediaTyperecord component.sourceId()Returns the value of thesourceIdrecord component.Returns the value of thesourceTyperecord component.Returns the value of thesourceUrlrecord component.Returns the value of thethumbnailUrlrecord component.final StringtoString()Returns a string representation of this record class.videoUrl()Returns the value of thevideoUrlrecord component.
-
Constructor Details
-
Referral
public Referral(String videoUrl, String mediaType, String imageUrl, String sourceType, String sourceId, String body, String thumbnailUrl, String headline, String sourceUrl) Creates an instance of aReferralrecord class.- Parameters:
videoUrl- the value for thevideoUrlrecord componentmediaType- the value for themediaTyperecord componentimageUrl- the value for theimageUrlrecord componentsourceType- the value for thesourceTyperecord componentsourceId- the value for thesourceIdrecord componentbody- the value for thebodyrecord componentthumbnailUrl- the value for thethumbnailUrlrecord componentheadline- the value for theheadlinerecord componentsourceUrl- the value for thesourceUrlrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
videoUrl
Returns the value of thevideoUrlrecord component.- Returns:
- the value of the
videoUrlrecord component
-
mediaType
Returns the value of themediaTyperecord component.- Returns:
- the value of the
mediaTyperecord component
-
imageUrl
Returns the value of theimageUrlrecord component.- Returns:
- the value of the
imageUrlrecord component
-
sourceType
Returns the value of thesourceTyperecord component.- Returns:
- the value of the
sourceTyperecord component
-
sourceId
Returns the value of thesourceIdrecord component.- Returns:
- the value of the
sourceIdrecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
thumbnailUrl
Returns the value of thethumbnailUrlrecord component.- Returns:
- the value of the
thumbnailUrlrecord component
-
headline
Returns the value of theheadlinerecord component.- Returns:
- the value of the
headlinerecord component
-
sourceUrl
Returns the value of thesourceUrlrecord component.- Returns:
- the value of the
sourceUrlrecord component
-