クラス ButtonsTemplate

java.lang.Object
com.linecorp.bot.model.message.template.ButtonsTemplate
すべての実装されたインタフェース:
Template

public final class ButtonsTemplate
extends java.lang.Object
implements Template
Template message with an image, title, text, and multiple action buttons.
  • ネストされたクラスの概要

    ネストされたクラス
    修飾子とタイプ クラス 説明
    static class  ButtonsTemplate.ButtonsTemplateBuilder  
  • コンストラクタの概要

    コンストラクタ
    コンストラクタ 説明
    ButtonsTemplate​(java.net.URI thumbnailImageUrl, java.lang.String title, java.lang.String text, java.util.List<Action> actions)
    Constructor for basic use.
  • メソッドの概要

    修飾子とタイプ メソッド 説明
    static ButtonsTemplate.ButtonsTemplateBuilder builder()  
    boolean equals​(java.lang.Object o)  
    java.util.List<Action> getActions()
    Action when tapped.
    Action getDefaultAction()
    Optional: Action when image is tapped; set for the entire image, title, and text area.
    java.lang.String getImageAspectRatio()
    Aspect ratio of the image.
    java.lang.String getImageBackgroundColor()
    Background color of image.
    java.lang.String getImageSize()
    Size of the image.
    java.lang.String getText()
    Message text.
    java.net.URI getThumbnailImageUrl()
    Image URL.
    java.lang.String getTitle()
    Title.
    int hashCode()  
    java.lang.String toString()  

    クラスから継承されたメソッド java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • コンストラクタの詳細

    • ButtonsTemplate

      public ButtonsTemplate​(java.net.URI thumbnailImageUrl, java.lang.String title, java.lang.String text, java.util.List<Action> actions)
      Constructor for basic use. Use builder() to use full attributes.
      関連項目:
      builder()
  • メソッドの詳細

    • builder

      public static ButtonsTemplate.ButtonsTemplateBuilder builder()
    • getThumbnailImageUrl

      public java.net.URI getThumbnailImageUrl()
      Image URL.
      • HTTPS
      • HTTPS
      • JPEG or PNG
      • Aspect ratio: 1:1.51
      • Max width: 1024px
      • Max: 1 MB
    • getImageAspectRatio

      public java.lang.String getImageAspectRatio()
      Aspect ratio of the image.

      Specify one of the following values:

      • rectangle: 1.51:1
      • square: 1:1

      The default value is rectangle.

    • getImageSize

      public java.lang.String getImageSize()
      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.

    • getImageBackgroundColor

      public java.lang.String getImageBackgroundColor()
      Background color of image.

      Specify a RGB color value. The default value is #FFFFFF (white).

    • getTitle

      public java.lang.String getTitle()
      Title.

      Max 40 characters.

    • getText

      public java.lang.String getText()
      Message text.
      • Max: 160 characters(no image or title)
      • Max: 60 characters (message with an image or title)
    • getDefaultAction

      public Action getDefaultAction()
      Optional: Action when image is tapped; set for the entire image, title, and text area.
    • getActions

      public java.util.List<Action> getActions()
      Action when tapped.

      Max: 4

    • equals

      public boolean equals​(java.lang.Object o)
      オーバーライド:
      equals クラス内 java.lang.Object
    • hashCode

      public int hashCode()
      オーバーライド:
      hashCode クラス内 java.lang.Object
    • toString

      public java.lang.String toString()
      オーバーライド:
      toString クラス内 java.lang.Object