@Beta public class ButtonResponse extends Object implements ResponseInterface
Constructor and Description |
---|
ButtonResponse(ButtonCollection<Button> content)
Assumes buttons as a type - full button style instead of quick replies.
|
ButtonResponse(String buttonResponseType,
ButtonCollection<?> content)
Allows to set type to either quickReplies or buttons.
|
Modifier and Type | Method and Description |
---|---|
static ButtonResponse |
createForFullButtons(ButtonCollection<Button> content)
Create a button response with complex buttons which allow visiting web urls or dial phone numbers, on top of the
regular postback feature.
|
static ButtonResponse |
createForQuickReplies(ButtonCollection<SlimButton> content)
Create a response with only POSTBACK buttons.
|
ButtonCollection<?> |
getContent()
This Function returns the button collection of this response.
|
String |
getType()
Returns the type of this button response
|
void |
setContent(ButtonCollection<?> content)
Sets the content of the button collection to the given one.
|
public ButtonResponse(@Nonnull ButtonCollection<Button> content)
content
- the ButtonCollection to be sent as content of this buttonresponse.public ButtonResponse(@Nonnull String buttonResponseType, @Nonnull ButtonCollection<?> content)
buttonResponseType
- one of buttons or quickRepliescontent
- a button collection with all buttons to be sent back@Nonnull public static ButtonResponse createForQuickReplies(@Nonnull ButtonCollection<SlimButton> content)
content
- the buttons to set. Don't use Button type buttons.@Nonnull public static ButtonResponse createForFullButtons(@Nonnull ButtonCollection<Button> content)
content
- the buttons.@Nullable public ButtonCollection<?> getContent()
public void setContent(@Nonnull ButtonCollection<?> content)
content
- the new ButtonCollection@Nullable public String getType()
getType
in interface ResponseInterface
Copyright © 2020 SAP SE. All rights reserved.