Class Poll


  • public class Poll
    extends java.lang.Object
    • Constructor Detail

      • Poll

        public Poll()
    • Method Detail

      • get

        @NotNull
        public static @NotNull Poll.PollGetRequest get​(@NotNull
                                                       @NotNull java.lang.String pollId)
        Creates a get request
        Parameters:
        pollId - the poll id
        Returns:
        the created request
      • update

        @NotNull
        public static @NotNull Poll.PollUpdateRequestData.PollUpdateRequest update​(@NotNull
                                                                                   @NotNull java.lang.String pollId)
        Creates an update request
        Parameters:
        pollId - the poll id
        Returns:
        the created request
      • delete

        @NotNull
        public static @NotNull Poll.PollDeleteRequest delete​(@NotNull
                                                             @NotNull java.lang.String pollId)
        Creates a delete request
        Parameters:
        pollId - the poll id
        Returns:
        the created request
      • getOption

        @NotNull
        public static @NotNull Poll.PollOptionGetRequest getOption​(@NotNull
                                                                   @NotNull java.lang.String pollId,
                                                                   @NotNull
                                                                   @NotNull java.lang.String optionId)
        Creates a get option request
        Parameters:
        pollId - the poll id
        optionId - the option id
        Returns:
        the created request
      • deleteOption

        @NotNull
        public static @NotNull Poll.PollOptionDeleteRequest deleteOption​(@NotNull
                                                                         @NotNull java.lang.String pollId,
                                                                         @NotNull
                                                                         @NotNull java.lang.String optionId)
        Creates a delete option request
        Parameters:
        pollId - the poll id
        optionId - the option id
        Returns:
        the created request
      • castVote

        @NotNull
        public static @NotNull Poll.PollVoteCastRequestData.PollVoteCastRequest castVote​(@NotNull
                                                                                         @NotNull java.lang.String messageId,
                                                                                         @NotNull
                                                                                         @NotNull java.lang.String pollId)
        Creates a cast vote request
        Parameters:
        messageId - the message id
        pollId - the poll id
        Returns:
        the created request
      • deleteVote

        @NotNull
        public static @NotNull Poll.PollVoteDeleteRequest deleteVote​(@NotNull
                                                                     @NotNull java.lang.String messageId,
                                                                     @NotNull
                                                                     @NotNull java.lang.String pollId,
                                                                     @NotNull
                                                                     @NotNull java.lang.String voteId)
        Creates a delete vote request
        Parameters:
        messageId - the message id
        pollId - the poll id
        voteId - the vote id
        Returns:
        the created request
      • getId

        @NotNull
        public @NotNull java.lang.String getId()
      • getName

        @NotNull
        public @NotNull java.lang.String getName()
      • getDescription

        @Nullable
        public @Nullable java.lang.String getDescription()
      • getEnforceUniqueVote

        @NotNull
        public @NotNull java.lang.Boolean getEnforceUniqueVote()
      • getMaxVotesAllowed

        @Nullable
        public @Nullable java.lang.Integer getMaxVotesAllowed()
      • getAllowUserSuggestedOptions

        @NotNull
        public @NotNull java.lang.Boolean getAllowUserSuggestedOptions()
      • getAllowAnswers

        @NotNull
        public @NotNull java.lang.Boolean getAllowAnswers()
      • getIsClosed

        @NotNull
        public @NotNull java.lang.Boolean getIsClosed()
      • getOptions

        @Nullable
        public @Nullable java.util.List<Poll.PollOption> getOptions()
      • getVoteCount

        @Nullable
        public @Nullable java.lang.Integer getVoteCount()
      • getVoteCountsByOption

        @Nullable
        public @Nullable java.util.Map<java.lang.String,​java.lang.Integer> getVoteCountsByOption()
      • getAnswersCount

        @Nullable
        public @Nullable java.lang.Integer getAnswersCount()
      • getLatestVotesByOption

        @Nullable
        public @Nullable java.util.Map<java.lang.String,​java.util.List<Poll.PollVote>> getLatestVotesByOption()
      • getLatestAnswers

        @Nullable
        public @Nullable java.util.List<Poll.PollVote> getLatestAnswers()
      • getOwnVotes

        @Nullable
        public @Nullable java.util.List<Poll.PollVote> getOwnVotes()
      • getCreatedById

        @NotNull
        public @NotNull java.lang.String getCreatedById()
      • getCreatedBy

        @Nullable
        public @Nullable User getCreatedBy()
      • getCreatedAt

        @NotNull
        public @NotNull java.util.Date getCreatedAt()
      • getUpdatedAt

        @NotNull
        public @NotNull java.util.Date getUpdatedAt()
      • getCustom

        @Nullable
        public @Nullable java.util.Map<java.lang.String,​java.lang.Object> getCustom()
      • setId

        public void setId​(@NotNull
                          @NotNull java.lang.String id)
      • setName

        public void setName​(@NotNull
                            @NotNull java.lang.String name)
      • setDescription

        public void setDescription​(@Nullable
                                   @Nullable java.lang.String description)
      • setVotingVisibility

        public void setVotingVisibility​(@Nullable
                                        @Nullable Poll.VotingVisibility votingVisibility)
      • setEnforceUniqueVote

        public void setEnforceUniqueVote​(@NotNull
                                         @NotNull java.lang.Boolean enforceUniqueVote)
      • setMaxVotesAllowed

        public void setMaxVotesAllowed​(@Nullable
                                       @Nullable java.lang.Integer maxVotesAllowed)
      • setAllowUserSuggestedOptions

        public void setAllowUserSuggestedOptions​(@NotNull
                                                 @NotNull java.lang.Boolean allowUserSuggestedOptions)
      • setAllowAnswers

        public void setAllowAnswers​(@NotNull
                                    @NotNull java.lang.Boolean allowAnswers)
      • setIsClosed

        public void setIsClosed​(@NotNull
                                @NotNull java.lang.Boolean isClosed)
      • setOptions

        public void setOptions​(@Nullable
                               @Nullable java.util.List<Poll.PollOption> options)
      • setVoteCount

        public void setVoteCount​(@Nullable
                                 @Nullable java.lang.Integer voteCount)
      • setVoteCountsByOption

        public void setVoteCountsByOption​(@Nullable
                                          @Nullable java.util.Map<java.lang.String,​java.lang.Integer> voteCountsByOption)
      • setAnswersCount

        public void setAnswersCount​(@Nullable
                                    @Nullable java.lang.Integer answersCount)
      • setLatestVotesByOption

        public void setLatestVotesByOption​(@Nullable
                                           @Nullable java.util.Map<java.lang.String,​java.util.List<Poll.PollVote>> latestVotesByOption)
      • setLatestAnswers

        public void setLatestAnswers​(@Nullable
                                     @Nullable java.util.List<Poll.PollVote> latestAnswers)
      • setOwnVotes

        public void setOwnVotes​(@Nullable
                                @Nullable java.util.List<Poll.PollVote> ownVotes)
      • setCreatedById

        public void setCreatedById​(@NotNull
                                   @NotNull java.lang.String createdById)
      • setCreatedBy

        public void setCreatedBy​(@Nullable
                                 @Nullable User createdBy)
      • setCreatedAt

        public void setCreatedAt​(@NotNull
                                 @NotNull java.util.Date createdAt)
      • setUpdatedAt

        public void setUpdatedAt​(@NotNull
                                 @NotNull java.util.Date updatedAt)
      • setCustom

        public void setCustom​(@Nullable
                              @Nullable java.util.Map<java.lang.String,​java.lang.Object> custom)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object