Class ViewMultiStaticSelect

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

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

Use the builder to create immutable instances: ViewMultiStaticSelect.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 ViewMultiStaticSelect 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 ViewMultiStaticSelect 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 ViewMultiStaticSelect 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 ViewMultiStaticSelect 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 ViewMultiStaticSelect 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 ViewMultiStaticSelect 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 ViewMultiStaticSelect with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

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

      public static ViewMultiStaticSelect.Builder builder()
      Creates a builder for ViewMultiStaticSelect.
       ViewMultiStaticSelect.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 ViewMultiStaticSelect builder