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 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 a SendPollBody record class.
      Parameters:
      chatId - the value for the chatId record component
      question - the value for the question record component
      options - the value for the options record component
      isAnonymous - the value for the isAnonymous record component
      type - the value for the type record component
      allowsMultipleAnswers - the value for the allowsMultipleAnswers record component
      correctOptionId - the value for the correctOptionId record component
      explanation - the value for the explanation record component
      explanationParseMode - the value for the explanationParseMode record component
      explanationEntities - the value for the explanationEntities record component
      openPeriod - the value for the openPeriod record component
      closeDate - the value for the closeDate record component
      isClosed - the value for the isClosed record component
      disableNotification - the value for the disableNotification record component
      protectContent - the value for the protectContent record component
      replyToMessageId - the value for the replyToMessageId record component
      allowSendingWithoutReply - the value for the allowSendingWithoutReply record component
      replyMarkup - the value for the replyMarkup record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • chatId

      public long chatId()
      Returns the value of the chatId record component.
      Returns:
      the value of the chatId record component
    • question

      public String question()
      Returns the value of the question record component.
      Returns:
      the value of the question record component
    • options

      public List<String> options()
      Returns the value of the options record component.
      Returns:
      the value of the options record component
    • isAnonymous

      public Optional<Boolean> isAnonymous()
      Returns the value of the isAnonymous record component.
      Returns:
      the value of the isAnonymous record component
    • type

      public Optional<PollType> type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • allowsMultipleAnswers

      public Optional<Boolean> allowsMultipleAnswers()
      Returns the value of the allowsMultipleAnswers record component.
      Returns:
      the value of the allowsMultipleAnswers record component
    • correctOptionId

      public OptionalInt correctOptionId()
      Returns the value of the correctOptionId record component.
      Returns:
      the value of the correctOptionId record component
    • explanation

      public Optional<String> explanation()
      Returns the value of the explanation record component.
      Returns:
      the value of the explanation record component
    • explanationParseMode

      public Optional<ParseMode> explanationParseMode()
      Returns the value of the explanationParseMode record component.
      Returns:
      the value of the explanationParseMode record component
    • explanationEntities

      public Optional<List<MessageEntity>> explanationEntities()
      Returns the value of the explanationEntities record component.
      Returns:
      the value of the explanationEntities record component
    • openPeriod

      public OptionalInt openPeriod()
      Returns the value of the openPeriod record component.
      Returns:
      the value of the openPeriod record component
    • closeDate

      public OptionalInt closeDate()
      Returns the value of the closeDate record component.
      Returns:
      the value of the closeDate record component
    • isClosed

      public Optional<Boolean> isClosed()
      Returns the value of the isClosed record component.
      Returns:
      the value of the isClosed record component
    • disableNotification

      public Optional<Boolean> disableNotification()
      Returns the value of the disableNotification record component.
      Returns:
      the value of the disableNotification record component
    • protectContent

      public Optional<Boolean> protectContent()
      Returns the value of the protectContent record component.
      Returns:
      the value of the protectContent record component
    • replyToMessageId

      public OptionalInt replyToMessageId()
      Returns the value of the replyToMessageId record component.
      Returns:
      the value of the replyToMessageId record component
    • allowSendingWithoutReply

      public Optional<Boolean> allowSendingWithoutReply()
      Returns the value of the allowSendingWithoutReply record component.
      Returns:
      the value of the allowSendingWithoutReply record component
    • replyMarkup

      public Optional<ReplyMarkup> replyMarkup()
      Returns the value of the replyMarkup record component.
      Returns:
      the value of the replyMarkup record component