Class RichTextDateElement
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextDateElement
- All Implemented Interfaces:
BlockElement,RichTextDateElementIF,RichTextElement
@Generated(from="RichTextDateElementIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class RichTextDateElement
extends Object
implements RichTextDateElementIF
Immutable implementation of
RichTextDateElementIF.
Use the builder to create immutable instances:
RichTextDateElement.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeRichTextDateElement.static final classImmutable implementation ofRichTextDateElementIF.StyleIF.Nested classes/interfaces inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextDateElementIF
RichTextDateElementIF.StyleIF -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextDateElementIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic RichTextDateElement.Builderbuilder()Creates a builder forRichTextDateElement.static RichTextDateElementcopyOf(RichTextDateElementIF instance) Creates an immutable copy of aRichTextDateElementIFvalue.booleanThis instance is equal to all instances ofRichTextDateElementthat have equal attribute values.getStyle()longgetType()getUrl()inthashCode()Computes a hash code from attributes:type,timestamp,format,url,fallback,style.toString()Prints the immutable valueRichTextDateElementwith attribute values.final RichTextDateElementwithFallback(String value) Copy the current immutable object by setting a present value for the optionalfallbackattribute.final RichTextDateElementwithFallback(Optional<String> optional) Copy the current immutable object by setting an optional value for thefallbackattribute.final RichTextDateElementwithFormat(String value) Copy the current immutable object by setting a value for theformatattribute.final RichTextDateElementCopy the current immutable object by setting a present value for the optionalstyleattribute.final RichTextDateElementwithStyle(Optional<? extends RichTextDateElementIF.StyleIF> optional) Copy the current immutable object by setting an optional value for thestyleattribute.final RichTextDateElementwithTimestamp(long value) Copy the current immutable object by setting a value for thetimestampattribute.final RichTextDateElementCopy the current immutable object by setting a present value for the optionalurlattribute.final RichTextDateElementCopy the current immutable object by setting an optional value for theurlattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceRichTextDateElementIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getTimestamp
public long getTimestamp()- Specified by:
getTimestampin interfaceRichTextDateElementIF- Returns:
- The value of the
timestampattribute
-
getFormat
- Specified by:
getFormatin interfaceRichTextDateElementIF- Returns:
- The value of the
formatattribute
-
getUrl
- Specified by:
getUrlin interfaceRichTextDateElementIF- Returns:
- The value of the
urlattribute
-
getFallback
- Specified by:
getFallbackin interfaceRichTextDateElementIF- Returns:
- The value of the
fallbackattribute
-
getStyle
- Specified by:
getStylein interfaceRichTextDateElementIF- Returns:
- The value of the
styleattribute
-
withTimestamp
Copy the current immutable object by setting a value for thetimestampattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for timestamp- Returns:
- A modified copy or the
thisobject
-
withFormat
Copy the current immutable object by setting a value for theformatattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for format- Returns:
- A modified copy or the
thisobject
-
withUrl
Copy the current immutable object by setting a present value for the optionalurlattribute.- Parameters:
value- The value for url,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUrl
Copy the current immutable object by setting an optional value for theurlattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for url- Returns:
- A modified copy or
thisif not changed
-
withFallback
Copy the current immutable object by setting a present value for the optionalfallbackattribute.- Parameters:
value- The value for fallback,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withFallback
Copy the current immutable object by setting an optional value for thefallbackattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for fallback- 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 RichTextDateElement withStyle(Optional<? extends RichTextDateElementIF.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 ofRichTextDateElementthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,timestamp,format,url,fallback,style. -
toString
Prints the immutable valueRichTextDateElementwith attribute values. -
copyOf
Creates an immutable copy of aRichTextDateElementIFvalue. 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 RichTextDateElement instance
-
builder
Creates a builder forRichTextDateElement.RichTextDateElement.builder() .setTimestamp(long) // requiredtimestamp.setFormat(String) // requiredformat.setUrl(Optional<String>) // optionalurl.setFallback(Optional<String>) // optionalfallback.setStyle(Optional<com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextDateElementIF.StyleIF>) // optionalstyle.build();- Returns:
- A new RichTextDateElement builder
-