Class ViewMultiExternalSelect

java.lang.Object
com.hubspot.slack.client.models.interaction.views.ViewMultiExternalSelect
All Implemented Interfaces:
ViewInput, ViewMultiExternalSelectIF, ViewMultiSelect

@Generated(from="ViewMultiExternalSelectIF", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ViewMultiExternalSelect extends Object implements ViewMultiExternalSelectIF
Immutable implementation of ViewMultiExternalSelectIF.

Use the builder to create immutable instances: ViewMultiExternalSelect.builder().

  • Method Details

    • getType

      public ViewInputType getType()
      Specified by:
      getType in interface ViewInput
      Returns:
      The value of the type attribute
    • getStringValue

      public Optional<String> getStringValue()
      Specified by:
      getStringValue in interface ViewInput
      Returns:
      The value of the stringValue attribute
    • getSelectedOptions

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

      public final ViewMultiExternalSelect withType(ViewInputType 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
    • withStringValue

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

      public final ViewMultiExternalSelect withStringValue(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the stringValue 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 stringValue
      Returns:
      A modified copy or this if not changed
    • withSelectedOptions

      public final ViewMultiExternalSelect 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 ViewMultiExternalSelect 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
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ViewMultiExternalSelect 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: type, stringValue, selectedOptions.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ViewMultiExternalSelect copyOf(ViewMultiExternalSelectIF instance)
      Creates an immutable copy of a ViewMultiExternalSelectIF 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 ViewMultiExternalSelect instance
    • builder

      public static ViewMultiExternalSelect.Builder builder()
      Creates a builder for ViewMultiExternalSelect.
       ViewMultiExternalSelect.builder()
          .setType(com.hubspot.slack.client.models.interaction.views.ViewInputType) // required type
          .setStringValue(Optional<String>) // optional stringValue
          .addSelectedOptions|addAllSelectedOptions(com.hubspot.slack.client.models.blocks.objects.Option) // selectedOptions elements
          .build();
       
      Returns:
      A new ViewMultiExternalSelect builder