Record Class BatchForwardMessages
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.BatchForwardMessages
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface ApiMethod
OBJECT_MAPPER -
Constructor Summary
ConstructorsConstructorDescriptionBatchForwardMessages(@NotNull String chatId, int messageThreadId, long directMessagesTopicId, @NotNull String fromChatId, boolean disableNotification, boolean protectContent, long[] messageIds) Creates an instance of aBatchForwardMessagesrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringchatId()Returns the value of thechatIdrecord component.MessageId @NotNull []deserializeResponse(@NotNull String answer) Deserializes the response from the Telegram Bot API.longReturns the value of thedirectMessagesTopicIdrecord component.booleanReturns the value of thedisableNotificationrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull StringReturns the value of thefromChatIdrecord component.@NotNull StringReturns the endpoint URL for the Telegram Bot API method.final inthashCode()Returns a hash code value for this object.long[]Returns the value of themessageIdsrecord component.intReturns the value of themessageThreadIdrecord component.static @NotNull BatchForwardMessages.BuilderbooleanReturns the value of theprotectContentrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface ApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
Constructor Details
-
BatchForwardMessages
public BatchForwardMessages(@NotNull @NotNull String chatId, int messageThreadId, long directMessagesTopicId, @NotNull @NotNull String fromChatId, boolean disableNotification, boolean protectContent, long[] messageIds) Creates an instance of aBatchForwardMessagesrecord class.- Parameters:
chatId- the value for thechatIdrecord componentmessageThreadId- the value for themessageThreadIdrecord componentdirectMessagesTopicId- the value for thedirectMessagesTopicIdrecord componentfromChatId- the value for thefromChatIdrecord componentdisableNotification- the value for thedisableNotificationrecord componentprotectContent- the value for theprotectContentrecord componentmessageIds- the value for themessageIdsrecord component
-
-
Method Details
-
ofBuilder
@NotNull public static @NotNull BatchForwardMessages.Builder ofBuilder(String chatId, String fromChatId, long[] messageIds) -
getEndpointURL
Description copied from interface:ApiMethodReturns the endpoint URL for the Telegram Bot API method.- Specified by:
getEndpointURLin interfaceApiMethod<MessageId[]>- Returns:
- the endpoint URL
-
deserializeResponse
public MessageId @NotNull [] deserializeResponse(@NotNull @NotNull String answer) throws TelegramRequestException Description copied from interface:ApiMethodDeserializes the response from the Telegram Bot API.- Specified by:
deserializeResponsein interfaceApiMethod<MessageId[]>- 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. -
chatId
Returns the value of thechatIdrecord component.- Returns:
- the value of the
chatIdrecord component
-
messageThreadId
public int messageThreadId()Returns the value of themessageThreadIdrecord component.- Returns:
- the value of the
messageThreadIdrecord component
-
directMessagesTopicId
public long directMessagesTopicId()Returns the value of thedirectMessagesTopicIdrecord component.- Returns:
- the value of the
directMessagesTopicIdrecord component
-
fromChatId
Returns the value of thefromChatIdrecord component.- Returns:
- the value of the
fromChatIdrecord component
-
disableNotification
public boolean disableNotification()Returns the value of thedisableNotificationrecord component.- Returns:
- the value of the
disableNotificationrecord component
-
protectContent
public boolean protectContent()Returns the value of theprotectContentrecord component.- Returns:
- the value of the
protectContentrecord component
-
messageIds
public long[] messageIds()Returns the value of themessageIdsrecord component.- Returns:
- the value of the
messageIdsrecord component
-