Record Class PostStory
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.PostStory
- All Implemented Interfaces:
ApiMethod<Story>,MultiPartApiMethod<Story>
public record PostStory(@NotNull String businessConnectionId, @NotNull InputStoryContent content, StoryActivePeriod activePeriod, @Nullable String caption, @Nullable ParseMode parseMode, @Nullable MessageEntity[] captionEntities, @Nullable StoryArea[] areas, boolean postToChatPage, boolean protectContent)
extends Record
implements MultiPartApiMethod<Story>
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.ApiMethod
OBJECT_MAPPER -
Constructor Summary
ConstructorsConstructorDescriptionPostStory(@NotNull String businessConnectionId, @NotNull InputStoryContent content, StoryActivePeriod activePeriod, @Nullable String caption, @Nullable ParseMode parseMode, @Nullable MessageEntity[] captionEntities, @Nullable StoryArea[] areas, boolean postToChatPage, boolean protectContent) Creates an instance of aPostStoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactivePeriodrecord component.@Nullable StoryArea[]areas()Returns the value of theareasrecord component.@NotNull StringReturns the value of thebusinessConnectionIdrecord component.@Nullable Stringcaption()Returns the value of thecaptionrecord component.@Nullable MessageEntity[]Returns the value of thecaptionEntitiesrecord component.@NotNull InputStoryContentcontent()Returns the value of thecontentrecord 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.@NotNull StringReturns the endpoint URL for the Telegram Bot API method.Gets the parameters of the multipart API method.final inthashCode()Returns a hash code value for this object.static @NotNull lombok.BuilderofBuilder(String businessConnectionId, InputStoryContent content, StoryActivePeriod activePeriod) @Nullable ParseModeReturns the value of theparseModerecord component.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
-
PostStory
public PostStory(@NotNull @NotNull String businessConnectionId, @NotNull @NotNull InputStoryContent content, StoryActivePeriod activePeriod, @Nullable @Nullable String caption, @Nullable @Nullable ParseMode parseMode, @Nullable @Nullable MessageEntity[] captionEntities, @Nullable @Nullable StoryArea[] areas, boolean postToChatPage, boolean protectContent) Creates an instance of aPostStoryrecord class.- Parameters:
businessConnectionId- the value for thebusinessConnectionIdrecord componentcontent- the value for thecontentrecord componentactivePeriod- the value for theactivePeriodrecord componentcaption- the value for thecaptionrecord componentparseMode- the value for theparseModerecord componentcaptionEntities- the value for thecaptionEntitiesrecord componentareas- the value for theareasrecord componentpostToChatPage- the value for thepostToChatPagerecord componentprotectContent- the value for theprotectContentrecord component
-
-
Method Details
-
ofBuilder
@NotNull public static @NotNull lombok.Builder ofBuilder(String businessConnectionId, InputStoryContent content, 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
-
getParameters
Description copied from interface:MultiPartApiMethodGets the parameters of the multipart API method.- Specified by:
getParametersin interfaceMultiPartApiMethod<Story>- Returns:
- a map containing the parameters of the multipart API method
-
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
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
activePeriod
Returns the value of theactivePeriodrecord component.- Returns:
- the value of the
activePeriodrecord component
-
caption
Returns the value of thecaptionrecord component.- Returns:
- the value of the
captionrecord component
-
parseMode
Returns the value of theparseModerecord component.- Returns:
- the value of the
parseModerecord component
-
captionEntities
Returns the value of thecaptionEntitiesrecord component.- Returns:
- the value of the
captionEntitiesrecord component
-
areas
Returns the value of theareasrecord component.- Returns:
- the value of the
areasrecord 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
-