Class RichTextColorElement
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextColorElement
- All Implemented Interfaces:
BlockElement,RichTextColorElementIF,RichTextElement
@Generated(from="RichTextColorElementIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class RichTextColorElement
extends Object
implements RichTextColorElementIF
Immutable implementation of
RichTextColorElementIF.
Use the builder to create immutable instances:
RichTextColorElement.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeRichTextColorElement.static final classImmutable implementation ofRichTextColorElementIF.StyleIF.Nested classes/interfaces inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextColorElementIF
RichTextColorElementIF.StyleIF -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextColorElementIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic RichTextColorElement.Builderbuilder()Creates a builder forRichTextColorElement.static RichTextColorElementcopyOf(RichTextColorElementIF instance) Creates an immutable copy of aRichTextColorElementIFvalue.booleanThis instance is equal to all instances ofRichTextColorElementthat have equal attribute values.getStyle()getType()getValue()inthashCode()Computes a hash code from attributes:type,value,style.toString()Prints the immutable valueRichTextColorElementwith attribute values.final RichTextColorElementCopy the current immutable object by setting a present value for the optionalstyleattribute.final RichTextColorElementwithStyle(Optional<? extends RichTextColorElementIF.StyleIF> optional) Copy the current immutable object by setting an optional value for thestyleattribute.final RichTextColorElementCopy the current immutable object by setting a value for thevalueattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceRichTextColorElementIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getValue
- Specified by:
getValuein interfaceRichTextColorElementIF- Returns:
- The value of the
valueattribute
-
getStyle
- Specified by:
getStylein interfaceRichTextColorElementIF- Returns:
- The value of the
styleattribute
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- 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 RichTextColorElement withStyle(Optional<? extends RichTextColorElementIF.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 ofRichTextColorElementthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,value,style. -
toString
Prints the immutable valueRichTextColorElementwith attribute values. -
copyOf
Creates an immutable copy of aRichTextColorElementIFvalue. 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 RichTextColorElement instance
-
builder
Creates a builder forRichTextColorElement.RichTextColorElement.builder() .setValue(String) // requiredvalue.setStyle(Optional<com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextColorElementIF.StyleIF>) // optionalstyle.build();- Returns:
- A new RichTextColorElement builder
-