Record Class Value

java.lang.Object
java.lang.Record
com.whatsapp.api.domain.webhook.Value
Record Components:
metadata - The metadata about your phone number.
messagingProduct - The messaging service used for Webhooks. For WhatsApp messages, this value needs to be set to “whatsapp”.
messages - An array of message objects. Added to Webhooks for incoming message notifications.
contacts - An array of contacts
statuses - An array of message status objects. Added to Webhooks for message status update.
decision - Used if a decision about accounts or phone numbers has been made. (APPROVED or REJECTED)
displayPhoneNumber - Includes the display phone number of the business account that triggered the notification.
event - Used when an event happened in a specific WABA. See EventType
messageTemplateId - The message template ID
messageTemplateLanguage - The message template language
messageTemplateName - The message template name
phoneNumber - the phone number
reason - reason
rejectionReason - If a request was rejected, this field displays the reason for that rejection.
requestedVerifiedName - This field displays the name that was sent to be verified.

public record Value(Metadata metadata, String messagingProduct, List<Message> messages, List<Contact> contacts, List<Status> statuses, EventType event, String phoneNumber, String messageTemplateId, String messageTemplateName, String messageTemplateLanguage, String reason, String displayPhoneNumber, String decision, String requestedVerifiedName, Object rejectionReason, DisableInfo disableInfo, String currentLimit, BanInfo banInfo, List<RestrictionInfo> restrictionInfo) extends Record
The type Value.
  • Constructor Details

    • Value

      public Value(Metadata metadata, String messagingProduct, List<Message> messages, List<Contact> contacts, List<Status> statuses, EventType event, String phoneNumber, String messageTemplateId, String messageTemplateName, String messageTemplateLanguage, String reason, String displayPhoneNumber, String decision, String requestedVerifiedName, Object rejectionReason, DisableInfo disableInfo, String currentLimit, BanInfo banInfo, List<RestrictionInfo> restrictionInfo)
      Creates an instance of a Value record class.
      Parameters:
      metadata - the value for the metadata record component
      messagingProduct - the value for the messagingProduct record component
      messages - the value for the messages record component
      contacts - the value for the contacts record component
      statuses - the value for the statuses record component
      event - the value for the event record component
      phoneNumber - the value for the phoneNumber record component
      messageTemplateId - the value for the messageTemplateId record component
      messageTemplateName - the value for the messageTemplateName record component
      messageTemplateLanguage - the value for the messageTemplateLanguage record component
      reason - the value for the reason record component
      displayPhoneNumber - the value for the displayPhoneNumber record component
      decision - the value for the decision record component
      requestedVerifiedName - the value for the requestedVerifiedName record component
      rejectionReason - the value for the rejectionReason record component
      disableInfo - the value for the disableInfo record component
      currentLimit - the value for the currentLimit record component
      banInfo - the value for the banInfo record component
      restrictionInfo - the value for the restrictionInfo 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.
    • metadata

      public Metadata metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component
    • messagingProduct

      public String messagingProduct()
      Returns the value of the messagingProduct record component.
      Returns:
      the value of the messagingProduct record component
    • messages

      public List<Message> messages()
      Returns the value of the messages record component.
      Returns:
      the value of the messages record component
    • contacts

      public List<Contact> contacts()
      Returns the value of the contacts record component.
      Returns:
      the value of the contacts record component
    • statuses

      public List<Status> statuses()
      Returns the value of the statuses record component.
      Returns:
      the value of the statuses record component
    • event

      public EventType event()
      Returns the value of the event record component.
      Returns:
      the value of the event record component
    • phoneNumber

      public String phoneNumber()
      Returns the value of the phoneNumber record component.
      Returns:
      the value of the phoneNumber record component
    • messageTemplateId

      public String messageTemplateId()
      Returns the value of the messageTemplateId record component.
      Returns:
      the value of the messageTemplateId record component
    • messageTemplateName

      public String messageTemplateName()
      Returns the value of the messageTemplateName record component.
      Returns:
      the value of the messageTemplateName record component
    • messageTemplateLanguage

      public String messageTemplateLanguage()
      Returns the value of the messageTemplateLanguage record component.
      Returns:
      the value of the messageTemplateLanguage record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • displayPhoneNumber

      public String displayPhoneNumber()
      Returns the value of the displayPhoneNumber record component.
      Returns:
      the value of the displayPhoneNumber record component
    • decision

      public String decision()
      Returns the value of the decision record component.
      Returns:
      the value of the decision record component
    • requestedVerifiedName

      public String requestedVerifiedName()
      Returns the value of the requestedVerifiedName record component.
      Returns:
      the value of the requestedVerifiedName record component
    • rejectionReason

      public Object rejectionReason()
      Returns the value of the rejectionReason record component.
      Returns:
      the value of the rejectionReason record component
    • disableInfo

      public DisableInfo disableInfo()
      Returns the value of the disableInfo record component.
      Returns:
      the value of the disableInfo record component
    • currentLimit

      public String currentLimit()
      Returns the value of the currentLimit record component.
      Returns:
      the value of the currentLimit record component
    • banInfo

      public BanInfo banInfo()
      Returns the value of the banInfo record component.
      Returns:
      the value of the banInfo record component
    • restrictionInfo

      public List<RestrictionInfo> restrictionInfo()
      Returns the value of the restrictionInfo record component.
      Returns:
      the value of the restrictionInfo record component