Class ViewStaticSelect

java.lang.Object
com.hubspot.slack.client.models.interaction.views.ViewStaticSelect
All Implemented Interfaces:
ViewInput, ViewStaticSelectIF

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

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

  • Method Details

    • getType

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

      public Optional<Option> getSelectedOption()
      Specified by:
      getSelectedOption in interface ViewStaticSelectIF
      Returns:
      The value of the selectedOption attribute
    • withType

      public final ViewStaticSelect 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
    • withSelectedOption

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

      public final ViewStaticSelect withSelectedOption(Optional<? extends Option> optional)
      Copy the current immutable object by setting an optional value for the selectedOption 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 selectedOption
      Returns:
      A modified copy or this if not changed
    • equals

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

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

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

      public static ViewStaticSelect.Builder builder()
      Creates a builder for ViewStaticSelect.
       ViewStaticSelect.builder()
          .setType(com.hubspot.slack.client.models.interaction.views.ViewInputType) // required type
          .setSelectedOption(Optional<com.hubspot.slack.client.models.blocks.objects.Option>) // optional selectedOption
          .build();
       
      Returns:
      A new ViewStaticSelect builder