Class OAuthV2Credentials.Builder

java.lang.Object
com.hubspot.slack.client.models.auth.OAuthV2Credentials.Builder
Enclosing class:
OAuthV2Credentials

@Generated(from="OAuthV2CredentialsIF", generator="Immutables") @NotThreadSafe public static final class OAuthV2Credentials.Builder extends Object
Builds instances of type OAuthV2Credentials. 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 OAuthV2Credentials.Builder from(OAuthV2CredentialsIF instance)
      Fill a builder with attribute values from the provided OAuthV2CredentialsIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setBotAccessToken

      public final OAuthV2Credentials.Builder setBotAccessToken(String botAccessToken)
      Initializes the value for the botAccessToken attribute.
      Parameters:
      botAccessToken - The value for botAccessToken
      Returns:
      this builder for use in a chained invocation
    • setTeam

      public final OAuthV2Credentials.Builder setTeam(SlackTeamLite team)
      Initializes the value for the team attribute.
      Parameters:
      team - The value for team
      Returns:
      this builder for use in a chained invocation
    • setScope

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

      public final OAuthV2Credentials.Builder setScope(Optional<String> scope)
      Initializes the optional value scope to scope.
      Parameters:
      scope - The value for scope
      Returns:
      this builder for use in a chained invocation
    • setAuthedUser

      public final OAuthV2Credentials.Builder setAuthedUser(SlackUserLite authedUser)
      Initializes the value for the authedUser attribute.
      Parameters:
      authedUser - The value for authedUser
      Returns:
      this builder for use in a chained invocation
    • setBotUserId

      public final OAuthV2Credentials.Builder setBotUserId(String botUserId)
      Initializes the value for the botUserId attribute.
      Parameters:
      botUserId - The value for botUserId
      Returns:
      this builder for use in a chained invocation
    • build

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