Class Name

java.lang.Object
com.whatsapp.api.domain.messages.Name

public class Name extends Object
Required

Full contact name formatted as a name object. The object can contain the following fields:

  • formatted_namestring – Required. Full name, as it normally appears.
  • first_namestring – Optional*. First name.
  • first_namestring – Optional*. First name.
  • middle_namestring – Optional*. Middle name.
  • suffixstring – Optional*. Name suffix.
  • prefixstring – Optional*. Name prefix.
*At least one of the optional parameters needs to be included along with the formatted_name parameter.
  • Constructor Details

    • Name

      public Name()
  • Method Details

    • getPrefix

      public String getPrefix()
      Gets prefix.
      Returns:
      the prefix
    • setPrefix

      public Name setPrefix(String prefix)
      Sets prefix.
      Parameters:
      prefix - Optional. Name prefix.
      Returns:
      the prefix
    • getLastName

      public String getLastName()
      Gets last name.
      Returns:
      the last name
    • setLastName

      public Name setLastName(String lastName)
      Sets last name.
      Parameters:
      lastName - Optional. Last name
      Returns:
      the last name
    • getMiddleName

      public String getMiddleName()
      Gets middle name.
      Returns:
      the middle name
    • setMiddleName

      public Name setMiddleName(String middleName)
      Sets middle name.
      Parameters:
      middleName - Optional. Middle name.
      Returns:
      the middle name
    • getSuffix

      public String getSuffix()
      Gets suffix.
      Returns:
      the suffix
    • setSuffix

      public Name setSuffix(String suffix)
      Sets suffix.
      Parameters:
      suffix - Optional. Name suffix
      Returns:
      the suffix
    • getFirstName

      public String getFirstName()
      Gets first name.
      Returns:
      the first name
    • setFirstName

      public Name setFirstName(String firstName)
      Sets first name.
      Parameters:
      firstName - Optional. First name.
      Returns:
      the first name
    • getFormattedName

      public String getFormattedName()
      Gets formatted name.
      Returns:
      the formatted name
    • setFormattedName

      public Name setFormattedName(String formattedName)
      Sets formatted name.
      Parameters:
      formattedName - Required. Full name, as it normally appears. At least one of the optional parameters needs to be included along with this.
      Returns:
      the formatted name