Record Class BatchCopyMessages
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.BatchCopyMessages
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface 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 BatchCopyMessages.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 interface 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
@NotNull public static @NotNull BatchCopyMessages.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
-
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
-