Class ConfirmationDialog
java.lang.Object
com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog
- All Implemented Interfaces:
CompositionObject,ConfirmationDialogIF
@Generated(from="ConfirmationDialogIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ConfirmationDialog
extends Object
implements ConfirmationDialogIF
Immutable implementation of
ConfirmationDialogIF.
Use the builder to create immutable instances:
ConfirmationDialog.builder().
Use the static factory method to create immutable instances:
ConfirmationDialog.of().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfirmationDialog.Builderbuilder()Creates a builder forConfirmationDialog.static ConfirmationDialogcopyOf(ConfirmationDialogIF instance) Creates an immutable copy of aConfirmationDialogIFvalue.booleanThis instance is equal to all instances ofConfirmationDialogthat have equal attribute values.getStyle()getText()getTitle()inthashCode()Computes a hash code from attributes:title,text,confirmButtonText,denyButtonText,style.static ConfirmationDialogConstruct a new immutableConfirmationDialoginstance.toString()Prints the immutable valueConfirmationDialogwith attribute values.final ConfirmationDialogwithConfirmButtonText(Text value) Copy the current immutable object by setting a value for theconfirmButtonTextattribute.final ConfirmationDialogwithDenyButtonText(Text value) Copy the current immutable object by setting a value for thedenyButtonTextattribute.final ConfirmationDialogCopy the current immutable object by setting a present value for the optionalstyleattribute.final ConfirmationDialogCopy the current immutable object by setting an optional value for thestyleattribute.final ConfirmationDialogCopy the current immutable object by setting a value for thetextattribute.final ConfirmationDialogCopy the current immutable object by setting a value for thetitleattribute.
-
Method Details
-
getTitle
- Specified by:
getTitlein interfaceConfirmationDialogIF- Returns:
- The value of the
titleattribute
-
getText
- Specified by:
getTextin interfaceConfirmationDialogIF- Returns:
- The value of the
textattribute
-
getConfirmButtonText
- Specified by:
getConfirmButtonTextin interfaceConfirmationDialogIF- Returns:
- The value of the
confirmButtonTextattribute
-
getDenyButtonText
- Specified by:
getDenyButtonTextin interfaceConfirmationDialogIF- Returns:
- The value of the
denyButtonTextattribute
-
getStyle
- Specified by:
getStylein interfaceConfirmationDialogIF- Returns:
- The value of the
styleattribute
-
withTitle
Copy the current immutable object by setting a value for thetitleattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for title- Returns:
- A modified copy or the
thisobject
-
withText
Copy the current immutable object by setting a value for thetextattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for text- Returns:
- A modified copy or the
thisobject
-
withConfirmButtonText
Copy the current immutable object by setting a value for theconfirmButtonTextattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for confirmButtonText- Returns:
- A modified copy or the
thisobject
-
withDenyButtonText
Copy the current immutable object by setting a value for thedenyButtonTextattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for denyButtonText- 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
Copy the current immutable object by setting an optional value for thestyleattribute. An equality check is used on inner 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 ofConfirmationDialogthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:title,text,confirmButtonText,denyButtonText,style. -
toString
Prints the immutable valueConfirmationDialogwith attribute values. -
of
public static ConfirmationDialog of(Text title, Text text, Text confirmButtonText, Text denyButtonText) Construct a new immutableConfirmationDialoginstance.- Parameters:
title- The value for thetitleattributetext- The value for thetextattributeconfirmButtonText- The value for theconfirmButtonTextattributedenyButtonText- The value for thedenyButtonTextattribute- Returns:
- An immutable ConfirmationDialog instance
-
copyOf
Creates an immutable copy of aConfirmationDialogIFvalue. 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 ConfirmationDialog instance
-
builder
Creates a builder forConfirmationDialog.ConfirmationDialog.builder() .setTitle(com.hubspot.slack.client.models.blocks.objects.Text) // requiredtitle.setText(com.hubspot.slack.client.models.blocks.objects.Text) // requiredtext.setConfirmButtonText(com.hubspot.slack.client.models.blocks.objects.Text) // requiredconfirmButtonText.setDenyButtonText(com.hubspot.slack.client.models.blocks.objects.Text) // requireddenyButtonText.setStyle(Optional<com.hubspot.slack.client.models.blocks.Style>) // optionalstyle.build();- Returns:
- A new ConfirmationDialog builder
-