Class Action
java.lang.Object
com.hubspot.slack.client.models.actions.Action
- All Implemented Interfaces:
ActionIF
@Generated(from="ActionIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class Action
extends Object
implements ActionIF
Immutable implementation of
ActionIF.
Use the builder to create immutable instances:
Action.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Action.Builderbuilder()Creates a builder forAction.static ActionCreates an immutable copy of aActionIFvalue.booleanThis instance is equal to all instances ofActionthat have equal attribute values.getName()getText()getType()getUrl()getValue()inthashCode()Computes a hash code from attributes:name,type,text,value,confirm,url,rawStyle,buttonStyle,options,selectedOptions,dataSource,minQueryLength.toString()Prints the immutable valueActionwith attribute values.final ActionwithConfirm(Confirm value) Copy the current immutable object by setting a present value for the optionalconfirmattribute.final ActionwithConfirm(Optional<? extends Confirm> optional) Copy the current immutable object by setting an optional value for theconfirmattribute.final ActionwithDataSource(SlackDataSource value) Copy the current immutable object by setting a present value for the optionaldataSourceattribute.final ActionwithDataSource(Optional<? extends SlackDataSource> optional) Copy the current immutable object by setting an optional value for thedataSourceattribute.final ActionwithMinQueryLength(Integer value) Copy the current immutable object by setting a present value for the optionalminQueryLengthattribute.final ActionwithMinQueryLength(Optional<Integer> optional) Copy the current immutable object by setting an optional value for theminQueryLengthattribute.final ActionCopy the current immutable object by setting a present value for the optionalnameattribute.final ActionCopy the current immutable object by setting an optional value for thenameattribute.final ActionwithOptions(Option... elements) Copy the current immutable object with elements that replace the content ofoptions.final ActionwithOptions(Iterable<? extends Option> elements) Copy the current immutable object with elements that replace the content ofoptions.final ActionwithRawStyle(String value) Copy the current immutable object by setting a present value for the optionalrawStyleattribute.final ActionwithRawStyle(Optional<String> optional) Copy the current immutable object by setting an optional value for therawStyleattribute.final ActionwithSelectedOptions(Option... elements) Copy the current immutable object with elements that replace the content ofselectedOptions.final ActionwithSelectedOptions(Iterable<? extends Option> elements) Copy the current immutable object with elements that replace the content ofselectedOptions.final ActionCopy the current immutable object by setting a present value for the optionaltextattribute.final ActionCopy the current immutable object by setting an optional value for thetextattribute.final ActionwithType(ActionType value) Copy the current immutable object by setting a value for thetypeattribute.final ActionCopy the current immutable object by setting a present value for the optionalurlattribute.final ActionCopy the current immutable object by setting an optional value for theurlattribute.final ActionCopy the current immutable object by setting a present value for the optionalvalueattribute.final ActionCopy the current immutable object by setting an optional value for thevalueattribute.
-
Method Details
-
getName
-
getType
-
getText
-
getValue
-
getConfirm
- Specified by:
getConfirmin interfaceActionIF- Returns:
- The value of the
confirmattribute
-
getUrl
-
getRawStyle
- Specified by:
getRawStylein interfaceActionIF- Returns:
- The value of the
rawStyleattribute
-
getButtonStyle
- Specified by:
getButtonStylein interfaceActionIF- Returns:
- The computed-at-construction value of the
buttonStyleattribute
-
getOptions
- Specified by:
getOptionsin interfaceActionIF- Returns:
- The value of the
optionsattribute
-
getSelectedOptions
- Specified by:
getSelectedOptionsin interfaceActionIF- Returns:
- The value of the
selectedOptionsattribute
-
getDataSource
- Specified by:
getDataSourcein interfaceActionIF- Returns:
- The value of the
dataSourceattribute
-
getMinQueryLength
- Specified by:
getMinQueryLengthin interfaceActionIF- Returns:
- The value of the
minQueryLengthattribute
-
withName
Copy the current immutable object by setting a present value for the optionalnameattribute.- Parameters:
value- The value for name,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withName
Copy the current immutable object by setting an optional value for thenameattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for name- 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
-
withText
Copy the current immutable object by setting a present value for the optionaltextattribute.- Parameters:
value- The value for text,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withText
Copy the current immutable object by setting an optional value for thetextattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for text- 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
-
withConfirm
Copy the current immutable object by setting a present value for the optionalconfirmattribute.- Parameters:
value- The value for confirm,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withConfirm
Copy the current immutable object by setting an optional value for theconfirmattribute. 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 confirm- Returns:
- A modified copy or
thisif not changed
-
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
-
withRawStyle
Copy the current immutable object by setting a present value for the optionalrawStyleattribute.- Parameters:
value- The value for rawStyle,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withRawStyle
Copy the current immutable object by setting an optional value for therawStyleattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for rawStyle- Returns:
- A modified copy or
thisif not changed
-
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
-
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
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
-
withDataSource
Copy the current immutable object by setting a present value for the optionaldataSourceattribute.- Parameters:
value- The value for dataSource,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withDataSource
Copy the current immutable object by setting an optional value for thedataSourceattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for dataSource- 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 ofActionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,type,text,value,confirm,url,rawStyle,buttonStyle,options,selectedOptions,dataSource,minQueryLength. -
toString
Prints the immutable valueActionwith attribute values. -
copyOf
Creates an immutable copy of aActionIFvalue. 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 Action instance
-
builder
Creates a builder forAction.Action.builder() .setName(Optional<String>) // optionalname.setType(com.hubspot.slack.client.models.actions.ActionType) // requiredtype.setText(Optional<String>) // optionaltext.setValue(Optional<String>) // optionalvalue.setConfirm(Optional<Confirm>) // optionalconfirm.setUrl(Optional<String>) // optionalurl.setRawStyle(Optional<String>) // optionalrawStyle.addOptions|addAllOptions(Option) //optionselements .addSelectedOptions|addAllSelectedOptions(Option) //selectedOptionselements .setDataSource(Optional<com.hubspot.slack.client.models.actions.SlackDataSource>) // optionaldataSource.setMinQueryLength(Optional<Integer>) // optionalminQueryLength.build();- Returns:
- A new Action builder
-