# TdApi.UpdatePollAnswer (TDLight API 4.0.476 API)
declaration: module: tdlight.api, package: it.tdlight.jni, class: TdApi, class: UpdatePollAnswer

Module tdlight.api
Package it.tdlight.jni

# Class TdApi.UpdatePollAnswer

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Update
it.tdlight.jni.TdApi.UpdatePollAnswer

Enclosing class:
  TdApi

public static final class TdApi.UpdatePollAnswer extends TdApi.Update
A user changed the answer to a poll; for bots only.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CONSTRUCTOR`
Identifier uniquely determining type of the object.
`int[]`
`optionIds`
0-based identifiers of answer options, chosen by the user.
`long`
`pollId`
Unique poll identifier.
`TdApi.MessageSender`
`voterId`
Identifier of the message sender that changed the answer to the poll.

## Constructor Summary

Constructors
Constructor
Description
`UpdatePollAnswer()`
A user changed the answer to a poll; for bots only.
`UpdatePollAnswer(long pollId, TdApi.MessageSender voterId, int[] optionIds)`
A user changed the answer to a poll; for bots only.
`UpdatePollAnswer(DataInput input)`
A user changed the answer to a poll; for bots only.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
Returns an identifier uniquely determining type of the object.
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`
Serialize the TDLib class

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

`serialize, toString`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### pollId

public long pollId
Unique poll identifier.

### voterId

public TdApi.MessageSender voterId
Identifier of the message sender that changed the answer to the poll.

### optionIds

public int[] optionIds
0-based identifiers of answer options, chosen by the user.

### CONSTRUCTOR

public static final int CONSTRUCTOR
Identifier uniquely determining type of the object.

See Also:
  - Constant Field Values

## Constructor Details

### UpdatePollAnswer

public UpdatePollAnswer()
A user changed the answer to a poll; for bots only.

### UpdatePollAnswer

public UpdatePollAnswer(long pollId, TdApi.MessageSender voterId, int[] optionIds)
A user changed the answer to a poll; for bots only.

Parameters:
  `pollId` - Unique poll identifier.
  `voterId` - Identifier of the message sender that changed the answer to the poll.
  `optionIds` - 0-based identifiers of answer options, chosen by the user.

### UpdatePollAnswer

public UpdatePollAnswer(DataInput input) throws IOException
A user changed the answer to a poll; for bots only.

Parameters:
  `input` - Serialized input
Throws:
  `IOException` - the deserialization failed

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

### serialize

public void serialize(DataOutput output) throws IOException
Serialize the TDLib class

Specified by:
  `serialize` in class `TdApi.Object`
Parameters:
  `output` - output data stream
Throws:
  `IOException` - the serialization failed

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`