Class SlashCommandSubmission

java.lang.Object
com.hubspot.slack.client.models.commands.SlashCommandSubmission
All Implemented Interfaces:
SlashCommandSubmissionIF

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

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

  • Method Details

    • getToken

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

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

      public String getTeamDomain()
      Specified by:
      getTeamDomain in interface SlashCommandSubmissionIF
      Returns:
      The value of the teamDomain attribute
    • getEnterpriseId

      public Optional<String> getEnterpriseId()
      Specified by:
      getEnterpriseId in interface SlashCommandSubmissionIF
      Returns:
      The value of the enterpriseId attribute
    • getEnterpriseName

      public Optional<String> getEnterpriseName()
      Specified by:
      getEnterpriseName in interface SlashCommandSubmissionIF
      Returns:
      The value of the enterpriseName attribute
    • getChannelId

      public String getChannelId()
      Specified by:
      getChannelId in interface SlashCommandSubmissionIF
      Returns:
      The value of the channelId attribute
    • getChannelName

      public String getChannelName()
      Specified by:
      getChannelName in interface SlashCommandSubmissionIF
      Returns:
      The value of the channelName attribute
    • getUserId

      public String getUserId()
      Specified by:
      getUserId in interface SlashCommandSubmissionIF
      Returns:
      The value of the userId attribute
    • getCommand

      public String getCommand()
      Specified by:
      getCommand in interface SlashCommandSubmissionIF
      Returns:
      The value of the command attribute
    • getText

      public String getText()
      Specified by:
      getText in interface SlashCommandSubmissionIF
      Returns:
      The value of the text attribute
    • getResponseUrl

      public String getResponseUrl()
      Specified by:
      getResponseUrl in interface SlashCommandSubmissionIF
      Returns:
      The value of the responseUrl attribute
    • getTriggerId

      public String getTriggerId()
      Specified by:
      getTriggerId in interface SlashCommandSubmissionIF
      Returns:
      The value of the triggerId attribute
    • getUserName

      @Deprecated public String getUserName()
      Deprecated.
      The user_name field is being phased out https://api.slack.com/changelog/2017-09-the-one-about-usernames
      Specified by:
      getUserName in interface SlashCommandSubmissionIF
    • withToken

      public final SlashCommandSubmission 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
    • withTeamId

      public final SlashCommandSubmission 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
    • withTeamDomain

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

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

      public final SlashCommandSubmission withEnterpriseId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the enterpriseId 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 enterpriseId
      Returns:
      A modified copy or this if not changed
    • withEnterpriseName

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

      public final SlashCommandSubmission withEnterpriseName(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the enterpriseName 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 enterpriseName
      Returns:
      A modified copy or this if not changed
    • withChannelId

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

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

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

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

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

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of SlashCommandSubmission 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: token, teamId, teamDomain, enterpriseId, enterpriseName, channelId, channelName, userId, command, text, responseUrl, triggerId, userName.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static SlashCommandSubmission.Builder builder()
      Creates a builder for SlashCommandSubmission.
       SlashCommandSubmission.builder()
          .setToken(String) // required token
          .setTeamId(String) // required teamId
          .setTeamDomain(String) // required teamDomain
          .setEnterpriseId(Optional<String>) // optional enterpriseId
          .setEnterpriseName(Optional<String>) // optional enterpriseName
          .setChannelId(String) // required channelId
          .setChannelName(String) // required channelName
          .setUserId(String) // required userId
          .setCommand(String) // required command
          .setText(String) // required text
          .setResponseUrl(String) // required responseUrl
          .setTriggerId(String) // required triggerId
          .setUserName(String) // required userName
          .build();
       
      Returns:
      A new SlashCommandSubmission builder