Class ViewRadioButtonGroup

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

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

Use the builder to create immutable instances: ViewRadioButtonGroup.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 ViewRadioButtonGroupIF
      Returns:
      The value of the selectedOption attribute
    • withType

      public final ViewRadioButtonGroup 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 ViewRadioButtonGroup 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 ViewRadioButtonGroup 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 ViewRadioButtonGroup 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 ViewRadioButtonGroup with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

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

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