Class TdApi.Poll

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Poll
Enclosing class:
TdApi

public static class TdApi.Poll extends TdApi.Object
Describes a poll.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    True, if multiple answer options can be chosen simultaneously.
    boolean
    True, if the poll can be answered multiple times.
    boolean
    True, if the current user can get voters in the poll using getPollVoters.
    boolean
    True, if the current user can see results of the poll.
    int
    Point in time (Unix timestamp) when the poll will automatically be closed.
    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 able to vote.
    long
    Unique poll identifier.
    boolean
    True, if the poll is anonymous.
    boolean
    True, if the poll is closed.
    boolean
    True, if only the users that are members of the chat for more than a day will be able to vote.
    int
    Amount of time the poll will be active after creation, in seconds.
    int[]
    The list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed.
    List of poll answer options.
    Poll question; 1-300 characters; may contain only custom emoji entities.
    Identifiers of recent voters, if the poll is non-anonymous and poll results are available.
    int
    Total number of voters, participating in the poll.
    Type of the poll.
    The reason describing, why the current user can't vote in the poll; may be null if the user can vote in the poll.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Describes a poll.
    Poll(long id, TdApi.FormattedText question, TdApi.PollOption[] options, int totalVoterCount, TdApi.MessageSender[] recentVoterIds, boolean canGetVoters, boolean canSeeResults, boolean isAnonymous, boolean allowsMultipleAnswers, boolean allowsRevoting, boolean membersOnly, String[] countryCodes, int[] optionOrder, TdApi.PollType type, int openPeriod, int closeDate, boolean isClosed, TdApi.PollVoteRestrictionReason voteRestrictionReason)
    Describes a poll.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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 poll identifier.
    • question

      public TdApi.FormattedText question
      Poll question; 1-300 characters; may contain only custom emoji entities.
    • options

      public TdApi.PollOption[] options
      List of poll answer options.
    • totalVoterCount

      public int totalVoterCount
      Total number of voters, participating in the poll.
    • recentVoterIds

      public TdApi.MessageSender[] recentVoterIds
      Identifiers of recent voters, if the poll is non-anonymous and poll results are available.
    • canGetVoters

      public boolean canGetVoters
      True, if the current user can get voters in the poll using getPollVoters.
    • canSeeResults

      public boolean canSeeResults
      True, if the current user can see results of the poll.
    • isAnonymous

      public boolean isAnonymous
      True, if the poll is anonymous.
    • allowsMultipleAnswers

      public boolean allowsMultipleAnswers
      True, if multiple answer options can be chosen simultaneously.
    • allowsRevoting

      public boolean allowsRevoting
      True, if the poll can be answered multiple times.
    • membersOnly

      public boolean membersOnly
      True, if only the users that are members of the chat for more than a day will be able to vote.
    • countryCodes

      public String[] countryCodes
      The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote. If empty, then all users can participate in the poll.
    • optionOrder

      public int[] optionOrder
      The list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed.
    • type

      public TdApi.PollType type
      Type of the poll.
    • openPeriod

      public int openPeriod
      Amount of time the poll will be active after creation, in seconds.
    • closeDate

      public int closeDate
      Point in time (Unix timestamp) when the poll will automatically be closed.
    • isClosed

      public boolean isClosed
      True, if the poll is closed.
    • voteRestrictionReason

      public TdApi.PollVoteRestrictionReason voteRestrictionReason
      The reason describing, why the current user can't vote in the poll; may be null if the user can vote in the poll.
    • CONSTRUCTOR

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

    • Poll

      public Poll()
      Describes a poll.
    • Poll

      public Poll(long id, TdApi.FormattedText question, TdApi.PollOption[] options, int totalVoterCount, TdApi.MessageSender[] recentVoterIds, boolean canGetVoters, boolean canSeeResults, boolean isAnonymous, boolean allowsMultipleAnswers, boolean allowsRevoting, boolean membersOnly, String[] countryCodes, int[] optionOrder, TdApi.PollType type, int openPeriod, int closeDate, boolean isClosed, TdApi.PollVoteRestrictionReason voteRestrictionReason)
      Describes a poll.
      Parameters:
      id - Unique poll identifier.
      question - Poll question; 1-300 characters; may contain only custom emoji entities.
      options - List of poll answer options.
      totalVoterCount - Total number of voters, participating in the poll.
      recentVoterIds - Identifiers of recent voters, if the poll is non-anonymous and poll results are available.
      canGetVoters - True, if the current user can get voters in the poll using getPollVoters.
      canSeeResults - True, if the current user can see results of the poll.
      isAnonymous - True, if the poll is anonymous.
      allowsMultipleAnswers - True, if multiple answer options can be chosen simultaneously.
      allowsRevoting - True, if the poll can be answered multiple times.
      membersOnly - True, if only the users that are members of the chat for more than a day will be able to vote.
      countryCodes - The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote. If empty, then all users can participate in the poll.
      optionOrder - The list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed.
      type - Type of the poll.
      openPeriod - Amount of time the poll will be active after creation, in seconds.
      closeDate - Point in time (Unix timestamp) when the poll will automatically be closed.
      isClosed - True, if the poll is closed.
      voteRestrictionReason - The reason describing, why the current user can't vote in the poll; may be null if the user can vote in the poll.
  • 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