Module tdlight.api

Class TdApi.PremiumGiftCodeInfo

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.PremiumGiftCodeInfo
Enclosing class:
TdApi

public static final class TdApi.PremiumGiftCodeInfo extends TdApi.Object
Contains information about a Telegram Premium gift code.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static 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

    Constructors
    Constructor
    Description
    Contains 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.
    Contains information about a Telegram Premium gift code.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
    Returns an identifier uniquely determining type of the object.
    int
     
    void
    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

    • creatorId

      public TdApi.MessageSender 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 creationDate
      Point in time (Unix timestamp) when the code was created.
    • isFromGiveaway

      public boolean isFromGiveaway
      True, if the gift code was created for a giveaway.
    • giveawayMessageId

      public long giveawayMessageId
      Identifier of the corresponding giveaway message in the creatorId chat; can be 0 or an identifier of a deleted message.
    • monthCount

      public int monthCount
      Number of months the Telegram Premium subscription will be active after code activation.
    • userId

      public long userId
      Identifier of a user for which the code was created; 0 if none.
    • useDate

      public int useDate
      Point in time (Unix timestamp) when the code was activated; 0 if none.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier 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

      public PremiumGiftCodeInfo(DataInput input) throws IOException
      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 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