Class RichTextUserElement
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextUserElement
- All Implemented Interfaces:
BlockElement,RichTextElement,RichTextUserElementIF
@Generated(from="RichTextUserElementIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class RichTextUserElement
extends Object
implements RichTextUserElementIF
Immutable implementation of
RichTextUserElementIF.
Use the builder to create immutable instances:
RichTextUserElement.builder().
Use the static factory method to create immutable instances:
RichTextUserElement.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeRichTextUserElement.static final classImmutable implementation ofRichTextUserElementIF.StyleIF.Nested classes/interfaces inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextUserElementIF
RichTextUserElementIF.StyleIF -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextUserElementIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic RichTextUserElement.Builderbuilder()Creates a builder forRichTextUserElement.static RichTextUserElementcopyOf(RichTextUserElementIF instance) Creates an immutable copy of aRichTextUserElementIFvalue.booleanThis instance is equal to all instances ofRichTextUserElementthat have equal attribute values.getStyle()getType()inthashCode()Computes a hash code from attributes:type,userId,style.static RichTextUserElementConstruct a new immutableRichTextUserElementinstance.toString()Prints the immutable valueRichTextUserElementwith attribute values.final RichTextUserElementCopy the current immutable object by setting a present value for the optionalstyleattribute.final RichTextUserElementwithStyle(Optional<? extends RichTextUserElementIF.StyleIF> optional) Copy the current immutable object by setting an optional value for thestyleattribute.final RichTextUserElementwithUserId(String value) Copy the current immutable object by setting a value for theuserIdattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceRichTextUserElementIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getUserId
- Specified by:
getUserIdin interfaceRichTextUserElementIF- Returns:
- The value of the
userIdattribute
-
getStyle
- Specified by:
getStylein interfaceRichTextUserElementIF- Returns:
- The value of the
styleattribute
-
withUserId
Copy the current immutable object by setting a value for theuserIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for userId- Returns:
- A modified copy or the
thisobject
-
withStyle
Copy the current immutable object by setting a present value for the optionalstyleattribute.- Parameters:
value- The value for style,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withStyle
public final RichTextUserElement withStyle(Optional<? extends RichTextUserElementIF.StyleIF> optional) Copy the current immutable object by setting an optional value for thestyleattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for style- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofRichTextUserElementthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,userId,style. -
toString
Prints the immutable valueRichTextUserElementwith attribute values. -
of
Construct a new immutableRichTextUserElementinstance.- Parameters:
userId- The value for theuserIdattribute- Returns:
- An immutable RichTextUserElement instance
-
copyOf
Creates an immutable copy of aRichTextUserElementIFvalue. 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 RichTextUserElement instance
-
builder
Creates a builder forRichTextUserElement.RichTextUserElement.builder() .setUserId(String) // requireduserId.setStyle(Optional<com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextUserElementIF.StyleIF>) // optionalstyle.build();- Returns:
- A new RichTextUserElement builder
-