Class SlackFormSelectElement
java.lang.Object
com.hubspot.slack.client.models.dialog.form.elements.SlackDialogFormElement
com.hubspot.slack.client.models.dialog.form.elements.AbstractSlackFormSelectElement
com.hubspot.slack.client.models.dialog.form.elements.SlackFormSelectElement
- All Implemented Interfaces:
HasLabel,HasOptions
@Generated(from="AbstractSlackFormSelectElement",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackFormSelectElement
extends AbstractSlackFormSelectElement
Immutable implementation of
AbstractSlackFormSelectElement.
Use the builder to create immutable instances:
SlackFormSelectElement.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeSlackFormSelectElement. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forSlackFormSelectElement.static SlackFormSelectElementcopyOf(AbstractSlackFormSelectElement instance) Creates an immutable copy of aAbstractSlackFormSelectElementvalue.booleanThis instance is equal to all instances ofSlackFormSelectElementthat have equal attribute values.getLabel()getName()getType()getValue()inthashCode()Computes a hash code from attributes:options,label,name,placeholder,optional,type,dataSource,optionGroups,value,selectedOptions,minQueryLength.toString()Prints the immutable valueSlackFormSelectElementwith attribute values.final SlackFormSelectElementwithDataSource(SlackDataSource value) Copy the current immutable object by setting a value for thedataSourceattribute.final SlackFormSelectElementCopy the current immutable object by setting a value for thelabelattribute.final SlackFormSelectElementwithMinQueryLength(Integer value) Copy the current immutable object by setting a present value for the optionalminQueryLengthattribute.final SlackFormSelectElementwithMinQueryLength(Optional<Integer> optional) Copy the current immutable object by setting an optional value for theminQueryLengthattribute.final SlackFormSelectElementCopy the current immutable object by setting a value for thenameattribute.final SlackFormSelectElementwithOptional(Boolean value) Copy the current immutable object by setting a present value for the optionaloptionalattribute.final SlackFormSelectElementwithOptional(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theoptionalattribute.final SlackFormSelectElementwithOptionGroups(SlackFormOptionGroup... elements) Copy the current immutable object with elements that replace the content ofoptionGroups.final SlackFormSelectElementwithOptionGroups(Iterable<? extends SlackFormOptionGroup> elements) Copy the current immutable object with elements that replace the content ofoptionGroups.final SlackFormSelectElementwithOptions(SlackFormOption... elements) Copy the current immutable object with elements that replace the content ofoptions.final SlackFormSelectElementwithOptions(Iterable<? extends SlackFormOption> elements) Copy the current immutable object with elements that replace the content ofoptions.final SlackFormSelectElementwithPlaceholder(String value) Copy the current immutable object by setting a present value for the optionalplaceholderattribute.final SlackFormSelectElementwithPlaceholder(Optional<String> optional) Copy the current immutable object by setting an optional value for theplaceholderattribute.final SlackFormSelectElementwithSelectedOptions(SlackFormOption... elements) Copy the current immutable object with elements that replace the content ofselectedOptions.final SlackFormSelectElementwithSelectedOptions(Iterable<? extends SlackFormOption> elements) Copy the current immutable object with elements that replace the content ofselectedOptions.final SlackFormSelectElementwithType(SlackFormElementTypes value) Copy the current immutable object by setting a value for thetypeattribute.final SlackFormSelectElementCopy the current immutable object by setting a present value for the optionalvalueattribute.final SlackFormSelectElementCopy the current immutable object by setting an optional value for thevalueattribute.Methods inherited from class com.hubspot.slack.client.models.dialog.form.elements.AbstractSlackFormSelectElement
validate
-
Method Details
-
getOptions
- Returns:
- The value of the
optionsattribute
-
getLabel
- Returns:
- The value of the
labelattribute
-
getName
- Specified by:
getNamein classSlackDialogFormElement- Returns:
- The value of the
nameattribute
-
getPlaceholder
- Specified by:
getPlaceholderin classSlackDialogFormElement- Returns:
- The value of the
placeholderattribute
-
isOptional
- Specified by:
isOptionalin classSlackDialogFormElement- Returns:
- The value of the
optionalattribute
-
getType
- Overrides:
getTypein classAbstractSlackFormSelectElement- Returns:
- The value of the
typeattribute
-
getDataSource
- Overrides:
getDataSourcein classAbstractSlackFormSelectElement- Returns:
- The value of the
dataSourceattribute
-
getOptionGroups
- Specified by:
getOptionGroupsin classAbstractSlackFormSelectElement- Returns:
- The value of the
optionGroupsattribute
-
getValue
- Specified by:
getValuein classAbstractSlackFormSelectElement- Returns:
- The value of the
valueattribute
-
getSelectedOptions
- Specified by:
getSelectedOptionsin classAbstractSlackFormSelectElement- Returns:
- The value of the
selectedOptionsattribute
-
getMinQueryLength
- Specified by:
getMinQueryLengthin classAbstractSlackFormSelectElement- Returns:
- The value of the
minQueryLengthattribute
-
withOptions
Copy the current immutable object with elements that replace the content ofoptions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOptions
Copy the current immutable object with elements that replace the content ofoptions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of options elements to set- Returns:
- A modified copy or
thisif not changed
-
withLabel
Copy the current immutable object by setting a value for thelabelattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for label- Returns:
- A modified copy or the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy or the
thisobject
-
withPlaceholder
Copy the current immutable object by setting a present value for the optionalplaceholderattribute.- Parameters:
value- The value for placeholder,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withPlaceholder
Copy the current immutable object by setting an optional value for theplaceholderattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for placeholder- Returns:
- A modified copy or
thisif not changed
-
withOptional
Copy the current immutable object by setting a present value for the optionaloptionalattribute.- Parameters:
value- The value for optional,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withOptional
Copy the current immutable object by setting an optional value for theoptionalattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for optional- Returns:
- A modified copy or
thisif not changed
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy or the
thisobject
-
withDataSource
Copy the current immutable object by setting a value for thedataSourceattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for dataSource- Returns:
- A modified copy or the
thisobject
-
withOptionGroups
Copy the current immutable object with elements that replace the content ofoptionGroups.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOptionGroups
public final SlackFormSelectElement withOptionGroups(Iterable<? extends SlackFormOptionGroup> elements) Copy the current immutable object with elements that replace the content ofoptionGroups. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of optionGroups elements to set- Returns:
- A modified copy or
thisif not changed
-
withValue
Copy the current immutable object by setting a present value for the optionalvalueattribute.- Parameters:
value- The value for value,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withValue
Copy the current immutable object by setting an optional value for thevalueattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for value- Returns:
- A modified copy or
thisif not changed
-
withSelectedOptions
Copy the current immutable object with elements that replace the content ofselectedOptions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSelectedOptions
public final SlackFormSelectElement withSelectedOptions(Iterable<? extends SlackFormOption> elements) Copy the current immutable object with elements that replace the content ofselectedOptions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of selectedOptions elements to set- Returns:
- A modified copy or
thisif not changed
-
withMinQueryLength
Copy the current immutable object by setting a present value for the optionalminQueryLengthattribute.- Parameters:
value- The value for minQueryLength,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withMinQueryLength
Copy the current immutable object by setting an optional value for theminQueryLengthattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for minQueryLength- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofSlackFormSelectElementthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:options,label,name,placeholder,optional,type,dataSource,optionGroups,value,selectedOptions,minQueryLength. -
toString
Prints the immutable valueSlackFormSelectElementwith attribute values. -
copyOf
Creates an immutable copy of aAbstractSlackFormSelectElementvalue. 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 SlackFormSelectElement instance
-
builder
Creates a builder forSlackFormSelectElement.SlackFormSelectElement.builder() .addOptions|addAllOptions(SlackFormOption) //optionselements .setLabel(String) // requiredlabel.setName(String) // requiredname.setPlaceholder(Optional<String>) // optionalplaceholder.setOptional(Optional<Boolean>) // optionaloptional.setType(com.hubspot.slack.client.models.dialog.form.SlackFormElementTypes) // optionaltype.setDataSource(com.hubspot.slack.client.models.actions.SlackDataSource) // optionaldataSource.addOptionGroups|addAllOptionGroups(SlackFormOptionGroup) //optionGroupselements .setValue(Optional<String>) // optionalvalue.addSelectedOptions|addAllSelectedOptions(SlackFormOption) //selectedOptionselements .setMinQueryLength(Optional<Integer>) // optionalminQueryLength.build();- Returns:
- A new SlackFormSelectElement builder
-