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().

  • Method Details

    • getName

      public Optional<String> getName()
      Specified by:
      getName in interface ActionIF
      Returns:
      The value of the name attribute
    • getType

      public ActionType getType()
      Specified by:
      getType in interface ActionIF
      Returns:
      The value of the type attribute
    • getText

      public Optional<String> getText()
      Specified by:
      getText in interface ActionIF
      Returns:
      The value of the text attribute
    • getValue

      public Optional<String> getValue()
      Specified by:
      getValue in interface ActionIF
      Returns:
      The value of the value attribute
    • getConfirm

      public Optional<Confirm> getConfirm()
      Specified by:
      getConfirm in interface ActionIF
      Returns:
      The value of the confirm attribute
    • getUrl

      public Optional<String> getUrl()
      Specified by:
      getUrl in interface ActionIF
      Returns:
      The value of the url attribute
    • getRawStyle

      public Optional<String> getRawStyle()
      Specified by:
      getRawStyle in interface ActionIF
      Returns:
      The value of the rawStyle attribute
    • getButtonStyle

      public Optional<ButtonStyle> getButtonStyle()
      Specified by:
      getButtonStyle in interface ActionIF
      Returns:
      The computed-at-construction value of the buttonStyle attribute
    • getOptions

      public List<Option> getOptions()
      Specified by:
      getOptions in interface ActionIF
      Returns:
      The value of the options attribute
    • getSelectedOptions

      public List<Option> getSelectedOptions()
      Specified by:
      getSelectedOptions in interface ActionIF
      Returns:
      The value of the selectedOptions attribute
    • getDataSource

      public Optional<SlackDataSource> getDataSource()
      Specified by:
      getDataSource in interface ActionIF
      Returns:
      The value of the dataSource attribute
    • getMinQueryLength

      public Optional<Integer> getMinQueryLength()
      Specified by:
      getMinQueryLength in interface ActionIF
      Returns:
      The value of the minQueryLength attribute
    • withName

      public final Action withName(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional name attribute.
      Parameters:
      value - The value for name, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withName

      public final Action withName(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the name attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for name
      Returns:
      A modified copy or this if not changed
    • withType

      public final Action withType(ActionType value)
      Copy the current immutable object by setting a value for the type attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy or the this object
    • withText

      public final Action withText(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional text attribute.
      Parameters:
      value - The value for text, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withText

      public final Action withText(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the text attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for text
      Returns:
      A modified copy or this if not changed
    • withValue

      public final Action withValue(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional value attribute.
      Parameters:
      value - The value for value, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withValue

      public final Action withValue(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the value attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for value
      Returns:
      A modified copy or this if not changed
    • withConfirm

      public final Action withConfirm(@Nullable Confirm value)
      Copy the current immutable object by setting a present value for the optional confirm attribute.
      Parameters:
      value - The value for confirm, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withConfirm

      public final Action withConfirm(Optional<? extends Confirm> optional)
      Copy the current immutable object by setting an optional value for the confirm attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for confirm
      Returns:
      A modified copy or this if not changed
    • withUrl

      public final Action withUrl(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional url attribute.
      Parameters:
      value - The value for url, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withUrl

      public final Action withUrl(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the url attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for url
      Returns:
      A modified copy or this if not changed
    • withRawStyle

      public final Action withRawStyle(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional rawStyle attribute.
      Parameters:
      value - The value for rawStyle, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withRawStyle

      public final Action withRawStyle(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the rawStyle attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for rawStyle
      Returns:
      A modified copy or this if not changed
    • withOptions

      public final Action withOptions(Option... elements)
      Copy the current immutable object with elements that replace the content of options.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withOptions

      public final Action withOptions(Iterable<? extends Option> elements)
      Copy the current immutable object with elements that replace the content of options. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of options elements to set
      Returns:
      A modified copy or this if not changed
    • withSelectedOptions

      public final Action withSelectedOptions(Option... elements)
      Copy the current immutable object with elements that replace the content of selectedOptions.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withSelectedOptions

      public final Action withSelectedOptions(Iterable<? extends Option> elements)
      Copy the current immutable object with elements that replace the content of selectedOptions. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of selectedOptions elements to set
      Returns:
      A modified copy or this if not changed
    • withDataSource

      public final Action withDataSource(@Nullable SlackDataSource value)
      Copy the current immutable object by setting a present value for the optional dataSource attribute.
      Parameters:
      value - The value for dataSource, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withDataSource

      public final Action withDataSource(Optional<? extends SlackDataSource> optional)
      Copy the current immutable object by setting an optional value for the dataSource attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for dataSource
      Returns:
      A modified copy or this if not changed
    • withMinQueryLength

      public final Action withMinQueryLength(@Nullable Integer value)
      Copy the current immutable object by setting a present value for the optional minQueryLength attribute.
      Parameters:
      value - The value for minQueryLength, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withMinQueryLength

      public final Action withMinQueryLength(Optional<Integer> optional)
      Copy the current immutable object by setting an optional value for the minQueryLength attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for minQueryLength
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of Action that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: name, type, text, value, confirm, url, rawStyle, buttonStyle, options, selectedOptions, dataSource, minQueryLength.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value Action with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static Action copyOf(ActionIF instance)
      Creates an immutable copy of a ActionIF value. 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

      public static Action.Builder builder()
      Creates a builder for Action.
       Action.builder()
          .setName(Optional<String>) // optional name
          .setType(com.hubspot.slack.client.models.actions.ActionType) // required type
          .setText(Optional<String>) // optional text
          .setValue(Optional<String>) // optional value
          .setConfirm(Optional<Confirm>) // optional confirm
          .setUrl(Optional<String>) // optional url
          .setRawStyle(Optional<String>) // optional rawStyle
          .addOptions|addAllOptions(Option) // options elements
          .addSelectedOptions|addAllSelectedOptions(Option) // selectedOptions elements
          .setDataSource(Optional<com.hubspot.slack.client.models.actions.SlackDataSource>) // optional dataSource
          .setMinQueryLength(Optional<Integer>) // optional minQueryLength
          .build();
       
      Returns:
      A new Action builder