Class ViewSubmission

java.lang.Object
com.hubspot.slack.client.models.interaction.ViewSubmission
All Implemented Interfaces:
SlackInteractiveCallback, ViewSubmissionIF

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

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

  • Method Details

    • getType

      public InteractiveCallbackType getType()
      Specified by:
      getType in interface SlackInteractiveCallback
      Returns:
      The value of the type attribute
    • getToken

      public String getToken()
      Specified by:
      getToken in interface SlackInteractiveCallback
      Returns:
      The value of the token attribute
    • getTeam

      public SlackTeam getTeam()
      Specified by:
      getTeam in interface SlackInteractiveCallback
      Returns:
      The value of the team attribute
    • getUser

      public SlackUserLite getUser()
      Specified by:
      getUser in interface SlackInteractiveCallback
      Returns:
      The value of the user attribute
    • getView

      public ViewInteractionPayload getView()
      Specified by:
      getView in interface ViewSubmissionIF
      Returns:
      The value of the view attribute
    • getCallbackId

      @Nullable public String getCallbackId()
      Specified by:
      getCallbackId in interface SlackInteractiveCallback
      Specified by:
      getCallbackId in interface ViewSubmissionIF
      Returns:
      The value of the callbackId attribute
    • withType

      public final ViewSubmission withType(InteractiveCallbackType value)
      Copy the current immutable object by setting a value for the type attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy or the this object
    • withToken

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

      public final ViewSubmission withTeam(SlackTeam value)
      Copy the current immutable object by setting a value for the team attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for team
      Returns:
      A modified copy or the this object
    • withUser

      public final ViewSubmission withUser(SlackUserLite value)
      Copy the current immutable object by setting a value for the user attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for user
      Returns:
      A modified copy or the this object
    • withView

      public final ViewSubmission withView(ViewInteractionPayload value)
      Copy the current immutable object by setting a value for the view attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for view
      Returns:
      A modified copy or the this object
    • withCallbackId

      public final ViewSubmission withCallbackId(@Nullable String value)
      Copy the current immutable object by setting a value for the callbackId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for callbackId (can be null)
      Returns:
      A modified copy or the this object
    • equals

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

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

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

      public static ViewSubmission.Builder builder()
      Creates a builder for ViewSubmission.
       ViewSubmission.builder()
          .setType(com.hubspot.slack.client.models.interaction.InteractiveCallbackType) // required type
          .setToken(String) // required token
          .setTeam(com.hubspot.slack.client.models.teams.SlackTeam) // required team
          .setUser(com.hubspot.slack.client.models.users.SlackUserLite) // required user
          .setView(com.hubspot.slack.client.models.interaction.ViewInteractionPayload) // required view
          .setCallbackId(String | null) // nullable callbackId
          .build();
       
      Returns:
      A new ViewSubmission builder