Package org.drinkless.tdlib

# Class TdApi.MessagePremiumGiftCode

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.MessageContent
org.drinkless.tdlib.TdApi.MessagePremiumGiftCode

Enclosing class:
  `TdApi`

public static class TdApi.MessagePremiumGiftCode extends TdApi.MessageContent
A Telegram Premium gift code was created for the user.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.MessageContent

  `TdApi.MessageContent.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `long`
  `amount`
  The paid amount, in the smallest units of the currency; 0 if unknown.
  `String`
  `code`
  The gift code.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `TdApi.MessageSender`
  `creatorId`
  Identifier of a chat or a user who created the gift code; may be null if unknown.
  `String`
  `cryptocurrency`
  Cryptocurrency used to pay for the gift; may be empty if none or unknown.
  `long`
  `cryptocurrencyAmount`
  The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.
  `String`
  `currency`
  Currency for the paid amount; empty if unknown.
  `int`
  `dayCount`
  Number of days the Telegram Premium subscription will be active after code activation.
  `boolean`
  `isFromGiveaway`
  True, if the gift code was created for a giveaway.
  `boolean`
  `isUnclaimed`
  True, if the winner for the corresponding Telegram Premium subscription wasn't chosen.
  `int`
  `monthCount`
  Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
  `TdApi.Sticker`
  `sticker`
  A sticker to be shown in the message; may be null if unknown.
  `TdApi.FormattedText`
  `text`
  Message added to the gift.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MessagePremiumGiftCode()`
  A Telegram Premium gift code was created for the user.
  `MessagePremiumGiftCode(TdApi.MessageSender creatorId, TdApi.FormattedText text, boolean isFromGiveaway, boolean isUnclaimed, String currency, long amount, String cryptocurrency, long cryptocurrencyAmount, int monthCount, int dayCount, TdApi.Sticker sticker, String code)`
  A Telegram Premium gift code was created for the user.

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

  - ### creatorId

    @Nullable public TdApi.MessageSender creatorId
    Identifier of a chat or a user who created the gift code; may be null if unknown.

  - ### text

    public TdApi.FormattedText text
    Message added to the gift.

  - ### isFromGiveaway

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

  - ### isUnclaimed

    public boolean isUnclaimed
    True, if the winner for the corresponding Telegram Premium subscription wasn't chosen.

  - ### currency

    public String currency
    Currency for the paid amount; empty if unknown.

  - ### amount

    public long amount
    The paid amount, in the smallest units of the currency; 0 if unknown.

  - ### cryptocurrency

    public String cryptocurrency
    Cryptocurrency used to pay for the gift; may be empty if none or unknown.

  - ### cryptocurrencyAmount

    public long cryptocurrencyAmount
    The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.

  - ### monthCount

    public int monthCount
    Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.

  - ### dayCount

    public int dayCount
    Number of days the Telegram Premium subscription will be active after code activation.

  - ### sticker

    @Nullable public TdApi.Sticker sticker
    A sticker to be shown in the message; may be null if unknown.

  - ### code

    public String code
    The gift code.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### MessagePremiumGiftCode

    public MessagePremiumGiftCode()
    A Telegram Premium gift code was created for the user.

  - ### MessagePremiumGiftCode

    public MessagePremiumGiftCode(TdApi.MessageSender creatorId, TdApi.FormattedText text, boolean isFromGiveaway, boolean isUnclaimed, String currency, long amount, String cryptocurrency, long cryptocurrencyAmount, int monthCount, int dayCount, TdApi.Sticker sticker, String code)
    A Telegram Premium gift code was created for the user.
    Parameters:
      `creatorId` - Identifier of a chat or a user who created the gift code; may be null if unknown.
      `text` - Message added to the gift.
      `isFromGiveaway` - True, if the gift code was created for a giveaway.
      `isUnclaimed` - True, if the winner for the corresponding Telegram Premium subscription wasn't chosen.
      `currency` - Currency for the paid amount; empty if unknown.
      `amount` - The paid amount, in the smallest units of the currency; 0 if unknown.
      `cryptocurrency` - Cryptocurrency used to pay for the gift; may be empty if none or unknown.
      `cryptocurrencyAmount` - The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.
      `monthCount` - Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
      `dayCount` - Number of days the Telegram Premium subscription will be active after code activation.
      `sticker` - A sticker to be shown in the message; may be null if unknown.
      `code` - The gift code.

- ## 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.MessageContent`
    Returns:
      this.CONSTRUCTOR