Class RichTextPreformatted
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextPreformatted
- All Implemented Interfaces:
BlockElement,RichTextObject,RichTextPreformattedIF
@Generated(from="RichTextPreformattedIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class RichTextPreformatted
extends Object
implements RichTextPreformattedIF
Immutable implementation of
RichTextPreformattedIF.
Use the builder to create immutable instances:
RichTextPreformatted.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeRichTextPreformatted. -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextPreformattedIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic RichTextPreformatted.Builderbuilder()Creates a builder forRichTextPreformatted.static RichTextPreformattedcopyOf(RichTextPreformattedIF instance) Creates an immutable copy of aRichTextPreformattedIFvalue.booleanThis instance is equal to all instances ofRichTextPreformattedthat have equal attribute values.com.google.common.collect.ImmutableList<RichTextElement> getType()inthashCode()Computes a hash code from attributes:type,elements,border,language.toString()Prints the immutable valueRichTextPreformattedwith attribute values.final RichTextPreformattedwithBorder(Integer value) Copy the current immutable object by setting a present value for the optionalborderattribute.final RichTextPreformattedwithBorder(Optional<Integer> optional) Copy the current immutable object by setting an optional value for theborderattribute.final RichTextPreformattedwithElements(RichTextElement... elements) Copy the current immutable object with elements that replace the content ofelements.final RichTextPreformattedwithElements(Iterable<? extends RichTextElement> elements) Copy the current immutable object with elements that replace the content ofelements.final RichTextPreformattedwithLanguage(String value) Copy the current immutable object by setting a present value for the optionallanguageattribute.final RichTextPreformattedwithLanguage(Optional<String> optional) Copy the current immutable object by setting an optional value for thelanguageattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceRichTextPreformattedIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getElements
- Specified by:
getElementsin interfaceRichTextPreformattedIF- Returns:
- The value of the
elementsattribute
-
getBorder
- Specified by:
getBorderin interfaceRichTextPreformattedIF- Returns:
- The value of the
borderattribute
-
getLanguage
- Specified by:
getLanguagein interfaceRichTextPreformattedIF- Returns:
- The value of the
languageattribute
-
withElements
Copy the current immutable object with elements that replace the content ofelements.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withElements
Copy the current immutable object with elements that replace the content ofelements. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of elements elements to set- Returns:
- A modified copy or
thisif not changed
-
withBorder
Copy the current immutable object by setting a present value for the optionalborderattribute.- Parameters:
value- The value for border,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withBorder
Copy the current immutable object by setting an optional value for theborderattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for border- Returns:
- A modified copy or
thisif not changed
-
withLanguage
Copy the current immutable object by setting a present value for the optionallanguageattribute.- Parameters:
value- The value for language,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withLanguage
Copy the current immutable object by setting an optional value for thelanguageattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for language- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofRichTextPreformattedthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,elements,border,language. -
toString
Prints the immutable valueRichTextPreformattedwith attribute values. -
copyOf
Creates an immutable copy of aRichTextPreformattedIFvalue. 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 RichTextPreformatted instance
-
builder
Creates a builder forRichTextPreformatted.RichTextPreformatted.builder() .addElements|addAllElements(com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextElement) //elementselements .setBorder(Optional<Integer>) // optionalborder.setLanguage(Optional<String>) // optionallanguage.build();- Returns:
- A new RichTextPreformatted builder
-