Class LocationMessage
- java.lang.Object
-
- com.zendesk.sunshine_conversations_client.model.LocationMessage
-
- All Implemented Interfaces:
Content
public class LocationMessage extends java.lang.Object implements Content
A location type message includes the coordinates (latitude and longitude) of a location and an optional location object which can include the name and address of the location. Typically sent in response to a Location Request.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringJSON_PROPERTY_COORDINATESstatic java.lang.StringJSON_PROPERTY_LOCATIONstatic java.lang.StringJSON_PROPERTY_TEXTstatic java.lang.StringJSON_PROPERTY_TYPE
-
Constructor Summary
Constructors Constructor Description LocationMessage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocationMessagecoordinates(LocationMessageCoordinates coordinates)booleanequals(java.lang.Object o)LocationMessageCoordinatesgetCoordinates()Get coordinatesLocationMessageLocationgetLocation()Get locationjava.lang.StringgetText()The fallback text message used when location messages are not supported by the channel.java.lang.StringgetType()The type of message.inthashCode()LocationMessagelocation(LocationMessageLocation location)voidsetCoordinates(LocationMessageCoordinates coordinates)voidsetLocation(LocationMessageLocation location)voidsetType(java.lang.String type)java.lang.StringtoString()LocationMessagetype(java.lang.String type)
-
-
-
Field Detail
-
JSON_PROPERTY_TYPE
public static final java.lang.String JSON_PROPERTY_TYPE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TEXT
public static final java.lang.String JSON_PROPERTY_TEXT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_COORDINATES
public static final java.lang.String JSON_PROPERTY_COORDINATES
- See Also:
- Constant Field Values
-
JSON_PROPERTY_LOCATION
public static final java.lang.String JSON_PROPERTY_LOCATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
type
public LocationMessage type(java.lang.String type)
-
getType
public java.lang.String getType()
The type of message.
-
setType
public void setType(java.lang.String type)
-
getText
@Nullable public java.lang.String getText()
The fallback text message used when location messages are not supported by the channel.- Returns:
- text
-
coordinates
public LocationMessage coordinates(LocationMessageCoordinates coordinates)
-
getCoordinates
public LocationMessageCoordinates getCoordinates()
Get coordinates- Returns:
- coordinates
-
setCoordinates
public void setCoordinates(LocationMessageCoordinates coordinates)
-
location
public LocationMessage location(LocationMessageLocation location)
-
getLocation
@Nullable public LocationMessageLocation getLocation()
Get location- Returns:
- location
-
setLocation
public void setLocation(LocationMessageLocation location)
-
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
-
-