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 Summary
Modifier and TypeMethodDescriptionbuild()Builds a newOAuthV2Credentials.from(OAuthV2CredentialsIF instance) Fill a builder with attribute values from the providedOAuthV2CredentialsIFinstance.setAuthedUser(SlackUserLite authedUser) Initializes the value for theauthedUserattribute.setBotAccessToken(String botAccessToken) Initializes the value for thebotAccessTokenattribute.setBotUserId(String botUserId) Initializes the value for thebotUserIdattribute.Initializes the optional valuescopeto scope.Initializes the optional valuescopeto scope.setTeam(SlackTeamLite team) Initializes the value for theteamattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedOAuthV2CredentialsIFinstance. 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:
thisbuilder for use in a chained invocation
-
setBotAccessToken
Initializes the value for thebotAccessTokenattribute.- Parameters:
botAccessToken- The value for botAccessToken- Returns:
thisbuilder for use in a chained invocation
-
setTeam
Initializes the value for theteamattribute.- Parameters:
team- The value for team- Returns:
thisbuilder for use in a chained invocation
-
setScope
Initializes the optional valuescopeto scope.- Parameters:
scope- The value for scope,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setScope
Initializes the optional valuescopeto scope.- Parameters:
scope- The value for scope- Returns:
thisbuilder for use in a chained invocation
-
setAuthedUser
Initializes the value for theauthedUserattribute.- Parameters:
authedUser- The value for authedUser- Returns:
thisbuilder for use in a chained invocation
-
setBotUserId
Initializes the value for thebotUserIdattribute.- Parameters:
botUserId- The value for botUserId- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newOAuthV2Credentials.- Returns:
- An immutable instance of OAuthV2Credentials
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-