Class MessagingAttachment
- java.lang.Object
-
- com.restfb.types.webhook.messaging.MessagingAttachment
-
public class MessagingAttachment extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
AUDIO
The "audio" attachment type.static String
FALLBACK
The "fallback" attachment type.static String
FILE
The "file" attachment type.static String
IMAGE
The "image" attachment type.static String
LOCATION
The "location" attachment type.static String
STORY_MENTION
The "story_mention" attachment type.static String
TEMPLATE
The "template" attachment type.static String
UNSUPPORTED_TYPE
The "unsupported type" attachment typestatic String
VIDEO
The "video" attachment type.
-
Constructor Summary
Constructors Constructor Description MessagingAttachment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessagingPayload
getPayload()
String
getTitle()
String
getType()
String
getUrl()
boolean
isAudio()
convenience method to check if the attachment type is audioboolean
isFallback()
convenience method to check if the attachment type is fallbackboolean
isFile()
convenience method to check if the attachment type is fileboolean
isImage()
convenience method to check if the attachment type is imageboolean
isLocation()
convenience method to check if the attachment type is locationboolean
isStoryMention()
convenience method to check if the attachment type is story_mentionboolean
isTemplate()
convenience method to check if the attachment type is templateboolean
isUnsupportedType()
convenience method to check if the attachment type is unsupportedboolean
isVideo()
convenience method to check if the attachment type is videovoid
setPayload(MessagingPayload payload)
void
setTitle(String title)
void
setType(String type)
void
setUrl(String url)
String
toString()
-
-
-
Field Detail
-
AUDIO
public static final String AUDIO
The "audio" attachment type.- See Also:
- Constant Field Values
-
FALLBACK
public static final String FALLBACK
The "fallback" attachment type.- See Also:
- Constant Field Values
-
FILE
public static final String FILE
The "file" attachment type.- See Also:
- Constant Field Values
-
IMAGE
public static final String IMAGE
The "image" attachment type.- See Also:
- Constant Field Values
-
LOCATION
public static final String LOCATION
The "location" attachment type.- See Also:
- Constant Field Values
-
VIDEO
public static final String VIDEO
The "video" attachment type.- See Also:
- Constant Field Values
-
UNSUPPORTED_TYPE
public static final String UNSUPPORTED_TYPE
The "unsupported type" attachment type- See Also:
- Constant Field Values
-
TEMPLATE
public static final String TEMPLATE
The "template" attachment type.- See Also:
- Constant Field Values
-
STORY_MENTION
public static final String STORY_MENTION
The "story_mention" attachment type.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MessagingAttachment
public MessagingAttachment()
-
-
Method Detail
-
isAudio
public boolean isAudio()
convenience method to check if the attachment type is audio- Returns:
true
if audio,false
if not audio
-
isFallback
public boolean isFallback()
convenience method to check if the attachment type is fallback- Returns:
true
if fallback,false
if not fallback
-
isFile
public boolean isFile()
convenience method to check if the attachment type is file- Returns:
true
if file,false
if not file
-
isImage
public boolean isImage()
convenience method to check if the attachment type is image- Returns:
true
if image,false
if not image
-
isLocation
public boolean isLocation()
convenience method to check if the attachment type is location- Returns:
true
if location,false
if not location
-
isVideo
public boolean isVideo()
convenience method to check if the attachment type is video- Returns:
true
if video,false
if not video
-
isTemplate
public boolean isTemplate()
convenience method to check if the attachment type is template- Returns:
true
if template,false
if not template
-
isUnsupportedType
public boolean isUnsupportedType()
convenience method to check if the attachment type is unsupported- Returns:
true
if unsupported type,false
if supported
-
isStoryMention
public boolean isStoryMention()
convenience method to check if the attachment type is story_mention- Returns:
true
if story_mention type,false
if not story_mention
-
getPayload
public MessagingPayload getPayload()
-
setPayload
public void setPayload(MessagingPayload payload)
-
-