Record Class SavePreparedKeyboardButton
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.SavePreparedKeyboardButton
- All Implemented Interfaces:
ApiMethod<PreparedKeyboardButton>
public record SavePreparedKeyboardButton(long userId, KeyboardButton keyboardButton)
extends Record
implements ApiMethod<PreparedKeyboardButton>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface ApiMethod
OBJECT_MAPPER -
Constructor Summary
ConstructorsConstructorDescriptionSavePreparedKeyboardButton(long userId, KeyboardButton keyboardButton) Creates an instance of aSavePreparedKeyboardButtonrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull PreparedKeyboardButtondeserializeResponse(@NotNull String answer) Deserializes the response from the Telegram Bot API.final booleanIndicates whether some other object is "equal to" this one.@NotNull StringReturns the endpoint URL for the Telegram Bot API method.final inthashCode()Returns a hash code value for this object.Returns the value of thekeyboardButtonrecord component.static @NotNull SavePreparedKeyboardButton.BuilderofBuilder(long userId, KeyboardButton keyboardButton) final StringtoString()Returns a string representation of this record class.longuserId()Returns the value of theuserIdrecord component.Methods inherited from interface ApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
Constructor Details
-
SavePreparedKeyboardButton
Creates an instance of aSavePreparedKeyboardButtonrecord class.- Parameters:
userId- the value for theuserIdrecord componentkeyboardButton- the value for thekeyboardButtonrecord component
-
-
Method Details
-
ofBuilder
@NotNull public static @NotNull SavePreparedKeyboardButton.Builder ofBuilder(long userId, KeyboardButton keyboardButton) -
getEndpointURL
Description copied from interface:ApiMethodReturns the endpoint URL for the Telegram Bot API method.- Specified by:
getEndpointURLin interfaceApiMethod<PreparedKeyboardButton>- Returns:
- the endpoint URL
-
deserializeResponse
@NotNull public @NotNull PreparedKeyboardButton deserializeResponse(@NotNull @NotNull String answer) throws TelegramRequestException Description copied from interface:ApiMethodDeserializes the response from the Telegram Bot API.- Specified by:
deserializeResponsein interfaceApiMethod<PreparedKeyboardButton>- Parameters:
answer- the response from the Telegram Bot API- Returns:
- the deserialized response
- Throws:
TelegramRequestException- if an error occurs while deserializing the response
-
toBuilder
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
userId
public long userId()Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
keyboardButton
Returns the value of thekeyboardButtonrecord component.- Returns:
- the value of the
keyboardButtonrecord component
-