Class Author


  • public class Author
    extends java.lang.Object
    The author of the message.
    • Field Detail

      • JSON_PROPERTY_TYPE

        public static final java.lang.String JSON_PROPERTY_TYPE
        See Also:
        Constant Field Values
      • JSON_PROPERTY_SUBTYPES

        public static final java.lang.String JSON_PROPERTY_SUBTYPES
        See Also:
        Constant Field Values
      • JSON_PROPERTY_USER_ID

        public static final java.lang.String JSON_PROPERTY_USER_ID
        See Also:
        Constant Field Values
      • JSON_PROPERTY_USER_EXTERNAL_ID

        public static final java.lang.String JSON_PROPERTY_USER_EXTERNAL_ID
        See Also:
        Constant Field Values
      • JSON_PROPERTY_DISPLAY_NAME

        public static final java.lang.String JSON_PROPERTY_DISPLAY_NAME
        See Also:
        Constant Field Values
      • JSON_PROPERTY_AVATAR_URL

        public static final java.lang.String JSON_PROPERTY_AVATAR_URL
        See Also:
        Constant Field Values
    • Constructor Detail

      • Author

        public Author()
    • Method Detail

      • getType

        public Author.TypeEnum getType()
        The author type. Either \"user\" (representing the end user) or \"business\" (sent on behalf of the business).
        Returns:
        type
      • getSubtypes

        @Nullable
        public java.util.List<Author.SubtypesEnum> getSubtypes()
        A string array that indicates the author's subtypes. Messages from \"business\" type with an \"AI\" subtype are generated by AI and a disclaimer is appended to the text of the message sent to the customer. For third-party channels, the disclaimer is applied for image, file, and text message types.
        Returns:
        subtypes
      • userId

        public Author userId​(java.lang.String userId)
      • getUserId

        @Nullable
        public java.lang.String getUserId()
        The id of the user. Only supported when `type` is user.
        Returns:
        userId
      • setUserId

        public void setUserId​(java.lang.String userId)
      • userExternalId

        public Author userExternalId​(java.lang.String userExternalId)
      • getUserExternalId

        @Nullable
        public java.lang.String getUserExternalId()
        The externalId of the user. Only supported when `type` is user.
        Returns:
        userExternalId
      • setUserExternalId

        public void setUserExternalId​(java.lang.String userExternalId)
      • displayName

        public Author displayName​(java.lang.String displayName)
      • getDisplayName

        @Nullable
        public java.lang.String getDisplayName()
        The display name of the message author.
        Returns:
        displayName
      • setDisplayName

        public void setDisplayName​(java.lang.String displayName)
      • avatarUrl

        public Author avatarUrl​(java.net.URI avatarUrl)
      • getAvatarUrl

        @Nullable
        public java.net.URI getAvatarUrl()
        A custom message icon URL. The image must be JPG, PNG, or GIF format.
        Returns:
        avatarUrl
      • setAvatarUrl

        public void setAvatarUrl​(java.net.URI avatarUrl)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object