java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.PremiumGiftCodeInfo
- Enclosing class:
- TdApi
Contains information about a Telegram Premium gift code.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Identifier uniquely determining type of the object.int
Point in time (Unix timestamp) when the code was created.Identifier of a chat or a user that created the gift code; may be null if unknown.long
Identifier of the corresponding giveaway message in the creatorId chat; can be 0 or an identifier of a deleted message.boolean
True, if the gift code was created for a giveaway.int
Number of months the Telegram Premium subscription will be active after code activation.int
Point in time (Unix timestamp) when the code was activated; 0 if none.long
Identifier of a user for which the code was created; 0 if none. -
Constructor Summary
ConstructorDescriptionContains information about a Telegram Premium gift code.PremiumGiftCodeInfo
(TdApi.MessageSender creatorId, int creationDate, boolean isFromGiveaway, long giveawayMessageId, int monthCount, long userId, int useDate) Contains information about a Telegram Premium gift code.PremiumGiftCodeInfo
(DataInput input) Contains information about a Telegram Premium gift code. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns an identifier uniquely determining type of the object.int
hashCode()
void
serialize
(DataOutput output) Serialize the TDLib classMethods inherited from class it.tdlight.jni.TdApi.Object
serialize, toString
-
Field Details
-
creatorId
Identifier of a chat or a user that created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creatorId from the message can be used. -
creationDate
public int creationDatePoint in time (Unix timestamp) when the code was created. -
isFromGiveaway
public boolean isFromGiveawayTrue, if the gift code was created for a giveaway. -
giveawayMessageId
public long giveawayMessageIdIdentifier of the corresponding giveaway message in the creatorId chat; can be 0 or an identifier of a deleted message. -
monthCount
public int monthCountNumber of months the Telegram Premium subscription will be active after code activation. -
userId
public long userIdIdentifier of a user for which the code was created; 0 if none. -
useDate
public int useDatePoint in time (Unix timestamp) when the code was activated; 0 if none. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier uniquely determining type of the object.- See Also:
-
-
Constructor Details
-
PremiumGiftCodeInfo
public PremiumGiftCodeInfo()Contains information about a Telegram Premium gift code. -
PremiumGiftCodeInfo
public PremiumGiftCodeInfo(TdApi.MessageSender creatorId, int creationDate, boolean isFromGiveaway, long giveawayMessageId, int monthCount, long userId, int useDate) Contains information about a Telegram Premium gift code.- Parameters:
creatorId
- Identifier of a chat or a user that created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creatorId from the message can be used.creationDate
- Point in time (Unix timestamp) when the code was created.isFromGiveaway
- True, if the gift code was created for a giveaway.giveawayMessageId
- Identifier of the corresponding giveaway message in the creatorId chat; can be 0 or an identifier of a deleted message.monthCount
- Number of months the Telegram Premium subscription will be active after code activation.userId
- Identifier of a user for which the code was created; 0 if none.useDate
- Point in time (Unix timestamp) when the code was activated; 0 if none.
-
PremiumGiftCodeInfo
Contains information about a Telegram Premium gift code.- 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 classTdApi.Object
- Returns:
- this.CONSTRUCTOR
-
serialize
Serialize the TDLib class- Specified by:
serialize
in classTdApi.Object
- Parameters:
output
- output data stream- Throws:
IOException
- the serialization failed
-
equals
-
hashCode
public int hashCode()
-