Class SlashCommandSubmission.Builder
java.lang.Object
com.hubspot.slack.client.models.commands.SlashCommandSubmission.Builder
- Enclosing class:
SlashCommandSubmission
@Generated(from="SlashCommandSubmissionIF",
generator="Immutables")
@NotThreadSafe
public static final class SlashCommandSubmission.Builder
extends Object
Builds instances of type
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.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newSlashCommandSubmission.from(SlashCommandSubmissionIF instance) Fill a builder with attribute values from the providedSlashCommandSubmissionIFinstance.setChannelId(String channelId) Initializes the value for thechannelIdattribute.setChannelName(String channelName) Initializes the value for thechannelNameattribute.setCommand(String command) Initializes the value for thecommandattribute.setEnterpriseId(String enterpriseId) Initializes the optional valueenterpriseIdto enterpriseId.setEnterpriseId(Optional<String> enterpriseId) Initializes the optional valueenterpriseIdto enterpriseId.setEnterpriseName(String enterpriseName) Initializes the optional valueenterpriseNameto enterpriseName.setEnterpriseName(Optional<String> enterpriseName) Initializes the optional valueenterpriseNameto enterpriseName.setResponseUrl(String responseUrl) Initializes the value for theresponseUrlattribute.setTeamDomain(String teamDomain) Initializes the value for theteamDomainattribute.Initializes the value for theteamIdattribute.Initializes the value for thetextattribute.Initializes the value for thetokenattribute.setTriggerId(String triggerId) Initializes the value for thetriggerIdattribute.Initializes the value for theuserIdattribute.setUserName(String userName) Deprecated.
-
Method Details
-
from
Fill a builder with attribute values from the providedSlashCommandSubmissionIFinstance. 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
-
setToken
Initializes the value for thetokenattribute.- Parameters:
token- The value for token- Returns:
thisbuilder for use in a chained invocation
-
setTeamId
Initializes the value for theteamIdattribute.- Parameters:
teamId- The value for teamId- Returns:
thisbuilder for use in a chained invocation
-
setTeamDomain
Initializes the value for theteamDomainattribute.- Parameters:
teamDomain- The value for teamDomain- Returns:
thisbuilder for use in a chained invocation
-
setEnterpriseId
Initializes the optional valueenterpriseIdto enterpriseId.- Parameters:
enterpriseId- The value for enterpriseId,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setEnterpriseId
Initializes the optional valueenterpriseIdto enterpriseId.- Parameters:
enterpriseId- The value for enterpriseId- Returns:
thisbuilder for use in a chained invocation
-
setEnterpriseName
Initializes the optional valueenterpriseNameto enterpriseName.- Parameters:
enterpriseName- The value for enterpriseName,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setEnterpriseName
Initializes the optional valueenterpriseNameto enterpriseName.- Parameters:
enterpriseName- The value for enterpriseName- Returns:
thisbuilder for use in a chained invocation
-
setChannelId
Initializes the value for thechannelIdattribute.- Parameters:
channelId- The value for channelId- Returns:
thisbuilder for use in a chained invocation
-
setChannelName
Initializes the value for thechannelNameattribute.- Parameters:
channelName- The value for channelName- Returns:
thisbuilder for use in a chained invocation
-
setUserId
Initializes the value for theuserIdattribute.- Parameters:
userId- The value for userId- Returns:
thisbuilder for use in a chained invocation
-
setCommand
Initializes the value for thecommandattribute.- Parameters:
command- The value for command- Returns:
thisbuilder for use in a chained invocation
-
setText
Initializes the value for thetextattribute.- Parameters:
text- The value for text- Returns:
thisbuilder for use in a chained invocation
-
setResponseUrl
Initializes the value for theresponseUrlattribute.- Parameters:
responseUrl- The value for responseUrl- Returns:
thisbuilder for use in a chained invocation
-
setTriggerId
Initializes the value for thetriggerIdattribute.- Parameters:
triggerId- The value for triggerId- Returns:
thisbuilder for use in a chained invocation
-
setUserName
Deprecated.Initializes the value for theuserNameattribute.- Parameters:
userName- The value for userName- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlashCommandSubmission.- Returns:
- An immutable instance of SlashCommandSubmission
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-