Class Action
- java.lang.Object
-
- oracle.cloud.bots.mobile.core.payload.Action
-
- Direct Known Subclasses:
CallAction,LocationAction,PostBackAction,ShareAction,SubmitFormAction,UrlAction
public class Action extends java.lang.ObjectAn object that represents a message action.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAction.ActionTypeThe types of action
-
Constructor Summary
Constructors Constructor Description Action(java.lang.String imageUrl, java.lang.String label, Action.ActionType actionType)Creates an action of a given typeAction(java.lang.String imageUrl, java.lang.String label, Action.ActionType actionType, org.json.JSONObject channelExtensions)Creates an action of a given type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Action.ActionTypegetActionType()The action type for the actionorg.json.JSONObjectgetChannelExtensions()Returns the channel extensions in the actionjava.lang.StringgetImageUrl()The image to display for the actionjava.lang.StringgetLabel()The label to display for the actionvoidsetActionType(Action.ActionType type)Sets the action type for the actionvoidsetChannelExtensions(org.json.JSONObject channelExtensions)Sets the channel extensions for the action.voidsetImageUrl(java.lang.String url)Sets the image to display for the actionvoidsetLabel(java.lang.String label)Sets the label to display for the action
-
-
-
Constructor Detail
-
Action
public Action(java.lang.String imageUrl, java.lang.String label, Action.ActionType actionType)Creates an action of a given type- Parameters:
imageUrl- The image to display for the actionlabel- The label to display for the actionactionType- The action type for the action
-
Action
public Action(java.lang.String imageUrl, java.lang.String label, Action.ActionType actionType, org.json.JSONObject channelExtensions)Creates an action of a given type- Parameters:
imageUrl- The image to display for the actionlabel- The label to display for the actionactionType- The action type for the actionchannelExtensions- The channel specific extension properties associated with the action
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
The label to display for the action- Returns:
- The label of an action
-
setLabel
public void setLabel(java.lang.String label)
Sets the label to display for the action- Parameters:
label- The label of an action
-
getImageUrl
public java.lang.String getImageUrl()
The image to display for the action- Returns:
- The image URL of an action
-
setImageUrl
public void setImageUrl(java.lang.String url)
Sets the image to display for the action- Parameters:
url- The image URL of an action
-
getChannelExtensions
public org.json.JSONObject getChannelExtensions()
Returns the channel extensions in the action- Returns:
- The channel extensions received in the action
-
setChannelExtensions
public void setChannelExtensions(org.json.JSONObject channelExtensions)
Sets the channel extensions for the action.- Parameters:
channelExtensions- Sets the channel extensions for the action.
-
getActionType
public Action.ActionType getActionType()
The action type for the action- Returns:
- The action type
- See Also:
Action.ActionType
-
setActionType
public void setActionType(Action.ActionType type)
Sets the action type for the action- Parameters:
type- The action type- See Also:
Action.ActionType
-
-