Class TdApi.PollOption

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.PollOption
Enclosing class:
TdApi

public static class TdApi.PollOption extends TdApi.Object
Describes one answer option of a poll.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    Point in time (Unix timestamp) when the option was added; 0 if the option existed from creation of the poll.
    Identifier of the user or chat who added the option; may be null if the option existed from creation of the poll.
    static final int
    Identifier uniquely determining type of the object.
    Unique identifier of the option in the poll; may be empty if yet unassigned.
    boolean
    True, if the option is being chosen by a pending setPollAnswer request.
    boolean
    True, if the option was chosen by the user.
    Option media; may be null if none.
    Identifiers of recent voters for the option, if the poll is non-anonymous and poll results are available.
    Option text; 1-100 characters; may contain only custom emoji entities.
    int
    The percentage of votes for this option; 0-100.
    int
    Number of voters for this option, available only for closed or voted polls, or if the current user is the creator of the poll.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Describes one answer option of a poll.
    PollOption(String id, TdApi.FormattedText text, TdApi.PollMedia media, int voterCount, int votePercentage, TdApi.MessageSender[] recentVoterIds, boolean isChosen, boolean isBeingChosen, TdApi.MessageSender author, int additionDate)
    Describes one answer option of a poll.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns an identifier uniquely determining type of the object.

    Methods inherited from class org.drinkless.tdlib.TdApi.Object

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • id

      public String id
      Unique identifier of the option in the poll; may be empty if yet unassigned.
    • text

      public TdApi.FormattedText text
      Option text; 1-100 characters; may contain only custom emoji entities.
    • media

      public TdApi.PollMedia media
      Option media; may be null if none. If present, currently, can be only of the types pollMediaAnimation, pollMediaLink, pollMediaLocation, pollMediaPhoto, pollMediaSticker, pollMediaVenue, or pollMediaVideo.
    • voterCount

      public int voterCount
      Number of voters for this option, available only for closed or voted polls, or if the current user is the creator of the poll.
    • votePercentage

      public int votePercentage
      The percentage of votes for this option; 0-100.
    • recentVoterIds

      public TdApi.MessageSender[] recentVoterIds
      Identifiers of recent voters for the option, if the poll is non-anonymous and poll results are available.
    • isChosen

      public boolean isChosen
      True, if the option was chosen by the user.
    • isBeingChosen

      public boolean isBeingChosen
      True, if the option is being chosen by a pending setPollAnswer request.
    • author

      public TdApi.MessageSender author
      Identifier of the user or chat who added the option; may be null if the option existed from creation of the poll.
    • additionDate

      public int additionDate
      Point in time (Unix timestamp) when the option was added; 0 if the option existed from creation of the poll.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • PollOption

      public PollOption()
      Describes one answer option of a poll.
    • PollOption

      public PollOption(String id, TdApi.FormattedText text, TdApi.PollMedia media, int voterCount, int votePercentage, TdApi.MessageSender[] recentVoterIds, boolean isChosen, boolean isBeingChosen, TdApi.MessageSender author, int additionDate)
      Describes one answer option of a poll.
      Parameters:
      id - Unique identifier of the option in the poll; may be empty if yet unassigned.
      text - Option text; 1-100 characters; may contain only custom emoji entities.
      media - Option media; may be null if none. If present, currently, can be only of the types pollMediaAnimation, pollMediaLink, pollMediaLocation, pollMediaPhoto, pollMediaSticker, pollMediaVenue, or pollMediaVideo.
      voterCount - Number of voters for this option, available only for closed or voted polls, or if the current user is the creator of the poll.
      votePercentage - The percentage of votes for this option; 0-100.
      recentVoterIds - Identifiers of recent voters for the option, if the poll is non-anonymous and poll results are available.
      isChosen - True, if the option was chosen by the user.
      isBeingChosen - True, if the option is being chosen by a pending setPollAnswer request.
      author - Identifier of the user or chat who added the option; may be null if the option existed from creation of the poll.
      additionDate - Point in time (Unix timestamp) when the option was added; 0 if the option existed from creation of the poll.
  • Method Details

    • getConstructor

      public int getConstructor()
      Description copied from class: TdApi.Object
      Returns an identifier uniquely determining type of the object.
      Specified by:
      getConstructor in class TdApi.Object
      Returns:
      this.CONSTRUCTOR