# TdApi.Poll (tdlight API 3.3.160 API)
declaration: package: it.tdlight.jni, class: TdApi, class: Poll

Package it.tdlight.jni

# Class TdApi.Poll

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.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 be automatically closed.
`static int` | `CONSTRUCTOR` |
`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.
`String` | `question` | Poll question; 1-300 characters.
`long[]` | `recentVoterUserIds` | User 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, String question, TdApi.PollOption[] options, int totalVoterCount, long[] recentVoterUserIds, boolean isAnonymous, TdApi.PollType type, int openPeriod, int closeDate, boolean isClosed)` | Describes a poll.
`Poll​(DataInput input)` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`boolean` | `equals​(Object o)` |
`int` | `getConstructor()` |
`int` | `hashCode()` |
`void` | `serialize​(DataOutput output)` |

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize, toString`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### id

public long id
Unique poll identifier.

### question

public String question
Poll question; 1-300 characters.

### options

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

### totalVoterCount

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

### recentVoterUserIds

public long[] recentVoterUserIds
User 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 be automatically closed.

### isClosed

public boolean isClosed
True, if the poll is closed.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  Constant Field Values

## Constructor Details

### Poll

public Poll()
Describes a poll.

### Poll

public Poll​(long id, String question, TdApi.PollOption[] options, int totalVoterCount, long[] recentVoterUserIds, boolean isAnonymous, TdApi.PollType type, int openPeriod, int closeDate, boolean isClosed)
Describes a poll.

Parameters:
  `id` - long Unique poll identifier.
  `question` - String Poll question; 1-300 characters.
  `options` - PollOption[] List of poll answer options.
  `totalVoterCount` - int Total number of voters, participating in the poll.
  `recentVoterUserIds` - long[] User identifiers of recent voters, if the poll is non-anonymous.
  `isAnonymous` - boolean True, if the poll is anonymous.
  `type` - PollType Type of the poll.
  `openPeriod` - int Amount of time the poll will be active after creation, in seconds.
  `closeDate` - int Point in time (Unix timestamp) when the poll will be automatically closed.
  `isClosed` - boolean True, if the poll is closed.

### Poll

public Poll​(DataInput input) throws IOException

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize​(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals​(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`