Record Class TelegramProperties.PostControls.Button

java.lang.Object
java.lang.Record
io.github.yvasyliev.telegramforwarderbot.configuration.TelegramProperties.PostControls.Button
Record Components:
buttonText - text displayed on the button
callbackAnswerText - text sent as a callback answer
messageText - 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 Details

    • Button

      public Button(@NotBlank @NotBlank String buttonText, @NotBlank @NotBlank String callbackAnswerText, @NotBlank @NotBlank String messageText)
      Creates an instance of a Button record class.
      Parameters:
      buttonText - the value for the buttonText record component
      callbackAnswerText - the value for the callbackAnswerText record component
      messageText - the value for the messageText record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • buttonText

      @NotBlank public @NotBlank String buttonText()
      Returns the value of the buttonText record component.
      Returns:
      the value of the buttonText record component
    • callbackAnswerText

      @NotBlank public @NotBlank String callbackAnswerText()
      Returns the value of the callbackAnswerText record component.
      Returns:
      the value of the callbackAnswerText record component
    • messageText

      @NotBlank public @NotBlank String messageText()
      Returns the value of the messageText record component.
      Returns:
      the value of the messageText record component