Class SlackDialog
java.lang.Object
com.hubspot.slack.client.models.dialog.SlackDialog
- All Implemented Interfaces:
SlackDialogIF
@Generated(from="SlackDialogIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackDialog
extends Object
implements SlackDialogIF
Immutable implementation of
SlackDialogIF.
Use the builder to create immutable instances:
SlackDialog.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SlackDialog.Builderbuilder()Creates a builder forSlackDialog.static SlackDialogcopyOf(SlackDialogIF instance) Creates an immutable copy of aSlackDialogIFvalue.booleanThis instance is equal to all instances ofSlackDialogthat have equal attribute values.getState()getTitle()inthashCode()Computes a hash code from attributes:title,callbackId,elements,state,submitLabel,notifyOnCancel.toString()Prints the immutable valueSlackDialogwith attribute values.final SlackDialogwithCallbackId(String value) Copy the current immutable object by setting a value for thecallbackIdattribute.final SlackDialogwithElements(SlackDialogFormElement... elements) Copy the current immutable object with elements that replace the content ofelements.final SlackDialogwithElements(Iterable<? extends SlackDialogFormElement> elements) Copy the current immutable object with elements that replace the content ofelements.final SlackDialogwithNotifyOnCancel(Boolean value) Copy the current immutable object by setting a present value for the optionalnotifyOnCancelattribute.final SlackDialogwithNotifyOnCancel(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thenotifyOnCancelattribute.final SlackDialogCopy the current immutable object by setting a present value for the optionalstateattribute.final SlackDialogCopy the current immutable object by setting an optional value for thestateattribute.final SlackDialogwithSubmitLabel(String value) Copy the current immutable object by setting a present value for the optionalsubmitLabelattribute.final SlackDialogwithSubmitLabel(Optional<String> optional) Copy the current immutable object by setting an optional value for thesubmitLabelattribute.final SlackDialogCopy the current immutable object by setting a value for thetitleattribute.Methods inherited from interface com.hubspot.slack.client.models.dialog.SlackDialogIF
validate
-
Method Details
-
getTitle
- Specified by:
getTitlein interfaceSlackDialogIF- Returns:
- The value of the
titleattribute
-
getCallbackId
- Specified by:
getCallbackIdin interfaceSlackDialogIF- Returns:
- The value of the
callbackIdattribute
-
getElements
- Specified by:
getElementsin interfaceSlackDialogIF- Returns:
- The value of the
elementsattribute
-
getState
- Specified by:
getStatein interfaceSlackDialogIF- Returns:
- The value of the
stateattribute
-
getSubmitLabel
- Specified by:
getSubmitLabelin interfaceSlackDialogIF- Returns:
- The value of the
submitLabelattribute
-
getNotifyOnCancel
- Specified by:
getNotifyOnCancelin interfaceSlackDialogIF- Returns:
- The value of the
notifyOnCancelattribute
-
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
-
withCallbackId
Copy the current immutable object by setting a value for thecallbackIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for callbackId- Returns:
- A modified copy or the
thisobject
-
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
-
withState
Copy the current immutable object by setting a present value for the optionalstateattribute.- Parameters:
value- The value for state,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withState
Copy the current immutable object by setting an optional value for thestateattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for state- Returns:
- A modified copy or
thisif not changed
-
withSubmitLabel
Copy the current immutable object by setting a present value for the optionalsubmitLabelattribute.- Parameters:
value- The value for submitLabel,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withSubmitLabel
Copy the current immutable object by setting an optional value for thesubmitLabelattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for submitLabel- Returns:
- A modified copy or
thisif not changed
-
withNotifyOnCancel
Copy the current immutable object by setting a present value for the optionalnotifyOnCancelattribute.- Parameters:
value- The value for notifyOnCancel,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withNotifyOnCancel
Copy the current immutable object by setting an optional value for thenotifyOnCancelattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for notifyOnCancel- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofSlackDialogthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:title,callbackId,elements,state,submitLabel,notifyOnCancel. -
toString
Prints the immutable valueSlackDialogwith attribute values. -
copyOf
Creates an immutable copy of aSlackDialogIFvalue. 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 SlackDialog instance
-
builder
Creates a builder forSlackDialog.SlackDialog.builder() .setTitle(String) // requiredtitle.setCallbackId(String) // requiredcallbackId.addElements|addAllElements(com.hubspot.slack.client.models.dialog.form.elements.SlackDialogFormElement) //elementselements .setState(Optional<String>) // optionalstate.setSubmitLabel(Optional<String>) // optionalsubmitLabel.setNotifyOnCancel(Optional<Boolean>) // optionalnotifyOnCancel.build();- Returns:
- A new SlackDialog builder
-