Record Class SavePreparedInlineMessage
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.SavePreparedInlineMessage
- All Implemented Interfaces:
ApiMethod<PreparedInlineMessage>
public record SavePreparedInlineMessage(int userId, @NotNull InlineQueryResult result, boolean allowUserChats, boolean allowBotChats, boolean allowGroupChats, boolean allowChannelChats)
extends Record
implements ApiMethod<PreparedInlineMessage>
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.ApiMethod
OBJECT_MAPPER -
Constructor Summary
ConstructorsConstructorDescriptionSavePreparedInlineMessage(int userId, @NotNull InlineQueryResult result, boolean allowUserChats, boolean allowBotChats, boolean allowGroupChats, boolean allowChannelChats) Creates an instance of aSavePreparedInlineMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowBotChatsrecord component.booleanReturns the value of theallowChannelChatsrecord component.booleanReturns the value of theallowGroupChatsrecord component.booleanReturns the value of theallowUserChatsrecord component.@NotNull PreparedInlineMessagedeserializeResponse(@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.static @NotNull lombok.BuilderofBuilder(int userId, InlineQueryResult result) @NotNull InlineQueryResultresult()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.intuserId()Returns the value of theuserIdrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.teleight.teleightbots.api.ApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
Constructor Details
-
SavePreparedInlineMessage
public SavePreparedInlineMessage(int userId, @NotNull @NotNull InlineQueryResult result, boolean allowUserChats, boolean allowBotChats, boolean allowGroupChats, boolean allowChannelChats) Creates an instance of aSavePreparedInlineMessagerecord class.- Parameters:
userId- the value for theuserIdrecord componentresult- the value for theresultrecord componentallowUserChats- the value for theallowUserChatsrecord componentallowBotChats- the value for theallowBotChatsrecord componentallowGroupChats- the value for theallowGroupChatsrecord componentallowChannelChats- the value for theallowChannelChatsrecord component
-
-
Method Details
-
ofBuilder
-
deserializeResponse
@NotNull public @NotNull PreparedInlineMessage deserializeResponse(@NotNull @NotNull String answer) throws TelegramRequestException Description copied from interface:ApiMethodDeserializes the response from the Telegram Bot API.- Specified by:
deserializeResponsein interfaceApiMethod<PreparedInlineMessage>- Parameters:
answer- the response from the Telegram Bot API- Returns:
- the deserialized response
- Throws:
TelegramRequestException- if an error occurs while deserializing the response
-
getEndpointURL
Description copied from interface:ApiMethodReturns the endpoint URL for the Telegram Bot API method.- Specified by:
getEndpointURLin interfaceApiMethod<PreparedInlineMessage>- Returns:
- the endpoint URL
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
userId
public int userId()Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
allowUserChats
public boolean allowUserChats()Returns the value of theallowUserChatsrecord component.- Returns:
- the value of the
allowUserChatsrecord component
-
allowBotChats
public boolean allowBotChats()Returns the value of theallowBotChatsrecord component.- Returns:
- the value of the
allowBotChatsrecord component
-
allowGroupChats
public boolean allowGroupChats()Returns the value of theallowGroupChatsrecord component.- Returns:
- the value of the
allowGroupChatsrecord component
-
allowChannelChats
public boolean allowChannelChats()Returns the value of theallowChannelChatsrecord component.- Returns:
- the value of the
allowChannelChatsrecord component
-