Class ViewInteractionPayload.Builder

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

@Generated(from="ViewInteractionPayloadIF", generator="Immutables") @NotThreadSafe public static final class ViewInteractionPayload.Builder extends Object
Builds instances of type ViewInteractionPayload. 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

      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.interaction.ViewInteractionPayloadIF instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final ViewInteractionPayload.Builder from(ViewPayloadBase instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.views.ViewPayloadBase instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setType

      public final ViewInteractionPayload.Builder setType(String type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • addBlocks

      public final ViewInteractionPayload.Builder addBlocks(Block element)
      Adds one element to blocks list.
      Parameters:
      element - A blocks element
      Returns:
      this builder for use in a chained invocation
    • addBlocks

      public final ViewInteractionPayload.Builder addBlocks(Block... elements)
      Adds elements to blocks list.
      Parameters:
      elements - An array of blocks elements
      Returns:
      this builder for use in a chained invocation
    • setBlocks

      public final ViewInteractionPayload.Builder setBlocks(Iterable<? extends Block> elements)
      Sets or replaces all elements for blocks list.
      Parameters:
      elements - An iterable of blocks elements
      Returns:
      this builder for use in a chained invocation
    • addAllBlocks

      public final ViewInteractionPayload.Builder addAllBlocks(Iterable<? extends Block> elements)
      Adds elements to blocks list.
      Parameters:
      elements - An iterable of blocks elements
      Returns:
      this builder for use in a chained invocation
    • setPrivateMetadata

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

      public final ViewInteractionPayload.Builder setPrivateMetadata(Optional<String> privateMetadata)
      Initializes the optional value privateMetadata to privateMetadata.
      Parameters:
      privateMetadata - The value for privateMetadata
      Returns:
      this builder for use in a chained invocation
    • setCallbackId

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

      public final ViewInteractionPayload.Builder setCallbackId(Optional<String> callbackId)
      Initializes the optional value callbackId to callbackId.
      Parameters:
      callbackId - The value for callbackId
      Returns:
      this builder for use in a chained invocation
    • setExternalId

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

      public final ViewInteractionPayload.Builder setExternalId(Optional<String> externalId)
      Initializes the optional value externalId to externalId.
      Parameters:
      externalId - The value for externalId
      Returns:
      this builder for use in a chained invocation
    • setState

      public final ViewInteractionPayload.Builder setState(StateValuesPayload state)
      Initializes the value for the state attribute.
      Parameters:
      state - The value for state
      Returns:
      this builder for use in a chained invocation
    • setHash

      public final ViewInteractionPayload.Builder setHash(String hash)
      Initializes the value for the hash attribute.
      Parameters:
      hash - The value for hash
      Returns:
      this builder for use in a chained invocation
    • build

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