Record Class TelegramProperties.PostControls.Button
java.lang.Object
java.lang.Record
io.github.yvasyliev.telegramforwarderbot.configuration.TelegramProperties.PostControls.Button
- Record Components:
- text displayed on the button
callbackAnswerText
- text sent as a callback answermessageText
- text sent in the message when the button is pressed
- Enclosing class:
TelegramProperties.PostControls
public static record TelegramProperties.PostControls.Button(@NotBlank String buttonText, @NotBlank String callbackAnswerText, @NotBlank String messageText)
extends Record
Configuration for a button in the post controls.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotBlank String
Returns the value of thebuttonText
record component.@NotBlank String
Returns the value of thecallbackAnswerText
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotBlank String
Returns the value of themessageText
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Button
public Button(@NotBlank @NotBlank String buttonText, @NotBlank @NotBlank String callbackAnswerText, @NotBlank @NotBlank String messageText) Creates an instance of aButton
record class.- Parameters:
buttonText
- the value for thebuttonText
record componentcallbackAnswerText
- the value for thecallbackAnswerText
record componentmessageText
- the value for themessageText
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
buttonText
Returns the value of thebuttonText
record component.- Returns:
- the value of the
buttonText
record component
-
callbackAnswerText
Returns the value of thecallbackAnswerText
record component.- Returns:
- the value of the
callbackAnswerText
record component
-
messageText
Returns the value of themessageText
record component.- Returns:
- the value of the
messageText
record component
-