Package org.drinkless.tdlib

# Class TdApi.UpgradedGift

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

Enclosing class:
  `TdApi`

public static class TdApi.UpgradedGift extends TdApi.Object
Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `TdApi.UpgradedGiftBackdrop`
  `backdrop`
  Backdrop of the upgraded gift.
  `boolean`
  `canSendPurchaseOffer`
  True, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer.
  `TdApi.UpgradedGiftColors`
  `colors`
  Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none or unknown.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `int`
  `craftProbabilityPerMille`
  Probability that the gift adds to the chance of successful crafting of a new gift; 0 if the gift can't be used for crafting.
  `String`
  `giftAddress`
  Address of the gift NFT in TON blockchain; may be empty if none.
  `TdApi.MessageSender`
  `hostId`
  Identifier of the user or the chat to which the upgraded gift was assigned from blockchain; may be null if none or unknown.
  `long`
  `id`
  Unique identifier of the gift.
  `boolean`
  `isBurned`
  True, if the gift was used to craft another gift.
  `boolean`
  `isCrafted`
  True, if the gift was craft from another gifts.
  `boolean`
  `isPremium`
  True, if the original gift could have been bought only by Telegram Premium subscribers.
  `boolean`
  `isThemeAvailable`
  True, if the gift can be used to set a theme in a chat.
  `int`
  `maxUpgradedCount`
  The maximum number of gifts that can be upgraded from the same gift.
  `TdApi.UpgradedGiftModel`
  `model`
  Model of the upgraded gift.
  `String`
  `name`
  Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift.
  `int`
  `number`
  Unique number of the upgraded gift among gifts upgraded from the same gift.
  `TdApi.UpgradedGiftOriginalDetails`
  `originalDetails`
  Information about the originally sent gift; may be null if unknown.
  `String`
  `ownerAddress`
  Address of the gift NFT owner in TON blockchain; may be empty if none.
  `TdApi.MessageSender`
  `ownerId`
  Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown.
  `String`
  `ownerName`
  Name of the owner for the case when owner identifier and address aren't known.
  `long`
  `publisherChatId`
  Identifier of the chat that published the gift; 0 if none.
  `long`
  `regularGiftId`
  Unique identifier of the regular gift from which the gift was upgraded; may be 0 for short period of time for old gifts from database.
  `TdApi.GiftResaleParameters`
  `resaleParameters`
  Resale parameters of the gift; may be null if resale isn't possible.
  `TdApi.UpgradedGiftSymbol`
  `symbol`
  Symbol of the upgraded gift.
  `String`
  `title`
  The title of the upgraded gift.
  `int`
  `totalUpgradedCount`
  Total number of gifts that were upgraded from the same gift.
  `long`
  `usedThemeChatId`
  Identifier of the chat for which the gift is used to set a theme; 0 if none or the gift isn't owned by the current user.
  `long`
  `valueAmount`
  Estimated value of the gift; in the smallest units of the currency; 0 if unavailable.
  `String`
  `valueCurrency`
  ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable.
  `long`
  `valueUsdAmount`
  Estimated value of the gift in USD; in USD cents; 0 if unavailable.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UpgradedGift()`
  Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.
  `UpgradedGift(long id, long regularGiftId, long publisherChatId, String title, String name, int number, int totalUpgradedCount, int maxUpgradedCount, boolean isBurned, boolean isCrafted, boolean isPremium, boolean isThemeAvailable, long usedThemeChatId, TdApi.MessageSender hostId, TdApi.MessageSender ownerId, String ownerAddress, String ownerName, String giftAddress, TdApi.UpgradedGiftModel model, TdApi.UpgradedGiftSymbol symbol, TdApi.UpgradedGiftBackdrop backdrop, TdApi.UpgradedGiftOriginalDetails originalDetails, TdApi.UpgradedGiftColors colors, TdApi.GiftResaleParameters resaleParameters, boolean canSendPurchaseOffer, int craftProbabilityPerMille, String valueCurrency, long valueAmount, long valueUsdAmount)`
  Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.

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

  - ### regularGiftId

    public long regularGiftId
    Unique identifier of the regular gift from which the gift was upgraded; may be 0 for short period of time for old gifts from database.

  - ### publisherChatId

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

  - ### title

    public String title
    The title of the upgraded gift.

  - ### name

    public String name
    Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift.

  - ### number

    public int number
    Unique number of the upgraded gift among gifts upgraded from the same gift.

  - ### totalUpgradedCount

    public int totalUpgradedCount
    Total number of gifts that were upgraded from the same gift.

  - ### maxUpgradedCount

    public int maxUpgradedCount
    The maximum number of gifts that can be upgraded from the same gift.

  - ### isBurned

    public boolean isBurned
    True, if the gift was used to craft another gift.

  - ### isCrafted

    public boolean isCrafted
    True, if the gift was craft from another gifts.

  - ### isPremium

    public boolean isPremium
    True, if the original gift could have been bought only by Telegram Premium subscribers.

  - ### isThemeAvailable

    public boolean isThemeAvailable
    True, if the gift can be used to set a theme in a chat.

  - ### usedThemeChatId

    public long usedThemeChatId
    Identifier of the chat for which the gift is used to set a theme; 0 if none or the gift isn't owned by the current user.

  - ### hostId

    @Nullable public TdApi.MessageSender hostId
    Identifier of the user or the chat to which the upgraded gift was assigned from blockchain; may be null if none or unknown.

  - ### ownerId

    @Nullable public TdApi.MessageSender ownerId
    Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown.

  - ### ownerAddress

    public String ownerAddress
    Address of the gift NFT owner in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address.

  - ### ownerName

    public String ownerName
    Name of the owner for the case when owner identifier and address aren't known.

  - ### giftAddress

    public String giftAddress
    Address of the gift NFT in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address.

  - ### model

    public TdApi.UpgradedGiftModel model
    Model of the upgraded gift.

  - ### symbol

    public TdApi.UpgradedGiftSymbol symbol
    Symbol of the upgraded gift.

  - ### backdrop

    public TdApi.UpgradedGiftBackdrop backdrop
    Backdrop of the upgraded gift.

  - ### originalDetails

    @Nullable public TdApi.UpgradedGiftOriginalDetails originalDetails
    Information about the originally sent gift; may be null if unknown.

  - ### colors

    @Nullable public TdApi.UpgradedGiftColors colors
    Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none or unknown.

  - ### resaleParameters

    @Nullable public TdApi.GiftResaleParameters resaleParameters
    Resale parameters of the gift; may be null if resale isn't possible.

  - ### canSendPurchaseOffer

    public boolean canSendPurchaseOffer
    True, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer.

  - ### craftProbabilityPerMille

    public int craftProbabilityPerMille
    Probability that the gift adds to the chance of successful crafting of a new gift; 0 if the gift can't be used for crafting.

  - ### valueCurrency

    public String valueCurrency
    ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable.

  - ### valueAmount

    public long valueAmount
    Estimated value of the gift; in the smallest units of the currency; 0 if unavailable.

  - ### valueUsdAmount

    public long valueUsdAmount
    Estimated value of the gift in USD; in USD cents; 0 if unavailable.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### UpgradedGift

    public UpgradedGift()
    Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.

  - ### UpgradedGift

    public UpgradedGift(long id, long regularGiftId, long publisherChatId, String title, String name, int number, int totalUpgradedCount, int maxUpgradedCount, boolean isBurned, boolean isCrafted, boolean isPremium, boolean isThemeAvailable, long usedThemeChatId, TdApi.MessageSender hostId, TdApi.MessageSender ownerId, String ownerAddress, String ownerName, String giftAddress, TdApi.UpgradedGiftModel model, TdApi.UpgradedGiftSymbol symbol, TdApi.UpgradedGiftBackdrop backdrop, TdApi.UpgradedGiftOriginalDetails originalDetails, TdApi.UpgradedGiftColors colors, TdApi.GiftResaleParameters resaleParameters, boolean canSendPurchaseOffer, int craftProbabilityPerMille, String valueCurrency, long valueAmount, long valueUsdAmount)
    Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.
    Parameters:
      `id` - Unique identifier of the gift.
      `regularGiftId` - Unique identifier of the regular gift from which the gift was upgraded; may be 0 for short period of time for old gifts from database.
      `publisherChatId` - Identifier of the chat that published the gift; 0 if none.
      `title` - The title of the upgraded gift.
      `name` - Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift.
      `number` - Unique number of the upgraded gift among gifts upgraded from the same gift.
      `totalUpgradedCount` - Total number of gifts that were upgraded from the same gift.
      `maxUpgradedCount` - The maximum number of gifts that can be upgraded from the same gift.
      `isBurned` - True, if the gift was used to craft another gift.
      `isCrafted` - True, if the gift was craft from another gifts.
      `isPremium` - True, if the original gift could have been bought only by Telegram Premium subscribers.
      `isThemeAvailable` - True, if the gift can be used to set a theme in a chat.
      `usedThemeChatId` - Identifier of the chat for which the gift is used to set a theme; 0 if none or the gift isn't owned by the current user.
      `hostId` - Identifier of the user or the chat to which the upgraded gift was assigned from blockchain; may be null if none or unknown.
      `ownerId` - Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown.
      `ownerAddress` - Address of the gift NFT owner in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address.
      `ownerName` - Name of the owner for the case when owner identifier and address aren't known.
      `giftAddress` - Address of the gift NFT in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address.
      `model` - Model of the upgraded gift.
      `symbol` - Symbol of the upgraded gift.
      `backdrop` - Backdrop of the upgraded gift.
      `originalDetails` - Information about the originally sent gift; may be null if unknown.
      `colors` - Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none or unknown.
      `resaleParameters` - Resale parameters of the gift; may be null if resale isn't possible.
      `canSendPurchaseOffer` - True, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer.
      `craftProbabilityPerMille` - Probability that the gift adds to the chance of successful crafting of a new gift; 0 if the gift can't be used for crafting.
      `valueCurrency` - ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable.
      `valueAmount` - Estimated value of the gift; in the smallest units of the currency; 0 if unavailable.
      `valueUsdAmount` - Estimated value of the gift in USD; in USD cents; 0 if unavailable.

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