Package org.drinkless.tdlib

# 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`
  `additionDate`
  Point in time (Unix timestamp) when the option was added; 0 if the option existed from creation of the poll.
  `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.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `String`
  `id`
  Unique identifier of the option in the poll; may be empty if yet unassigned.
  `boolean`
  `isBeingChosen`
  True, if the option is being chosen by a pending setPollAnswer request.
  `boolean`
  `isChosen`
  True, if the option was chosen by the user.
  `TdApi.MessageContent`
  `media`
  Option media; may be null if none.
  `TdApi.MessageSender[]`
  `recentVoterIds`
  Identifiers of recent voters for the option, if the poll is non-anonymous and poll results are available.
  `TdApi.FormattedText`
  `text`
  Option text; 1-100 characters; may contain only custom emoji entities.
  `int`
  `votePercentage`
  The percentage of votes for this option; 0-100.
  `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.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PollOption()`
  Describes one answer option of a poll.
  `PollOption(String id, TdApi.FormattedText text, TdApi.MessageContent 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`
  `getConstructor()`
  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

    @Nullable public TdApi.MessageContent media
    Option media; may be null if none. If present, currently, can be only of the types messageAnimation, messageLocation, messagePhoto, messageSticker, messageVenue, or messageVideo without caption.

  - ### 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

    @Nullable 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:
      - Constant Field Values

- ## Constructor Details

  - ### PollOption

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

  - ### PollOption

    public PollOption(String id, TdApi.FormattedText text, TdApi.MessageContent 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 messageAnimation, messageLocation, messagePhoto, messageSticker, messageVenue, or messageVideo without caption.
      `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