Record Class TelegramMetadata<L extends LocalizationSetting>
java.lang.Object
java.lang.Record
net.flectone.pulse.module.integration.telegram.model.TelegramMetadata<L>
- All Implemented Interfaces:
EventMetadata<L>
public record TelegramMetadata<L extends LocalizationSetting>(@NonNull BaseEventMetadata<L extends LocalizationSetting> base, @NonNull String userName, @NonNull String firstName, @NonNull String lastName, @NonNull String chat)
extends Record
implements EventMetadata<L>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from interface EventMetadata
EventMetadata.Builder<L> -
Constructor Summary
ConstructorsConstructorDescriptionTelegramMetadata(@NonNull BaseEventMetadata<L> base, @NonNull String userName, @NonNull String firstName, @NonNull String lastName, @NonNull String chat) Creates an instance of aTelegramMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull BaseEventMetadata<L> base()Returns the value of thebaserecord component.static <L extends LocalizationSetting>
TelegramMetadata.TelegramMetadataBuilder<L> builder()@NonNull Stringchat()Returns the value of thechatrecord component.final booleanIndicates whether some other object is "equal to" this one.@NonNull StringReturns the value of thefirstNamerecord component.final inthashCode()Returns a hash code value for this object.@NonNull StringlastName()Returns the value of thelastNamerecord component.final StringtoString()Returns a string representation of this record class.@NonNull StringuserName()Returns the value of theuserNamerecord component.withBase(@NonNull BaseEventMetadata<L> base) withFirstName(@NonNull String firstName) withLastName(@NonNull String lastName) withUserName(@NonNull String userName) Methods inherited from interface EventMetadata
destination, filter, flags, format, integrationMetadata, message, proxy, range, receivers, resolveFormat, resolveTags, sender, sound, tagResolvers, uuid
-
Constructor Details
-
TelegramMetadata
public TelegramMetadata(@NonNull BaseEventMetadata<L> base, @NonNull String userName, @NonNull String firstName, @NonNull String lastName, @NonNull String chat) Creates an instance of aTelegramMetadatarecord class.- Parameters:
base- the value for thebaserecord componentuserName- the value for theuserNamerecord componentfirstName- the value for thefirstNamerecord componentlastName- the value for thelastNamerecord componentchat- the value for thechatrecord component
-
-
Method Details
-
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).
-
withUserName
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withFirstName
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withLastName
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withChat
- 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
-
userName
Returns the value of theuserNamerecord component.- Returns:
- the value of the
userNamerecord component
-
firstName
Returns the value of thefirstNamerecord component.- Returns:
- the value of the
firstNamerecord component
-
lastName
Returns the value of thelastNamerecord component.- Returns:
- the value of the
lastNamerecord component
-
chat
Returns the value of thechatrecord component.- Returns:
- the value of the
chatrecord component
-