Package org.drinkless.tdlib

# Class TdApi.Gift

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Gift

Enclosing class:
  `TdApi`

public static class TdApi.Gift extends TdApi.Object
Describes a gift that can be sent to another user or channel chat.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `TdApi.GiftAuction`
  `auctionInfo`
  Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly.
  `TdApi.GiftBackground`
  `background`
  Background of the gift.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `long`
  `defaultSellStarCount`
  Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default.
  `int`
  `firstSendDate`
  Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.
  `boolean`
  `hasColors`
  True, if the gift can be used to customize the user's name, and backgrounds of profile photo, reply header, and link preview.
  `long`
  `id`
  Unique identifier of the gift.
  `boolean`
  `isForBirthday`
  True, if the gift is a birthday gift.
  `boolean`
  `isPremium`
  True, if the gift can be bought only by Telegram Premium subscribers.
  `int`
  `lastSendDate`
  Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.
  `int`
  `nextSendDate`
  Point in time (Unix timestamp) when the gift can be sent next time by the current user; may be 0 or a date in the past.
  `TdApi.GiftPurchaseLimits`
  `overallLimits`
  Number of times the gift can be purchased all users; may be null if not limited.
  `long`
  `publisherChatId`
  Identifier of the chat that published the gift; 0 if none.
  `long`
  `starCount`
  Number of Telegram Stars that must be paid for the gift.
  `TdApi.Sticker`
  `sticker`
  The sticker representing the gift.
  `long`
  `upgradeStarCount`
  Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.
  `int`
  `upgradeVariantCount`
  Number of unique gift variants that are available for the upgraded gift; 0 if unknown.
  `TdApi.GiftPurchaseLimits`
  `userLimits`
  Number of times the gift can be purchased by the current user; may be null if not limited.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Gift()`
  Describes a gift that can be sent to another user or channel chat.
  `Gift(long id, long publisherChatId, TdApi.Sticker sticker, long starCount, long defaultSellStarCount, long upgradeStarCount, int upgradeVariantCount, boolean hasColors, boolean isForBirthday, boolean isPremium, TdApi.GiftAuction auctionInfo, int nextSendDate, TdApi.GiftPurchaseLimits userLimits, TdApi.GiftPurchaseLimits overallLimits, TdApi.GiftBackground background, int firstSendDate, int lastSendDate)`
  Describes a gift that can be sent to another user or channel chat.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Object

  `toString`

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

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

- ## Field Details

  - ### id

    public long id
    Unique identifier of the gift.

  - ### publisherChatId

    public long publisherChatId
    Identifier of the chat that published the gift; 0 if none.

  - ### sticker

    public TdApi.Sticker sticker
    The sticker representing the gift.

  - ### starCount

    public long starCount
    Number of Telegram Stars that must be paid for the gift.

  - ### defaultSellStarCount

    public long defaultSellStarCount
    Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed.

  - ### upgradeStarCount

    public long upgradeStarCount
    Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.

  - ### upgradeVariantCount

    public int upgradeVariantCount
    Number of unique gift variants that are available for the upgraded gift; 0 if unknown.

  - ### hasColors

    public boolean hasColors
    True, if the gift can be used to customize the user's name, and backgrounds of profile photo, reply header, and link preview.

  - ### isForBirthday

    public boolean isForBirthday
    True, if the gift is a birthday gift.

  - ### isPremium

    public boolean isPremium
    True, if the gift can be bought only by Telegram Premium subscribers.

  - ### auctionInfo

    @Nullable public TdApi.GiftAuction auctionInfo
    Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly.

  - ### nextSendDate

    public int nextSendDate
    Point in time (Unix timestamp) when the gift can be sent next time by the current user; may be 0 or a date in the past. If the date is in the future, then call canSendGift to get the reason, why the gift can't be sent now.

  - ### userLimits

    @Nullable public TdApi.GiftPurchaseLimits userLimits
    Number of times the gift can be purchased by the current user; may be null if not limited.

  - ### overallLimits

    @Nullable public TdApi.GiftPurchaseLimits overallLimits
    Number of times the gift can be purchased all users; may be null if not limited.

  - ### background

    public TdApi.GiftBackground background
    Background of the gift.

  - ### firstSendDate

    public int firstSendDate
    Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.

  - ### lastSendDate

    public int lastSendDate
    Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Gift

    public Gift()
    Describes a gift that can be sent to another user or channel chat.

  - ### Gift

    public Gift(long id, long publisherChatId, TdApi.Sticker sticker, long starCount, long defaultSellStarCount, long upgradeStarCount, int upgradeVariantCount, boolean hasColors, boolean isForBirthday, boolean isPremium, TdApi.GiftAuction auctionInfo, int nextSendDate, TdApi.GiftPurchaseLimits userLimits, TdApi.GiftPurchaseLimits overallLimits, TdApi.GiftBackground background, int firstSendDate, int lastSendDate)
    Describes a gift that can be sent to another user or channel chat.
    Parameters:
      `id` - Unique identifier of the gift.
      `publisherChatId` - Identifier of the chat that published the gift; 0 if none.
      `sticker` - The sticker representing the gift.
      `starCount` - Number of Telegram Stars that must be paid for the gift.
      `defaultSellStarCount` - Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed.
      `upgradeStarCount` - Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.
      `upgradeVariantCount` - Number of unique gift variants that are available for the upgraded gift; 0 if unknown.
      `hasColors` - True, if the gift can be used to customize the user's name, and backgrounds of profile photo, reply header, and link preview.
      `isForBirthday` - True, if the gift is a birthday gift.
      `isPremium` - True, if the gift can be bought only by Telegram Premium subscribers.
      `auctionInfo` - Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly.
      `nextSendDate` - Point in time (Unix timestamp) when the gift can be sent next time by the current user; may be 0 or a date in the past. If the date is in the future, then call canSendGift to get the reason, why the gift can't be sent now.
      `userLimits` - Number of times the gift can be purchased by the current user; may be null if not limited.
      `overallLimits` - Number of times the gift can be purchased all users; may be null if not limited.
      `background` - Background of the gift.
      `firstSendDate` - Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.
      `lastSendDate` - Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.

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