Class RichTextLinkElement
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextLinkElement
- All Implemented Interfaces:
BlockElement,RichTextElement,RichTextLinkElementIF
@Generated(from="RichTextLinkElementIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class RichTextLinkElement
extends Object
implements RichTextLinkElementIF
Immutable implementation of
RichTextLinkElementIF.
Use the builder to create immutable instances:
RichTextLinkElement.builder().
Use the static factory method to create immutable instances:
RichTextLinkElement.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeRichTextLinkElement.static final classImmutable implementation ofRichTextLinkElementIF.StyleIF.Nested classes/interfaces inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextLinkElementIF
RichTextLinkElementIF.StyleIF -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextLinkElementIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic RichTextLinkElement.Builderbuilder()Creates a builder forRichTextLinkElement.static RichTextLinkElementcopyOf(RichTextLinkElementIF instance) Creates an immutable copy of aRichTextLinkElementIFvalue.booleanThis instance is equal to all instances ofRichTextLinkElementthat have equal attribute values.getStyle()getText()getType()getUrl()inthashCode()Computes a hash code from attributes:type,url,text,unsafe,style.static RichTextLinkElementConstruct a new immutableRichTextLinkElementinstance.toString()Prints the immutable valueRichTextLinkElementwith attribute values.final RichTextLinkElementCopy the current immutable object by setting a present value for the optionalstyleattribute.final RichTextLinkElementwithStyle(Optional<? extends RichTextLinkElementIF.StyleIF> optional) Copy the current immutable object by setting an optional value for thestyleattribute.final RichTextLinkElementCopy the current immutable object by setting a present value for the optionaltextattribute.final RichTextLinkElementCopy the current immutable object by setting an optional value for thetextattribute.final RichTextLinkElementwithUnsafe(Boolean value) Copy the current immutable object by setting a present value for the optionalunsafeattribute.final RichTextLinkElementwithUnsafe(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theunsafeattribute.final RichTextLinkElementCopy the current immutable object by setting a value for theurlattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceRichTextLinkElementIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getUrl
- Specified by:
getUrlin interfaceRichTextLinkElementIF- Returns:
- The value of the
urlattribute
-
getText
- Specified by:
getTextin interfaceRichTextLinkElementIF- Returns:
- The value of the
textattribute
-
getUnsafe
- Specified by:
getUnsafein interfaceRichTextLinkElementIF- Returns:
- The value of the
unsafeattribute
-
getStyle
- Specified by:
getStylein interfaceRichTextLinkElementIF- Returns:
- The value of the
styleattribute
-
withUrl
Copy the current immutable object by setting a value for theurlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for url- Returns:
- A modified copy or the
thisobject
-
withText
Copy the current immutable object by setting a present value for the optionaltextattribute.- Parameters:
value- The value for text,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withText
Copy the current immutable object by setting an optional value for thetextattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for text- Returns:
- A modified copy or
thisif not changed
-
withUnsafe
Copy the current immutable object by setting a present value for the optionalunsafeattribute.- Parameters:
value- The value for unsafe,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUnsafe
Copy the current immutable object by setting an optional value for theunsafeattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for unsafe- Returns:
- A modified copy or
thisif not changed
-
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 RichTextLinkElement withStyle(Optional<? extends RichTextLinkElementIF.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 ofRichTextLinkElementthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,url,text,unsafe,style. -
toString
Prints the immutable valueRichTextLinkElementwith attribute values. -
of
Construct a new immutableRichTextLinkElementinstance.- Parameters:
url- The value for theurlattribute- Returns:
- An immutable RichTextLinkElement instance
-
copyOf
Creates an immutable copy of aRichTextLinkElementIFvalue. 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 RichTextLinkElement instance
-
builder
Creates a builder forRichTextLinkElement.RichTextLinkElement.builder() .setUrl(String) // requiredurl.setText(Optional<String>) // optionaltext.setUnsafe(Optional<Boolean>) // optionalunsafe.setStyle(Optional<com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextLinkElementIF.StyleIF>) // optionalstyle.build();- Returns:
- A new RichTextLinkElement builder
-