Module tdlight.api
Package it.tdlight.jni

# Class TdApi.PremiumGiveawayInfoCompleted

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.PremiumGiveawayInfo
it.tdlight.jni.TdApi.PremiumGiveawayInfoCompleted

Enclosing class:
  TdApi

public static final class TdApi.PremiumGiveawayInfoCompleted extends TdApi.PremiumGiveawayInfo
Describes a completed giveaway.

## Field Summary

Fields
Modifier and Type
Field
Description
`int`
`activationCount`
Number of winners, which activated their gift codes.
`int`
`actualWinnersSelectionDate`
Point in time (Unix timestamp) when the winners were selected.
`static final int`
`CONSTRUCTOR`
Identifier uniquely determining type of the object.
`int`
`creationDate`
Point in time (Unix timestamp) when the giveaway was created.
`String`
`giftCode`
Telegram Premium gift code that was received by the current user; empty if the user isn't a winner in the giveaway.
`boolean`
`wasRefunded`
True, if the giveaway was canceled and was fully refunded.
`int`
`winnerCount`
Number of winners in the giveaway.

## Constructor Summary

Constructors
Constructor
Description
`PremiumGiveawayInfoCompleted()`
Describes a completed giveaway.
`PremiumGiveawayInfoCompleted(int creationDate, int actualWinnersSelectionDate, boolean wasRefunded, int winnerCount, int activationCount, String giftCode)`
Describes a completed giveaway.
`PremiumGiveawayInfoCompleted(DataInput input)`
Describes a completed giveaway.

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

### creationDate

public int creationDate
Point in time (Unix timestamp) when the giveaway was created.

### actualWinnersSelectionDate

public int actualWinnersSelectionDate
Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in parameters of the giveaway.

### wasRefunded

public boolean wasRefunded
True, if the giveaway was canceled and was fully refunded.

### winnerCount

public int winnerCount
Number of winners in the giveaway.

### activationCount

public int activationCount
Number of winners, which activated their gift codes.

### giftCode

public String giftCode
Telegram Premium gift code that was received by the current user; empty if the user isn't a winner in the giveaway.

### CONSTRUCTOR

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

See Also:
  - Constant Field Values

## Constructor Details

### PremiumGiveawayInfoCompleted

public PremiumGiveawayInfoCompleted()
Describes a completed giveaway.

### PremiumGiveawayInfoCompleted

public PremiumGiveawayInfoCompleted(int creationDate, int actualWinnersSelectionDate, boolean wasRefunded, int winnerCount, int activationCount, String giftCode)
Describes a completed giveaway.

Parameters:
  `creationDate` - Point in time (Unix timestamp) when the giveaway was created.
  `actualWinnersSelectionDate` - Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in parameters of the giveaway.
  `wasRefunded` - True, if the giveaway was canceled and was fully refunded.
  `winnerCount` - Number of winners in the giveaway.
  `activationCount` - Number of winners, which activated their gift codes.
  `giftCode` - Telegram Premium gift code that was received by the current user; empty if the user isn't a winner in the giveaway.

### PremiumGiveawayInfoCompleted

public PremiumGiveawayInfoCompleted(DataInput input) throws IOException
Describes a completed giveaway.

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`