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 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 a Referral record class.
      Parameters:
      videoUrl - the value for the videoUrl record component
      mediaType - the value for the mediaType record component
      imageUrl - the value for the imageUrl record component
      sourceType - the value for the sourceType record component
      sourceId - the value for the sourceId record component
      body - the value for the body record component
      thumbnailUrl - the value for the thumbnailUrl record component
      headline - the value for the headline record component
      sourceUrl - the value for the sourceUrl record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • videoUrl

      public String videoUrl()
      Returns the value of the videoUrl record component.
      Returns:
      the value of the videoUrl record component
    • mediaType

      public String mediaType()
      Returns the value of the mediaType record component.
      Returns:
      the value of the mediaType record component
    • imageUrl

      public String imageUrl()
      Returns the value of the imageUrl record component.
      Returns:
      the value of the imageUrl record component
    • sourceType

      public String sourceType()
      Returns the value of the sourceType record component.
      Returns:
      the value of the sourceType record component
    • sourceId

      public String sourceId()
      Returns the value of the sourceId record component.
      Returns:
      the value of the sourceId record component
    • body

      public String body()
      Returns the value of the body record component.
      Returns:
      the value of the body record component
    • thumbnailUrl

      public String thumbnailUrl()
      Returns the value of the thumbnailUrl record component.
      Returns:
      the value of the thumbnailUrl record component
    • headline

      public String headline()
      Returns the value of the headline record component.
      Returns:
      the value of the headline record component
    • sourceUrl

      public String sourceUrl()
      Returns the value of the sourceUrl record component.
      Returns:
      the value of the sourceUrl record component