Package org.drinkless.tdlib

# Class TdApi.Poll

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Poll

Enclosing class:
  TdApi

public static class TdApi.Poll extends TdApi.Object
Describes a poll.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `closeDate`
  Point in time (Unix timestamp) when the poll will automatically be closed.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `long`
  `id`
  Unique poll identifier.
  `boolean`
  `isAnonymous`
  True, if the poll is anonymous.
  `boolean`
  `isClosed`
  True, if the poll is closed.
  `int`
  `openPeriod`
  Amount of time the poll will be active after creation, in seconds.
  `TdApi.PollOption[]`
  `options`
  List of poll answer options.
  `TdApi.FormattedText`
  `question`
  Poll question; 1-300 characters.
  `TdApi.MessageSender[]`
  `recentVoterIds`
  Identifiers of recent voters, if the poll is non-anonymous.
  `int`
  `totalVoterCount`
  Total number of voters, participating in the poll.
  `TdApi.PollType`
  `type`
  Type of the poll.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Poll()`
  Describes a poll.
  `Poll(long id, TdApi.FormattedText question, TdApi.PollOption[] options, int totalVoterCount, TdApi.MessageSender[] recentVoterIds, boolean isAnonymous, TdApi.PollType type, int openPeriod, int closeDate, boolean isClosed)`
  Describes 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 long id
    Unique poll identifier.

  - ### question

    public TdApi.FormattedText question
    Poll question; 1-300 characters. Only custom emoji entities are allowed.

  - ### options

    public TdApi.PollOption[] options
    List of poll answer options.

  - ### totalVoterCount

    public int totalVoterCount
    Total number of voters, participating in the poll.

  - ### recentVoterIds

    public TdApi.MessageSender[] recentVoterIds
    Identifiers of recent voters, if the poll is non-anonymous.

  - ### isAnonymous

    public boolean isAnonymous
    True, if the poll is anonymous.

  - ### type

    public TdApi.PollType type
    Type of the poll.

  - ### openPeriod

    public int openPeriod
    Amount of time the poll will be active after creation, in seconds.

  - ### closeDate

    public int closeDate
    Point in time (Unix timestamp) when the poll will automatically be closed.

  - ### isClosed

    public boolean isClosed
    True, if the poll is closed.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Poll

    public Poll()
    Describes a poll.

  - ### Poll

    public Poll(long id, TdApi.FormattedText question, TdApi.PollOption[] options, int totalVoterCount, TdApi.MessageSender[] recentVoterIds, boolean isAnonymous, TdApi.PollType type, int openPeriod, int closeDate, boolean isClosed)
    Describes a poll.
    Parameters:
      `id` - Unique poll identifier.
      `question` - Poll question; 1-300 characters. Only custom emoji entities are allowed.
      `options` - List of poll answer options.
      `totalVoterCount` - Total number of voters, participating in the poll.
      `recentVoterIds` - Identifiers of recent voters, if the poll is non-anonymous.
      `isAnonymous` - True, if the poll is anonymous.
      `type` - Type of the poll.
      `openPeriod` - Amount of time the poll will be active after creation, in seconds.
      `closeDate` - Point in time (Unix timestamp) when the poll will automatically be closed.
      `isClosed` - True, if the poll is closed.

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