Record Class BatchCopyMessages
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.BatchCopyMessages
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.ApiMethod
OBJECT_MAPPER -
Constructor Summary
ConstructorsConstructorDescriptionBatchCopyMessages(@NotNull String chatId, int messageThreadId, long directMessagesTopicId, @NotNull String fromChatId, long[] messageIds, boolean disableNotification, boolean protectContent, boolean removeCaption) Creates an instance of aBatchCopyMessagesrecord 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 lombok.BuilderbooleanReturns the value of theprotectContentrecord component.booleanReturns the value of theremoveCaptionrecord component.final StringtoString()Returns a string representation of this record class.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
-
BatchCopyMessages
public BatchCopyMessages(@NotNull @NotNull String chatId, int messageThreadId, long directMessagesTopicId, @NotNull @NotNull String fromChatId, long[] messageIds, boolean disableNotification, boolean protectContent, boolean removeCaption) Creates an instance of aBatchCopyMessagesrecord class.- Parameters:
chatId- the value for thechatIdrecord componentmessageThreadId- the value for themessageThreadIdrecord componentdirectMessagesTopicId- the value for thedirectMessagesTopicIdrecord componentfromChatId- the value for thefromChatIdrecord componentmessageIds- the value for themessageIdsrecord componentdisableNotification- the value for thedisableNotificationrecord componentprotectContent- the value for theprotectContentrecord componentremoveCaption- the value for theremoveCaptionrecord component
-
-
Method Details
-
ofBuilder
-
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
-
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 '=='. -
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
-
messageIds
public long[] messageIds()Returns the value of themessageIdsrecord component.- Returns:
- the value of the
messageIdsrecord 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
-
removeCaption
public boolean removeCaption()Returns the value of theremoveCaptionrecord component.- Returns:
- the value of the
removeCaptionrecord component
-