Class OAuthV2Credentials

java.lang.Object
com.hubspot.slack.client.models.auth.OAuthV2CredentialsIF
com.hubspot.slack.client.models.auth.OAuthV2Credentials

@Generated(from="OAuthV2CredentialsIF", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class OAuthV2Credentials extends OAuthV2CredentialsIF
Immutable implementation of OAuthV2CredentialsIF.

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

  • Method Details

    • getBotAccessToken

      public String getBotAccessToken()
      Specified by:
      getBotAccessToken in class OAuthV2CredentialsIF
      Returns:
      The value of the botAccessToken attribute
    • getTeam

      public SlackTeamLite getTeam()
      Specified by:
      getTeam in class OAuthV2CredentialsIF
      Returns:
      The value of the team attribute
    • getScope

      public Optional<String> getScope()
      Specified by:
      getScope in class OAuthV2CredentialsIF
      Returns:
      The value of the scope attribute
    • getAuthedUser

      public SlackUserLite getAuthedUser()
      Specified by:
      getAuthedUser in class OAuthV2CredentialsIF
      Returns:
      The value of the authedUser attribute
    • getBotUserId

      public String getBotUserId()
      Specified by:
      getBotUserId in class OAuthV2CredentialsIF
      Returns:
      The value of the botUserId attribute
    • withBotAccessToken

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

      public final OAuthV2Credentials withTeam(SlackTeamLite 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
    • withScope

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

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of OAuthV2Credentials 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: botAccessToken, team, scope, authedUser, botUserId.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static OAuthV2Credentials.Builder builder()
      Creates a builder for OAuthV2Credentials.
       OAuthV2Credentials.builder()
          .setBotAccessToken(String) // required botAccessToken
          .setTeam(com.hubspot.slack.client.models.teams.SlackTeamLite) // required team
          .setScope(Optional<String>) // optional scope
          .setAuthedUser(com.hubspot.slack.client.models.users.SlackUserLite) // required authedUser
          .setBotUserId(String) // required botUserId
          .build();
       
      Returns:
      A new OAuthV2Credentials builder