Class BotCredentials.Builder
java.lang.Object
com.hubspot.slack.client.models.auth.BotCredentials.Builder
- Enclosing class:
BotCredentials
@Generated(from="BotCredentialsIF",
generator="Immutables")
@NotThreadSafe
public static final class BotCredentials.Builder
extends Object
Builds instances of type
BotCredentials.
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 newBotCredentials.final BotCredentials.Builderfrom(BotCredentialsIF instance) Fill a builder with attribute values from the providedBotCredentialsIFinstance.final BotCredentials.BuildersetBotAccessToken(String botAccessToken) Initializes the value for thebotAccessTokenattribute.final BotCredentials.BuildersetBotUserId(String botUserId) Initializes the value for thebotUserIdattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedBotCredentialsIFinstance. 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
-
setBotUserId
Initializes the value for thebotUserIdattribute.- Parameters:
botUserId- The value for botUserId- 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
-
build
Builds a newBotCredentials.- Returns:
- An immutable instance of BotCredentials
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-