@NotThreadSafe public static final class SlashCommandSubmission.Builder extends Object
SlashCommandSubmission.
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.
| Modifier and Type | Method and Description |
|---|---|
SlashCommandSubmission |
build()
Builds a new
SlashCommandSubmission. |
SlashCommandSubmission.Builder |
from(SlashCommandSubmissionIF instance)
Fill a builder with attribute values from the provided
SlashCommandSubmissionIF instance. |
SlashCommandSubmission.Builder |
setChannelId(String channelId)
Initializes the value for the
channelId attribute. |
SlashCommandSubmission.Builder |
setChannelName(String channelName)
Initializes the value for the
channelName attribute. |
SlashCommandSubmission.Builder |
setCommand(String command)
Initializes the value for the
command attribute. |
SlashCommandSubmission.Builder |
setEnterpriseId(Optional<String> enterpriseId)
Initializes the optional value
enterpriseId to enterpriseId. |
SlashCommandSubmission.Builder |
setEnterpriseId(String enterpriseId)
Initializes the optional value
enterpriseId to enterpriseId. |
SlashCommandSubmission.Builder |
setEnterpriseName(Optional<String> enterpriseName)
Initializes the optional value
enterpriseName to enterpriseName. |
SlashCommandSubmission.Builder |
setEnterpriseName(String enterpriseName)
Initializes the optional value
enterpriseName to enterpriseName. |
SlashCommandSubmission.Builder |
setResponseUrl(String responseUrl)
Initializes the value for the
responseUrl attribute. |
SlashCommandSubmission.Builder |
setTeamDomain(String teamDomain)
Initializes the value for the
teamDomain attribute. |
SlashCommandSubmission.Builder |
setTeamId(String teamId)
Initializes the value for the
teamId attribute. |
SlashCommandSubmission.Builder |
setText(String text)
Initializes the value for the
text attribute. |
SlashCommandSubmission.Builder |
setToken(String token)
Initializes the value for the
token attribute. |
SlashCommandSubmission.Builder |
setTriggerId(String triggerId)
Initializes the value for the
triggerId attribute. |
SlashCommandSubmission.Builder |
setUserId(String userId)
Initializes the value for the
userId attribute. |
SlashCommandSubmission.Builder |
setUserName(String userName)
Deprecated.
|
public final SlashCommandSubmission.Builder from(SlashCommandSubmissionIF instance)
SlashCommandSubmissionIF instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setToken(String token)
token attribute.token - The value for tokenthis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setTeamId(String teamId)
teamId attribute.teamId - The value for teamIdthis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setTeamDomain(String teamDomain)
teamDomain attribute.teamDomain - The value for teamDomainthis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setEnterpriseId(@Nullable String enterpriseId)
enterpriseId to enterpriseId.enterpriseId - The value for enterpriseId, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlashCommandSubmission.Builder setEnterpriseId(Optional<String> enterpriseId)
enterpriseId to enterpriseId.enterpriseId - The value for enterpriseIdthis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setEnterpriseName(@Nullable String enterpriseName)
enterpriseName to enterpriseName.enterpriseName - The value for enterpriseName, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlashCommandSubmission.Builder setEnterpriseName(Optional<String> enterpriseName)
enterpriseName to enterpriseName.enterpriseName - The value for enterpriseNamethis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setChannelId(String channelId)
channelId attribute.channelId - The value for channelIdthis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setChannelName(String channelName)
channelName attribute.channelName - The value for channelNamethis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setUserId(String userId)
userId attribute.userId - The value for userIdthis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setCommand(String command)
command attribute.command - The value for commandthis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setText(String text)
text attribute.text - The value for textthis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setResponseUrl(String responseUrl)
responseUrl attribute.responseUrl - The value for responseUrlthis builder for use in a chained invocationpublic final SlashCommandSubmission.Builder setTriggerId(String triggerId)
triggerId attribute.triggerId - The value for triggerIdthis builder for use in a chained invocation@Deprecated public final SlashCommandSubmission.Builder setUserName(String userName)
userName attribute.userName - The value for userNamethis builder for use in a chained invocationpublic SlashCommandSubmission build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
SlashCommandSubmission.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.