Record Class EditStory
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.EditStory
- All Implemented Interfaces:
ApiMethod<Story>,MultiPartApiMethod<Story>
public record EditStory(@NotNull String businessConnectionId, int storyId, @NotNull InputStoryContent content, @Nullable String caption, @Nullable ParseMode parseMode, @Nullable MessageEntity[] captionEntities, @Nullable StoryArea[] areas)
extends Record
implements MultiPartApiMethod<Story>
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.ApiMethod
OBJECT_MAPPER -
Constructor Summary
ConstructorsConstructorDescriptionEditStory(@NotNull String businessConnectionId, int storyId, @NotNull InputStoryContent content, @Nullable String caption, @Nullable ParseMode parseMode, @Nullable MessageEntity[] captionEntities, @Nullable StoryArea[] areas) Creates an instance of aEditStoryrecord class. -
Method Summary
Modifier and TypeMethodDescription@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, int storyId, InputStoryContent content) @Nullable ParseModeReturns the value of theparseModerecord component.intstoryId()Returns the value of thestoryIdrecord 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
-
EditStory
public EditStory(@NotNull @NotNull String businessConnectionId, int storyId, @NotNull @NotNull InputStoryContent content, @Nullable @Nullable String caption, @Nullable @Nullable ParseMode parseMode, @Nullable @Nullable MessageEntity[] captionEntities, @Nullable @Nullable StoryArea[] areas) Creates an instance of aEditStoryrecord class.- Parameters:
businessConnectionId- the value for thebusinessConnectionIdrecord componentstoryId- the value for thestoryIdrecord componentcontent- the value for thecontentrecord componentcaption- the value for thecaptionrecord componentparseMode- the value for theparseModerecord componentcaptionEntities- the value for thecaptionEntitiesrecord componentareas- the value for theareasrecord component
-
-
Method Details
-
ofBuilder
@NotNull public static @NotNull lombok.Builder ofBuilder(String businessConnectionId, int storyId, InputStoryContent content) -
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
-
storyId
public int storyId()Returns the value of thestoryIdrecord component.- Returns:
- the value of the
storyIdrecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord 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
-