Class ModalViewResponse

java.lang.Object
com.hubspot.slack.client.models.response.views.ModalViewResponse
All Implemented Interfaces:
ModalViewResponseIF, ViewResponseBase, ModalViewPayloadBase, ViewPayloadBase

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

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

  • Method Details

    • getBlocks

      public List<Block> getBlocks()
      Specified by:
      getBlocks in interface ViewPayloadBase
      Returns:
      The value of the blocks attribute
    • getPrivateMetadata

      public Optional<String> getPrivateMetadata()
      Specified by:
      getPrivateMetadata in interface ViewPayloadBase
      Returns:
      The value of the privateMetadata attribute
    • getCallbackId

      public Optional<String> getCallbackId()
      Specified by:
      getCallbackId in interface ViewPayloadBase
      Returns:
      The value of the callbackId attribute
    • getExternalId

      public Optional<String> getExternalId()
      Specified by:
      getExternalId in interface ViewPayloadBase
      Returns:
      The value of the externalId attribute
    • getType

      public String getType()
      Specified by:
      getType in interface ModalViewPayloadBase
      Specified by:
      getType in interface ViewPayloadBase
      Returns:
      The computed-at-construction value of the type attribute
    • getTitle

      public Text getTitle()
      Specified by:
      getTitle in interface ModalViewPayloadBase
      Returns:
      The value of the title attribute
    • getCloseButtonText

      public Optional<Text> getCloseButtonText()
      Specified by:
      getCloseButtonText in interface ModalViewPayloadBase
      Returns:
      The value of the closeButtonText attribute
    • getSubmitButtonText

      public Optional<Text> getSubmitButtonText()
      Specified by:
      getSubmitButtonText in interface ModalViewPayloadBase
      Returns:
      The value of the submitButtonText attribute
    • getClearOnClose

      public Optional<Boolean> getClearOnClose()
      Specified by:
      getClearOnClose in interface ModalViewPayloadBase
      Returns:
      The value of the clearOnClose attribute
    • getNotifyOnClose

      public Optional<Boolean> getNotifyOnClose()
      Specified by:
      getNotifyOnClose in interface ModalViewPayloadBase
      Returns:
      The value of the notifyOnClose attribute
    • getAppId

      public String getAppId()
      Specified by:
      getAppId in interface ViewResponseBase
      Returns:
      The value of the appId attribute
    • getBotId

      public String getBotId()
      Specified by:
      getBotId in interface ViewResponseBase
      Returns:
      The value of the botId attribute
    • getCurrentViewId

      public String getCurrentViewId()
      Specified by:
      getCurrentViewId in interface ViewResponseBase
      Returns:
      The value of the currentViewId attribute
    • getRootViewId

      public String getRootViewId()
      Specified by:
      getRootViewId in interface ViewResponseBase
      Returns:
      The value of the rootViewId attribute
    • getTeamId

      public String getTeamId()
      Specified by:
      getTeamId in interface ViewResponseBase
      Returns:
      The value of the teamId attribute
    • getStateValues

      public StateBlock getStateValues()
      Specified by:
      getStateValues in interface ViewResponseBase
      Returns:
      The value of the stateValues attribute
    • getHash

      public String getHash()
      Specified by:
      getHash in interface ViewResponseBase
      Returns:
      The value of the hash attribute
    • getPreviousViewId

      public Optional<String> getPreviousViewId()
      Specified by:
      getPreviousViewId in interface ViewResponseBase
      Returns:
      The value of the previousViewId attribute
    • withBlocks

      public final ModalViewResponse withBlocks(Block... elements)
      Copy the current immutable object with elements that replace the content of blocks.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withBlocks

      public final ModalViewResponse withBlocks(Iterable<? extends Block> elements)
      Copy the current immutable object with elements that replace the content of blocks. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of blocks elements to set
      Returns:
      A modified copy or this if not changed
    • withPrivateMetadata

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

      public final ModalViewResponse withPrivateMetadata(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the privateMetadata attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for privateMetadata
      Returns:
      A modified copy or this if not changed
    • withCallbackId

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

      public final ModalViewResponse withCallbackId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the callbackId attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for callbackId
      Returns:
      A modified copy or this if not changed
    • withExternalId

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

      public final ModalViewResponse withExternalId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the externalId attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for externalId
      Returns:
      A modified copy or this if not changed
    • withTitle

      public final ModalViewResponse withTitle(Text value)
      Copy the current immutable object by setting a value for the title attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for title
      Returns:
      A modified copy or the this object
    • withCloseButtonText

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

      public final ModalViewResponse withCloseButtonText(Optional<? extends Text> optional)
      Copy the current immutable object by setting an optional value for the closeButtonText 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 closeButtonText
      Returns:
      A modified copy or this if not changed
    • withSubmitButtonText

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

      public final ModalViewResponse withSubmitButtonText(Optional<? extends Text> optional)
      Copy the current immutable object by setting an optional value for the submitButtonText 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 submitButtonText
      Returns:
      A modified copy or this if not changed
    • withClearOnClose

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

      public final ModalViewResponse withClearOnClose(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the clearOnClose attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for clearOnClose
      Returns:
      A modified copy or this if not changed
    • withNotifyOnClose

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

      public final ModalViewResponse withNotifyOnClose(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the notifyOnClose attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for notifyOnClose
      Returns:
      A modified copy or this if not changed
    • withAppId

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

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

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

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

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

      public final ModalViewResponse withStateValues(StateBlock value)
      Copy the current immutable object by setting a value for the stateValues attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for stateValues
      Returns:
      A modified copy or the this object
    • withHash

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

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

      public final ModalViewResponse withPreviousViewId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the previousViewId attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for previousViewId
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ModalViewResponse 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: blocks, privateMetadata, callbackId, externalId, type, title, closeButtonText, submitButtonText, clearOnClose, notifyOnClose, appId, botId, currentViewId, rootViewId, teamId, stateValues, hash, previousViewId.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ModalViewResponse.Builder builder()
      Creates a builder for ModalViewResponse.
       ModalViewResponse.builder()
          .addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) // blocks elements
          .setPrivateMetadata(Optional<String>) // optional privateMetadata
          .setCallbackId(Optional<String>) // optional callbackId
          .setExternalId(Optional<String>) // optional externalId
          .setTitle(com.hubspot.slack.client.models.blocks.objects.Text) // required title
          .setCloseButtonText(Optional<com.hubspot.slack.client.models.blocks.objects.Text>) // optional closeButtonText
          .setSubmitButtonText(Optional<com.hubspot.slack.client.models.blocks.objects.Text>) // optional submitButtonText
          .setClearOnClose(Optional<Boolean>) // optional clearOnClose
          .setNotifyOnClose(Optional<Boolean>) // optional notifyOnClose
          .setAppId(String) // required appId
          .setBotId(String) // required botId
          .setCurrentViewId(String) // required currentViewId
          .setRootViewId(String) // required rootViewId
          .setTeamId(String) // required teamId
          .setStateValues(com.hubspot.slack.client.models.response.views.StateBlock) // required stateValues
          .setHash(String) // required hash
          .setPreviousViewId(Optional<String>) // optional previousViewId
          .build();
       
      Returns:
      A new ModalViewResponse builder