Class ButtonsTemplate.ButtonsTemplateBuilder
- java.lang.Object
-
- com.linecorp.bot.model.message.template.ButtonsTemplate.ButtonsTemplateBuilder
-
- Enclosing class:
- ButtonsTemplate
public static class ButtonsTemplate.ButtonsTemplateBuilder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ButtonsTemplate.ButtonsTemplateBuilder
actions(java.util.List<Action> actions)
Action when tapped.ButtonsTemplate
build()
ButtonsTemplate.ButtonsTemplateBuilder
defaultAction(Action defaultAction)
Optional: Action when image is tapped; set for the entire image, title, and text area.ButtonsTemplate.ButtonsTemplateBuilder
imageAspectRatio(java.lang.String imageAspectRatio)
Aspect ratio of the image.ButtonsTemplate.ButtonsTemplateBuilder
imageBackgroundColor(java.lang.String imageBackgroundColor)
Background color of image.ButtonsTemplate.ButtonsTemplateBuilder
imageSize(java.lang.String imageSize)
Size of the image.ButtonsTemplate.ButtonsTemplateBuilder
text(java.lang.String text)
Message text.ButtonsTemplate.ButtonsTemplateBuilder
thumbnailImageUrl(java.net.URI thumbnailImageUrl)
Image URL.ButtonsTemplate.ButtonsTemplateBuilder
title(java.lang.String title)
Title.java.lang.String
toString()
-
-
-
Method Detail
-
thumbnailImageUrl
public ButtonsTemplate.ButtonsTemplateBuilder thumbnailImageUrl(java.net.URI thumbnailImageUrl)
Image URL.- HTTPS
- HTTPS
- JPEG or PNG
- Aspect ratio: 1:1.51
- Max width: 1024px
- Max: 1 MB
- Returns:
this
.
-
imageAspectRatio
public ButtonsTemplate.ButtonsTemplateBuilder imageAspectRatio(java.lang.String imageAspectRatio)
Aspect ratio of the image.Specify one of the following values:
- rectangle: 1.51:1
- square: 1:1
The default value is
rectangle
.- Returns:
this
.
-
imageSize
public ButtonsTemplate.ButtonsTemplateBuilder imageSize(java.lang.String imageSize)
Size of the image.Specify one of the following values:
- cover: The image fills the entire image area. Parts of the image that do not fit in the area are not displayed.
- contain: The entire image is displayed in the image area. A background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images.
The default value is
cover
.- Returns:
this
.
-
imageBackgroundColor
public ButtonsTemplate.ButtonsTemplateBuilder imageBackgroundColor(java.lang.String imageBackgroundColor)
Background color of image.Specify a RGB color value. The default value is
#FFFFFF
(white).- Returns:
this
.
-
title
public ButtonsTemplate.ButtonsTemplateBuilder title(java.lang.String title)
Title.Max 40 characters.
- Returns:
this
.
-
text
public ButtonsTemplate.ButtonsTemplateBuilder text(java.lang.String text)
Message text.- Max: 160 characters(no image or title)
- Max: 60 characters (message with an image or title)
- Returns:
this
.
-
defaultAction
public ButtonsTemplate.ButtonsTemplateBuilder defaultAction(Action defaultAction)
Optional: Action when image is tapped; set for the entire image, title, and text area.- Returns:
this
.
-
actions
public ButtonsTemplate.ButtonsTemplateBuilder actions(java.util.List<Action> actions)
Action when tapped.Max: 4
- Returns:
this
.
-
build
public ButtonsTemplate build()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-