Class ModalViewResponse.Builder

java.lang.Object
com.hubspot.slack.client.models.response.views.ModalViewResponse.Builder
Enclosing class:
ModalViewResponse

@Generated(from="ModalViewResponseIF", generator="Immutables") @NotThreadSafe public static final class ModalViewResponse.Builder extends Object
Builds instances of type ModalViewResponse. 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 ModalViewResponse.Builder from(ModalViewPayloadBase instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.views.ModalViewPayloadBase instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final ModalViewResponse.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
    • from

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

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

      public final ModalViewResponse.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 ModalViewResponse.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 ModalViewResponse.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 ModalViewResponse.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 ModalViewResponse.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 ModalViewResponse.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 ModalViewResponse.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 ModalViewResponse.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 ModalViewResponse.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 ModalViewResponse.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
    • setTitle

      public final ModalViewResponse.Builder setTitle(Text title)
      Initializes the value for the title attribute.
      Parameters:
      title - The value for title
      Returns:
      this builder for use in a chained invocation
    • setCloseButtonText

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

      public final ModalViewResponse.Builder setCloseButtonText(Optional<? extends Text> closeButtonText)
      Initializes the optional value closeButtonText to closeButtonText.
      Parameters:
      closeButtonText - The value for closeButtonText
      Returns:
      this builder for use in a chained invocation
    • setSubmitButtonText

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

      public final ModalViewResponse.Builder setSubmitButtonText(Optional<? extends Text> submitButtonText)
      Initializes the optional value submitButtonText to submitButtonText.
      Parameters:
      submitButtonText - The value for submitButtonText
      Returns:
      this builder for use in a chained invocation
    • setClearOnClose

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

      public final ModalViewResponse.Builder setClearOnClose(Optional<Boolean> clearOnClose)
      Initializes the optional value clearOnClose to clearOnClose.
      Parameters:
      clearOnClose - The value for clearOnClose
      Returns:
      this builder for use in a chained invocation
    • setNotifyOnClose

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

      public final ModalViewResponse.Builder setNotifyOnClose(Optional<Boolean> notifyOnClose)
      Initializes the optional value notifyOnClose to notifyOnClose.
      Parameters:
      notifyOnClose - The value for notifyOnClose
      Returns:
      this builder for use in a chained invocation
    • setAppId

      public final ModalViewResponse.Builder setAppId(String appId)
      Initializes the value for the appId attribute.
      Parameters:
      appId - The value for appId
      Returns:
      this builder for use in a chained invocation
    • setBotId

      public final ModalViewResponse.Builder setBotId(String botId)
      Initializes the value for the botId attribute.
      Parameters:
      botId - The value for botId
      Returns:
      this builder for use in a chained invocation
    • setCurrentViewId

      public final ModalViewResponse.Builder setCurrentViewId(String currentViewId)
      Initializes the value for the currentViewId attribute.
      Parameters:
      currentViewId - The value for currentViewId
      Returns:
      this builder for use in a chained invocation
    • setRootViewId

      public final ModalViewResponse.Builder setRootViewId(String rootViewId)
      Initializes the value for the rootViewId attribute.
      Parameters:
      rootViewId - The value for rootViewId
      Returns:
      this builder for use in a chained invocation
    • setTeamId

      public final ModalViewResponse.Builder setTeamId(String teamId)
      Initializes the value for the teamId attribute.
      Parameters:
      teamId - The value for teamId
      Returns:
      this builder for use in a chained invocation
    • setStateValues

      public final ModalViewResponse.Builder setStateValues(StateBlock stateValues)
      Initializes the value for the stateValues attribute.
      Parameters:
      stateValues - The value for stateValues
      Returns:
      this builder for use in a chained invocation
    • setHash

      public final ModalViewResponse.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
    • setPreviousViewId

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

      public final ModalViewResponse.Builder setPreviousViewId(Optional<String> previousViewId)
      Initializes the optional value previousViewId to previousViewId.
      Parameters:
      previousViewId - The value for previousViewId
      Returns:
      this builder for use in a chained invocation
    • build

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