Package com.intercom.api.types
Class TextComponent.Builder
- java.lang.Object
-
- com.intercom.api.types.TextComponent.Builder
-
- All Implemented Interfaces:
TextComponent._FinalStage,TextComponent.TextStage
- Enclosing class:
- TextComponent
public static final class TextComponent.Builder extends java.lang.Object implements TextComponent.TextStage, TextComponent._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextComponent._FinalStagealign(TextComponent.Align align)Aligns the text.TextComponent._FinalStagealign(java.util.Optional<TextComponent.Align> align)Aligns the text.TextComponent._FinalStagebottomMargin(java.lang.String bottomMargin)Disables a component's margin-bottom of 10px.TextComponent._FinalStagebottomMargin(java.util.Optional<java.lang.String> bottomMargin)Disables a component's margin-bottom of 10px.TextComponentbuild()TextComponent.Builderfrom(TextComponent other)TextComponent._FinalStageid(java.lang.String id)A unique identifier for the component.TextComponent._FinalStageid(java.util.Optional<java.lang.String> id)A unique identifier for the component.TextComponent._FinalStagestyle(TextComponent.Style style)Styles the text.TextComponent._FinalStagestyle(java.util.Optional<TextComponent.Style> style)Styles the text.TextComponent._FinalStagetext(java.lang.String text)The text that will be rendered.
-
-
-
Method Detail
-
from
public TextComponent.Builder from(TextComponent other)
- Specified by:
fromin interfaceTextComponent.TextStage
-
text
public TextComponent._FinalStage text(@NotNull java.lang.String text)
The text that will be rendered.The text that will be rendered.
- Specified by:
textin interfaceTextComponent.TextStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
bottomMargin
public TextComponent._FinalStage bottomMargin(java.lang.String bottomMargin)
Disables a component's margin-bottom of 10px.
- Specified by:
bottomMarginin interfaceTextComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
bottomMargin
public TextComponent._FinalStage bottomMargin(java.util.Optional<java.lang.String> bottomMargin)
Disables a component's margin-bottom of 10px.
- Specified by:
bottomMarginin interfaceTextComponent._FinalStage
-
style
public TextComponent._FinalStage style(TextComponent.Style style)
Styles the text. Default is
paragraph.- Specified by:
stylein interfaceTextComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
style
public TextComponent._FinalStage style(java.util.Optional<TextComponent.Style> style)
Styles the text. Default is
paragraph.- Specified by:
stylein interfaceTextComponent._FinalStage
-
align
public TextComponent._FinalStage align(TextComponent.Align align)
Aligns the text. Default is
left.- Specified by:
alignin interfaceTextComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
align
public TextComponent._FinalStage align(java.util.Optional<TextComponent.Align> align)
Aligns the text. Default is
left.- Specified by:
alignin interfaceTextComponent._FinalStage
-
id
public TextComponent._FinalStage id(java.lang.String id)
A unique identifier for the component.
- Specified by:
idin interfaceTextComponent._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
id
public TextComponent._FinalStage id(java.util.Optional<java.lang.String> id)
A unique identifier for the component.
- Specified by:
idin interfaceTextComponent._FinalStage
-
build
public TextComponent build()
- Specified by:
buildin interfaceTextComponent._FinalStage
-
-