Class Text
java.lang.Object
com.hubspot.slack.client.models.blocks.objects.Text
- All Implemented Interfaces:
CompositionObject,ImageBlockOrText,TextIF
@Generated(from="TextIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class Text
extends Object
implements TextIF
Immutable implementation of
TextIF.
Use the builder to create immutable instances:
Text.builder().
Use the static factory method to create immutable instances:
Text.of().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Text.Builderbuilder()Creates a builder forText.static TextCreates an immutable copy of aTextIFvalue.booleanThis instance is equal to all instances ofTextthat have equal attribute values.getText()getType()inthashCode()Computes a hash code from attributes:type,text,emoji,verbatim.isEmoji()static TextConstruct a new immutableTextinstance.toString()Prints the immutable valueTextwith attribute values.final TextCopy the current immutable object by setting a present value for the optionalemojiattribute.final TextCopy the current immutable object by setting an optional value for theemojiattribute.final TextCopy the current immutable object by setting a value for thetextattribute.final TextCopy the current immutable object by setting a value for thetypeattribute.final TextwithVerbatim(Boolean value) Copy the current immutable object by setting a present value for the optionalverbatimattribute.final TextwithVerbatim(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theverbatimattribute.
-
Method Details
-
getType
-
getText
-
isEmoji
-
isVerbatim
- Specified by:
isVerbatimin interfaceTextIF- Returns:
- The value of the
verbatimattribute
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy or the
thisobject
-
withText
Copy the current immutable object by setting a value for thetextattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for text- Returns:
- A modified copy or the
thisobject
-
withEmoji
Copy the current immutable object by setting a present value for the optionalemojiattribute.- Parameters:
value- The value for emoji,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withEmoji
Copy the current immutable object by setting an optional value for theemojiattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for emoji- Returns:
- A modified copy or
thisif not changed
-
withVerbatim
Copy the current immutable object by setting a present value for the optionalverbatimattribute.- Parameters:
value- The value for verbatim,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withVerbatim
Copy the current immutable object by setting an optional value for theverbatimattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for verbatim- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofTextthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,text,emoji,verbatim. -
toString
Prints the immutable valueTextwith attribute values. -
of
Construct a new immutableTextinstance.- Parameters:
type- The value for thetypeattributetext- The value for thetextattribute- Returns:
- An immutable Text instance
-
copyOf
Creates an immutable copy of aTextIFvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Text instance
-
builder
Creates a builder forText.Text.builder() .setType(com.hubspot.slack.client.models.blocks.objects.TextType) // requiredtype.setText(String) // requiredtext.setEmoji(Optional<Boolean>) // optionalemoji.setVerbatim(Optional<Boolean>) // optionalverbatim.build();- Returns:
- A new Text builder
-