Package dev.tobee.telegram.request.body
Record Class SendPollBody
java.lang.Object
java.lang.Record
dev.tobee.telegram.request.body.SendPollBody
public record SendPollBody(long chatId, String question, List<String> options, Optional<Boolean> isAnonymous, Optional<PollType> type, Optional<Boolean> allowsMultipleAnswers, OptionalInt correctOptionId, Optional<String> explanation, Optional<ParseMode> explanationParseMode, Optional<List<MessageEntity>> explanationEntities, OptionalInt openPeriod, OptionalInt closeDate, Optional<Boolean> isClosed, Optional<Boolean> disableNotification, Optional<Boolean> protectContent, OptionalInt replyToMessageId, Optional<Boolean> allowSendingWithoutReply, Optional<ReplyMarkup> replyMarkup)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSendPollBody(long chatId, String question, List<String> options, Optional<Boolean> isAnonymous, Optional<PollType> type, Optional<Boolean> allowsMultipleAnswers, OptionalInt correctOptionId, Optional<String> explanation, Optional<ParseMode> explanationParseMode, Optional<List<MessageEntity>> explanationEntities, OptionalInt openPeriod, OptionalInt closeDate, Optional<Boolean> isClosed, Optional<Boolean> disableNotification, Optional<Boolean> protectContent, OptionalInt replyToMessageId, Optional<Boolean> allowSendingWithoutReply, Optional<ReplyMarkup> replyMarkup) Creates an instance of aSendPollBodyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowSendingWithoutReplyrecord component.Returns the value of theallowsMultipleAnswersrecord component.longchatId()Returns the value of thechatIdrecord component.Returns the value of thecloseDaterecord component.Returns the value of thecorrectOptionIdrecord component.Returns the value of thedisableNotificationrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexplanationrecord component.Returns the value of theexplanationEntitiesrecord component.Returns the value of theexplanationParseModerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theisAnonymousrecord component.isClosed()Returns the value of theisClosedrecord component.Returns the value of theopenPeriodrecord component.options()Returns the value of theoptionsrecord component.Returns the value of theprotectContentrecord component.question()Returns the value of thequestionrecord component.Returns the value of thereplyMarkuprecord component.Returns the value of thereplyToMessageIdrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
SendPollBody
public SendPollBody(long chatId, String question, List<String> options, Optional<Boolean> isAnonymous, Optional<PollType> type, Optional<Boolean> allowsMultipleAnswers, OptionalInt correctOptionId, Optional<String> explanation, Optional<ParseMode> explanationParseMode, Optional<List<MessageEntity>> explanationEntities, OptionalInt openPeriod, OptionalInt closeDate, Optional<Boolean> isClosed, Optional<Boolean> disableNotification, Optional<Boolean> protectContent, OptionalInt replyToMessageId, Optional<Boolean> allowSendingWithoutReply, Optional<ReplyMarkup> replyMarkup) Creates an instance of aSendPollBodyrecord class.- Parameters:
chatId- the value for thechatIdrecord componentquestion- the value for thequestionrecord componentoptions- the value for theoptionsrecord componentisAnonymous- the value for theisAnonymousrecord componenttype- the value for thetyperecord componentallowsMultipleAnswers- the value for theallowsMultipleAnswersrecord componentcorrectOptionId- the value for thecorrectOptionIdrecord componentexplanation- the value for theexplanationrecord componentexplanationParseMode- the value for theexplanationParseModerecord componentexplanationEntities- the value for theexplanationEntitiesrecord componentopenPeriod- the value for theopenPeriodrecord componentcloseDate- the value for thecloseDaterecord componentisClosed- the value for theisClosedrecord componentdisableNotification- the value for thedisableNotificationrecord componentprotectContent- the value for theprotectContentrecord componentreplyToMessageId- the value for thereplyToMessageIdrecord componentallowSendingWithoutReply- the value for theallowSendingWithoutReplyrecord componentreplyMarkup- the value for thereplyMarkuprecord component
-
-
Method Details
-
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
public long chatId()Returns the value of thechatIdrecord component.- Returns:
- the value of the
chatIdrecord component
-
question
Returns the value of thequestionrecord component.- Returns:
- the value of the
questionrecord component
-
options
Returns the value of theoptionsrecord component.- Returns:
- the value of the
optionsrecord component
-
isAnonymous
Returns the value of theisAnonymousrecord component.- Returns:
- the value of the
isAnonymousrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
allowsMultipleAnswers
Returns the value of theallowsMultipleAnswersrecord component.- Returns:
- the value of the
allowsMultipleAnswersrecord component
-
correctOptionId
Returns the value of thecorrectOptionIdrecord component.- Returns:
- the value of the
correctOptionIdrecord component
-
explanation
Returns the value of theexplanationrecord component.- Returns:
- the value of the
explanationrecord component
-
explanationParseMode
Returns the value of theexplanationParseModerecord component.- Returns:
- the value of the
explanationParseModerecord component
-
explanationEntities
Returns the value of theexplanationEntitiesrecord component.- Returns:
- the value of the
explanationEntitiesrecord component
-
openPeriod
Returns the value of theopenPeriodrecord component.- Returns:
- the value of the
openPeriodrecord component
-
closeDate
Returns the value of thecloseDaterecord component.- Returns:
- the value of the
closeDaterecord component
-
isClosed
Returns the value of theisClosedrecord component.- Returns:
- the value of the
isClosedrecord component
-
disableNotification
Returns the value of thedisableNotificationrecord component.- Returns:
- the value of the
disableNotificationrecord component
-
protectContent
Returns the value of theprotectContentrecord component.- Returns:
- the value of the
protectContentrecord component
-
replyToMessageId
Returns the value of thereplyToMessageIdrecord component.- Returns:
- the value of the
replyToMessageIdrecord component
-
allowSendingWithoutReply
Returns the value of theallowSendingWithoutReplyrecord component.- Returns:
- the value of the
allowSendingWithoutReplyrecord component
-
replyMarkup
Returns the value of thereplyMarkuprecord component.- Returns:
- the value of the
replyMarkuprecord component
-