Class ViewResponseAction

java.lang.Object
com.hubspot.slack.client.models.interaction.ViewResponseAction
All Implemented Interfaces:
ViewResponseActionIF

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

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

  • Method Details

    • getResponseAction

      public String getResponseAction()
      Specified by:
      getResponseAction in interface ViewResponseActionIF
      Returns:
      The value of the responseAction attribute
    • getView

      public Optional<ModalViewPayload> getView()
      Specified by:
      getView in interface ViewResponseActionIF
      Returns:
      The value of the view attribute
    • getErrors

      public Map<String,String> getErrors()
      Specified by:
      getErrors in interface ViewResponseActionIF
      Returns:
      The value of the errors attribute
    • withResponseAction

      public final ViewResponseAction withResponseAction(String value)
      Copy the current immutable object by setting a value for the responseAction attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for responseAction
      Returns:
      A modified copy or the this object
    • withView

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

      public final ViewResponseAction withView(Optional<? extends ModalViewPayload> optional)
      Copy the current immutable object by setting an optional value for the view 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 view
      Returns:
      A modified copy or this if not changed
    • withErrors

      public final ViewResponseAction withErrors(Map<String,? extends String> entries)
      Copy the current immutable object by replacing the errors map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to replace the errors map
      Returns:
      A modified copy or this if not changed
    • equals

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

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

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

      public static ViewResponseAction.Builder builder()
      Creates a builder for ViewResponseAction.
       ViewResponseAction.builder()
          .setResponseAction(String) // required responseAction
          .setView(Optional<com.hubspot.slack.client.models.views.ModalViewPayload>) // optional view
          .putErrors|putAllErrors(String => String) // errors mappings
          .build();
       
      Returns:
      A new ViewResponseAction builder