Record Class RepostStory
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.RepostStory
public record RepostStory(@NotNull String businessConnectionId, long fromChatId, int fromStoryId, StoryActivePeriod activePeriod, boolean postToChatPage, boolean protectContent)
extends Record
implements ApiMethod<Story>
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.ApiMethod
OBJECT_MAPPER -
Constructor Summary
ConstructorsConstructorDescriptionRepostStory(@NotNull String businessConnectionId, long fromChatId, int fromStoryId, StoryActivePeriod activePeriod, boolean postToChatPage, boolean protectContent) Creates an instance of aRepostStoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactivePeriodrecord component.@NotNull StringReturns the value of thebusinessConnectionIdrecord component.@NotNull StorydeserializeResponse(@NotNull String answer) Deserializes the response from the Telegram Bot API.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefromChatIdrecord component.intReturns the value of thefromStoryIdrecord component.@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(String businessConnectionId, long fromChatId, int fromStoryId, StoryActivePeriod activePeriod) booleanReturns the value of thepostToChatPagerecord component.booleanReturns the value of theprotectContentrecord 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
-
RepostStory
public RepostStory(@NotNull @NotNull String businessConnectionId, long fromChatId, int fromStoryId, StoryActivePeriod activePeriod, boolean postToChatPage, boolean protectContent) Creates an instance of aRepostStoryrecord class.- Parameters:
businessConnectionId- the value for thebusinessConnectionIdrecord componentfromChatId- the value for thefromChatIdrecord componentfromStoryId- the value for thefromStoryIdrecord componentactivePeriod- the value for theactivePeriodrecord componentpostToChatPage- the value for thepostToChatPagerecord componentprotectContent- the value for theprotectContentrecord component
-
-
Method Details
-
ofBuilder
@NotNull public static @NotNull lombok.Builder ofBuilder(String businessConnectionId, long fromChatId, int fromStoryId, StoryActivePeriod activePeriod) -
deserializeResponse
Description copied from interface:ApiMethodDeserializes the response from the Telegram Bot API.- Specified by:
deserializeResponsein interfaceApiMethod<Story>- Parameters:
answer- the response from the Telegram Bot API- Returns:
- the deserialized response
-
getEndpointURL
Description copied from interface:ApiMethodReturns the endpoint URL for the Telegram Bot API method.- Specified by:
getEndpointURLin interfaceApiMethod<Story>- 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 '=='. -
businessConnectionId
Returns the value of thebusinessConnectionIdrecord component.- Returns:
- the value of the
businessConnectionIdrecord component
-
fromChatId
public long fromChatId()Returns the value of thefromChatIdrecord component.- Returns:
- the value of the
fromChatIdrecord component
-
fromStoryId
public int fromStoryId()Returns the value of thefromStoryIdrecord component.- Returns:
- the value of the
fromStoryIdrecord component
-
activePeriod
Returns the value of theactivePeriodrecord component.- Returns:
- the value of the
activePeriodrecord component
-
postToChatPage
public boolean postToChatPage()Returns the value of thepostToChatPagerecord component.- Returns:
- the value of the
postToChatPagerecord component
-
protectContent
public boolean protectContent()Returns the value of theprotectContentrecord component.- Returns:
- the value of the
protectContentrecord component
-