Class ViewResponseAction.Builder

java.lang.Object
com.hubspot.slack.client.models.interaction.ViewResponseAction.Builder
Enclosing class:
ViewResponseAction

@Generated(from="ViewResponseActionIF", generator="Immutables") @NotThreadSafe public static final class ViewResponseAction.Builder extends Object
Builds instances of type ViewResponseAction. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final ViewResponseAction.Builder from(ViewResponseActionIF instance)
      Fill a builder with attribute values from the provided ViewResponseActionIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setResponseAction

      public final ViewResponseAction.Builder setResponseAction(String responseAction)
      Initializes the value for the responseAction attribute.
      Parameters:
      responseAction - The value for responseAction
      Returns:
      this builder for use in a chained invocation
    • setView

      public final ViewResponseAction.Builder setView(@Nullable ModalViewPayload view)
      Initializes the optional value view to view.
      Parameters:
      view - The value for view, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setView

      public final ViewResponseAction.Builder setView(Optional<? extends ModalViewPayload> view)
      Initializes the optional value view to view.
      Parameters:
      view - The value for view
      Returns:
      this builder for use in a chained invocation
    • putErrors

      public final ViewResponseAction.Builder putErrors(String key, String value)
      Put one entry to the errors map.
      Parameters:
      key - The key in the errors map
      value - The associated value in the errors map
      Returns:
      this builder for use in a chained invocation
    • putErrors

      public final ViewResponseAction.Builder putErrors(Map.Entry<String,? extends String> entry)
      Put one entry to the errors map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • setErrors

      public final ViewResponseAction.Builder setErrors(Map<String,? extends String> entries)
      Sets or replaces all mappings from the specified map as entries for the errors map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the errors map
      Returns:
      this builder for use in a chained invocation
    • putAllErrors

      public final ViewResponseAction.Builder putAllErrors(Map<String,? extends String> entries)
      Put all mappings from the specified map as entries to errors map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the errors map
      Returns:
      this builder for use in a chained invocation
    • build

      public ViewResponseAction build()
      Builds a new ViewResponseAction.
      Returns:
      An immutable instance of ViewResponseAction
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing