Class TaskCardBlock
java.lang.Object
com.hubspot.slack.client.models.blocks.TaskCardBlock
- All Implemented Interfaces:
BlockOrAttachment,Block,TaskCardBlockIF,ChatUnfurlBlocksOrAttachment
@Generated(from="TaskCardBlockIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class TaskCardBlock
extends Object
implements TaskCardBlockIF
Slack's task_card block displays a single task, representing a single action.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.TaskCardBlockIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic TaskCardBlock.Builderbuilder()Creates a builder forTaskCardBlock.static TaskCardBlockcopyOf(TaskCardBlockIF instance) Creates an immutable copy of aTaskCardBlockIFvalue.booleanThis instance is equal to all instances ofTaskCardBlockthat have equal attribute values.com.google.common.collect.ImmutableList<UrlSource> getTitle()getType()inthashCode()Computes a hash code from attributes:blockId,type,taskId,title,details,output,sources,status.static TaskCardBlockConstruct a new immutableTaskCardBlockinstance.toString()Prints the immutable valueTaskCardBlockwith attribute values.final TaskCardBlockwithBlockId(String value) Copy the current immutable object by setting a present value for the optionalblockIdattribute.final TaskCardBlockwithBlockId(Optional<String> optional) Copy the current immutable object by setting an optional value for theblockIdattribute.final TaskCardBlockwithDetails(RichTextBlock value) Copy the current immutable object by setting a present value for the optionaldetailsattribute.final TaskCardBlockwithDetails(Optional<? extends RichTextBlock> optional) Copy the current immutable object by setting an optional value for thedetailsattribute.final TaskCardBlockwithOutput(RichTextBlock value) Copy the current immutable object by setting a present value for the optionaloutputattribute.final TaskCardBlockwithOutput(Optional<? extends RichTextBlock> optional) Copy the current immutable object by setting an optional value for theoutputattribute.final TaskCardBlockwithSources(UrlSource... elements) Copy the current immutable object with elements that replace the content ofsources.final TaskCardBlockwithSources(Iterable<? extends UrlSource> elements) Copy the current immutable object with elements that replace the content ofsources.final TaskCardBlockwithStatus(TaskCardBlockStatus value) Copy the current immutable object by setting a present value for the optionalstatusattribute.final TaskCardBlockwithStatus(Optional<? extends TaskCardBlockStatus> optional) Copy the current immutable object by setting an optional value for thestatusattribute.final TaskCardBlockwithTaskId(String value) Copy the current immutable object by setting a value for thetaskIdattribute.final TaskCardBlockCopy the current immutable object by setting a value for thetitleattribute.
-
Method Details
-
getBlockId
- Specified by:
getBlockIdin interfaceBlock- Returns:
- The value of the
blockIdattribute
-
getType
- Specified by:
getTypein interfaceBlock- Specified by:
getTypein interfaceTaskCardBlockIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getTaskId
- Specified by:
getTaskIdin interfaceTaskCardBlockIF- Returns:
- The value of the
taskIdattribute
-
getTitle
- Specified by:
getTitlein interfaceTaskCardBlockIF- Returns:
- The value of the
titleattribute
-
getDetails
- Specified by:
getDetailsin interfaceTaskCardBlockIF- Returns:
- The value of the
detailsattribute
-
getOutput
- Specified by:
getOutputin interfaceTaskCardBlockIF- Returns:
- The value of the
outputattribute
-
getSources
- Specified by:
getSourcesin interfaceTaskCardBlockIF- Returns:
- The value of the
sourcesattribute
-
getStatus
- Specified by:
getStatusin interfaceTaskCardBlockIF- Returns:
- The value of the
statusattribute
-
withBlockId
Copy the current immutable object by setting a present value for the optionalblockIdattribute.- Parameters:
value- The value for blockId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withBlockId
Copy the current immutable object by setting an optional value for theblockIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for blockId- Returns:
- A modified copy or
thisif not changed
-
withTaskId
Copy the current immutable object by setting a value for thetaskIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for taskId- Returns:
- A modified copy or the
thisobject
-
withTitle
Copy the current immutable object by setting a value for thetitleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for title- Returns:
- A modified copy or the
thisobject
-
withDetails
Copy the current immutable object by setting a present value for the optionaldetailsattribute.- Parameters:
value- The value for details,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withDetails
Copy the current immutable object by setting an optional value for thedetailsattribute. 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 details- Returns:
- A modified copy or
thisif not changed
-
withOutput
Copy the current immutable object by setting a present value for the optionaloutputattribute.- Parameters:
value- The value for output,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withOutput
Copy the current immutable object by setting an optional value for theoutputattribute. 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 output- Returns:
- A modified copy or
thisif not changed
-
withSources
Copy the current immutable object with elements that replace the content ofsources.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSources
Copy the current immutable object with elements that replace the content ofsources. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of sources elements to set- Returns:
- A modified copy or
thisif not changed
-
withStatus
Copy the current immutable object by setting a present value for the optionalstatusattribute.- Parameters:
value- The value for status,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withStatus
Copy the current immutable object by setting an optional value for thestatusattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for status- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofTaskCardBlockthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:blockId,type,taskId,title,details,output,sources,status. -
toString
Prints the immutable valueTaskCardBlockwith attribute values. -
of
Construct a new immutableTaskCardBlockinstance.- Parameters:
taskId- The value for thetaskIdattributetitle- The value for thetitleattribute- Returns:
- An immutable TaskCardBlock instance
-
copyOf
Creates an immutable copy of aTaskCardBlockIFvalue. 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 TaskCardBlock instance
-
builder
Creates a builder forTaskCardBlock.TaskCardBlock.builder() .setBlockId(Optional<String>) // optionalblockId.setTaskId(String) // requiredtaskId.setTitle(String) // requiredtitle.setDetails(Optional<com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBlock>) // optionaldetails.setOutput(Optional<com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBlock>) // optionaloutput.addSources|addAllSources(com.hubspot.slack.client.models.blocks.elements.UrlSource) //sourceselements .setStatus(Optional<com.hubspot.slack.client.models.blocks.TaskCardBlockStatus>) // optionalstatus.build();- Returns:
- A new TaskCardBlock builder
-