Module tdlight.api

Class TdApi.PremiumGiveawayParameters

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

public static final class TdApi.PremiumGiveawayParameters extends TdApi.Object
Describes parameters of a Telegram Premium giveaway.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    long[]
    Identifiers of other supergroup or channel chats that must be subscribed by the users to be eligible for the giveaway.
    long
    Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription.
    static final int
    Identifier uniquely determining type of the object.
    The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be eligible for the giveaway.
    boolean
    True, if the list of winners of the giveaway will be available to everyone.
    boolean
    True, if only new members of the chats will be eligible for the giveaway.
    Additional description of the giveaway prize; 0-128 characters.
    int
    Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption("giveaway_duration_max") seconds in the future in scheduled giveaways.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Describes parameters of a Telegram Premium giveaway.
    PremiumGiveawayParameters(long boostedChatId, long[] additionalChatIds, int winnersSelectionDate, boolean onlyNewMembers, boolean hasPublicWinners, String[] countryCodes, String prizeDescription)
    Describes parameters of a Telegram Premium giveaway.
    Describes parameters of a Telegram Premium giveaway.
  • 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

    • boostedChatId

      public long boostedChatId
      Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription. If the chat is a channel, then canPostMessages right is required in the channel, otherwise, the user must be an administrator in the supergroup.
    • additionalChatIds

      public long[] additionalChatIds
      Identifiers of other supergroup or channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats.
    • winnersSelectionDate

      public int winnersSelectionDate
      Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption("giveaway_duration_max") seconds in the future in scheduled giveaways.
    • onlyNewMembers

      public boolean onlyNewMembers
      True, if only new members of the chats will be eligible for the giveaway.
    • hasPublicWinners

      public boolean hasPublicWinners
      True, if the list of winners of the giveaway will be available to everyone.
    • countryCodes

      public String[] countryCodes
      The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway. There can be up to getOption("giveaway_country_count_max") chosen countries. Users with phone number that was bought on Fragment can participate in any giveaway and the country code "FT" must not be specified in the list.
    • prizeDescription

      public String prizeDescription
      Additional description of the giveaway prize; 0-128 characters.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • PremiumGiveawayParameters

      public PremiumGiveawayParameters()
      Describes parameters of a Telegram Premium giveaway.
    • PremiumGiveawayParameters

      public PremiumGiveawayParameters(long boostedChatId, long[] additionalChatIds, int winnersSelectionDate, boolean onlyNewMembers, boolean hasPublicWinners, String[] countryCodes, String prizeDescription)
      Describes parameters of a Telegram Premium giveaway.
      Parameters:
      boostedChatId - Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription. If the chat is a channel, then canPostMessages right is required in the channel, otherwise, the user must be an administrator in the supergroup.
      additionalChatIds - Identifiers of other supergroup or channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats.
      winnersSelectionDate - Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption("giveaway_duration_max") seconds in the future in scheduled giveaways.
      onlyNewMembers - True, if only new members of the chats will be eligible for the giveaway.
      hasPublicWinners - True, if the list of winners of the giveaway will be available to everyone.
      countryCodes - The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway. There can be up to getOption("giveaway_country_count_max") chosen countries. Users with phone number that was bought on Fragment can participate in any giveaway and the country code "FT" must not be specified in the list.
      prizeDescription - Additional description of the giveaway prize; 0-128 characters.
    • PremiumGiveawayParameters

      public PremiumGiveawayParameters(DataInput input) throws IOException
      Describes parameters of a Telegram Premium giveaway.
      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