Interface TranslatetoMessageContext
- All Superinterfaces:
MessageContext, StringMessageContext
A translation request.
Builds on
StringMessageContext.-
Nested Class Summary
Nested classes/interfaces inherited from interface MessageContext
MessageContext.CacheKey -
Method Summary
Modifier and TypeMethodDescriptionstatic net.flectone.pulse.module.command.translateto.model.TranslatetoMessageContextImpl.TranslatetoMessageContextImplBuilderbuilder()Starts building this context.@NonNull StringThe text to translate.@NonNull StringThe language to translate into.withMessageToTranslate(@NonNull String messageToTranslate) Returns a copy carrying a different value.withTargetLanguage(@NonNull String targetLanguage) Returns a copy carrying a different value.Methods inherited from interface MessageContext
addFlag, addFlags, addTagResolver, addTagResolvers, base, createCacheKey, flags, isFlag, message, receiver, sender, tagResolver, toBuilder, uuid, withBase, withFlags, withMessage, withReceiver, withSender, withTagResolver, withUuidMethods inherited from interface StringMessageContext
string, withString
-
Method Details
-
builder
static net.flectone.pulse.module.command.translateto.model.TranslatetoMessageContextImpl.TranslatetoMessageContextImplBuilder builder()Starts building this context.- Returns:
- a new builder
-
targetLanguage
@NonNull String targetLanguage()The language to translate into.- Returns:
- the language to translate into
-
messageToTranslate
-
withTargetLanguage
Returns a copy carrying a different value.- Parameters:
targetLanguage- the language to translate into- Returns:
- the copy
-
withMessageToTranslate
Returns a copy carrying a different value.- Parameters:
messageToTranslate- the text to translate- Returns:
- the copy
-