Record Class TranslatetoMetadata<L extends LocalizationSetting>
java.lang.Object
java.lang.Record
net.flectone.pulse.module.command.translateto.model.TranslatetoMetadata<L>
- All Implemented Interfaces:
EventMetadata<L>
public record TranslatetoMetadata<L extends LocalizationSetting>(@NonNull BaseEventMetadata<L extends LocalizationSetting> base, @NonNull String targetLanguage, @NonNull String messageToTranslate)
extends Record
implements EventMetadata<L>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from interface EventMetadata
EventMetadata.Builder<L> -
Constructor Summary
ConstructorsConstructorDescriptionTranslatetoMetadata(@NonNull BaseEventMetadata<L> base, @NonNull String targetLanguage, @NonNull String messageToTranslate) Creates an instance of aTranslatetoMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull BaseEventMetadata<L> base()Returns the value of thebaserecord component.static <L extends LocalizationSetting>
TranslatetoMetadata.TranslatetoMetadataBuilder<L> builder()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NonNull StringReturns the value of themessageToTranslaterecord component.@NonNull StringReturns the value of thetargetLanguagerecord component.final StringtoString()Returns a string representation of this record class.withBase(@NonNull BaseEventMetadata<L> base) withMessageToTranslate(@NonNull String messageToTranslate) withTargetLanguage(@NonNull String targetLanguage) Methods inherited from interface EventMetadata
destination, filter, flags, format, integrationMetadata, message, proxy, range, receivers, resolveFormat, resolveTags, sender, sound, tagResolvers, uuid
-
Constructor Details
-
TranslatetoMetadata
public TranslatetoMetadata(@NonNull BaseEventMetadata<L> base, @NonNull String targetLanguage, @NonNull String messageToTranslate) Creates an instance of aTranslatetoMetadatarecord class.- Parameters:
base- the value for thebaserecord componenttargetLanguage- the value for thetargetLanguagerecord componentmessageToTranslate- the value for themessageToTranslaterecord component
-
-
Method Details
-
builder
public static <L extends LocalizationSetting> TranslatetoMetadata.TranslatetoMetadataBuilder<L> builder() -
withBase
- Specified by:
withBasein interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTargetLanguage
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withMessageToTranslate
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
base
Returns the value of thebaserecord component.- Specified by:
basein interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
baserecord component
-
targetLanguage
Returns the value of thetargetLanguagerecord component.- Returns:
- the value of the
targetLanguagerecord component
-
messageToTranslate
Returns the value of themessageToTranslaterecord component.- Returns:
- the value of the
messageToTranslaterecord component
-