Class SendPoll


  • public class SendPoll
    extends Send
    Since:
    1.0.0
    Author:
    Sergio del Amo
    • Constructor Detail

      • SendPoll

        public SendPoll()
    • Method Detail

      • getQuestion

        @NonNull
        public java.lang.String getQuestion()
        Returns:
        Poll question, 1-255 characters.
      • setQuestion

        public void setQuestion​(@NonNull
                                java.lang.String question)
        Parameters:
        question - Poll question, 1-255 characters.
      • getOptions

        @NonNull
        public java.util.List<java.lang.String> getOptions()
        Returns:
        List of answer options, 2-10 strings 1-100 characters each.
      • setOptions

        public void setOptions​(@NonNull
                               java.util.List<java.lang.String> options)
        Parameters:
        options - List of answer options, 2-10 strings 1-100 characters each.
      • isAnonymous

        @Nullable
        public java.lang.Boolean isAnonymous()
        Returns:
        True, if the poll needs to be anonymous, defaults to True.
      • setAnonymous

        public void setAnonymous​(@Nullable
                                 java.lang.Boolean anonymous)
        Parameters:
        anonymous - True, if the poll needs to be anonymous, defaults to True.
      • getType

        @Nullable
        public java.lang.String getType()
        Returns:
        Poll type, “quiz” or “regular”, defaults to “regular”.
      • setType

        public void setType​(@Nullable
                            java.lang.String type)
        Parameters:
        type - Poll type, “quiz” or “regular”, defaults to “regular”.
      • getAllowsMultipleAnswers

        @Nullable
        public java.lang.Boolean getAllowsMultipleAnswers()
        Returns:
        True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False.
      • setAllowsMultipleAnswers

        public void setAllowsMultipleAnswers​(@Nullable
                                             java.lang.Boolean allowsMultipleAnswers)
        Parameters:
        allowsMultipleAnswers - True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False.
      • getCorrectOptionId

        @Nullable
        public java.lang.Integer getCorrectOptionId()
        Returns:
        0-based identifier of the correct answer option, required for polls in quiz mode.
      • setCorrectOptionId

        public void setCorrectOptionId​(@Nullable
                                       java.lang.Integer correctOptionId)
        Parameters:
        correctOptionId - 0-based identifier of the correct answer option, required for polls in quiz mode.
      • isClosed

        @Nullable
        public java.lang.Boolean isClosed()
        Returns:
        True if the poll needs to be immediately closed.
      • setClosed

        public void setClosed​(@Nullable
                              java.lang.Boolean closed)
        Parameters:
        closed - Pass True, if the poll needs to be immediately closed.