Class Author
- java.lang.Object
-
- com.zendesk.sunshine_conversations_client.model.Author
-
public class Author extends java.lang.ObjectThe author of the message.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthor.SubtypesEnumGets or Sets subtypesstatic classAuthor.TypeEnumThe author type.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringJSON_PROPERTY_AVATAR_URLstatic java.lang.StringJSON_PROPERTY_DISPLAY_NAMEstatic java.lang.StringJSON_PROPERTY_SUBTYPESstatic java.lang.StringJSON_PROPERTY_TYPEstatic java.lang.StringJSON_PROPERTY_USER_EXTERNAL_IDstatic java.lang.StringJSON_PROPERTY_USER_ID
-
Constructor Summary
Constructors Constructor Description Author()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthoraddSubtypesItem(Author.SubtypesEnum subtypesItem)AuthoravatarUrl(java.net.URI avatarUrl)AuthordisplayName(java.lang.String displayName)booleanequals(java.lang.Object o)java.net.URIgetAvatarUrl()A custom message icon URL.java.lang.StringgetDisplayName()The display name of the message author.java.util.List<Author.SubtypesEnum>getSubtypes()A string array that indicates the author's subtypes.Author.TypeEnumgetType()The author type.java.lang.StringgetUserExternalId()The externalId of the user.java.lang.StringgetUserId()The id of the user.inthashCode()voidsetAvatarUrl(java.net.URI avatarUrl)voidsetDisplayName(java.lang.String displayName)voidsetSubtypes(java.util.List<Author.SubtypesEnum> subtypes)voidsetType(Author.TypeEnum type)voidsetUserExternalId(java.lang.String userExternalId)voidsetUserId(java.lang.String userId)Authorsubtypes(java.util.List<Author.SubtypesEnum> subtypes)java.lang.StringtoString()Authortype(Author.TypeEnum type)AuthoruserExternalId(java.lang.String userExternalId)AuthoruserId(java.lang.String userId)
-
-
-
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
-
-
Method Detail
-
type
public Author type(Author.TypeEnum type)
-
getType
public Author.TypeEnum getType()
The author type. Either \"user\" (representing the end user) or \"business\" (sent on behalf of the business).- Returns:
- type
-
setType
public void setType(Author.TypeEnum type)
-
subtypes
public Author subtypes(java.util.List<Author.SubtypesEnum> subtypes)
-
addSubtypesItem
public Author addSubtypesItem(Author.SubtypesEnum subtypesItem)
-
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
-
setSubtypes
public void setSubtypes(java.util.List<Author.SubtypesEnum> 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-