Package io.getstream.chat.java.models
Class Poll
- java.lang.Object
-
- io.getstream.chat.java.models.Poll
-
public class Poll extends java.lang.Object
-
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description Poll()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)static @NotNull Poll.PollVoteCastRequestData.PollVoteCastRequestcastVote(@NotNull java.lang.String messageId, @NotNull java.lang.String pollId)Creates a cast vote requeststatic @NotNull Poll.PollCreateRequestData.PollCreateRequestcreate()Creates a create requeststatic @NotNull Poll.PollOptionCreateRequestData.PollOptionCreateRequestcreateOption(@NotNull java.lang.String pollId)Creates a create option requeststatic @NotNull Poll.PollDeleteRequestdelete(@NotNull java.lang.String pollId)Creates a delete requeststatic @NotNull Poll.PollOptionDeleteRequestdeleteOption(@NotNull java.lang.String pollId, @NotNull java.lang.String optionId)Creates a delete option requeststatic @NotNull Poll.PollVoteDeleteRequestdeleteVote(@NotNull java.lang.String messageId, @NotNull java.lang.String pollId, @NotNull java.lang.String voteId)Creates a delete vote requestbooleanequals(java.lang.Object o)static @NotNull Poll.PollGetRequestget(@NotNull java.lang.String pollId)Creates a get request@NotNull java.lang.BooleangetAllowAnswers()@NotNull java.lang.BooleangetAllowUserSuggestedOptions()@Nullable java.lang.IntegergetAnswersCount()@NotNull java.util.DategetCreatedAt()@Nullable UsergetCreatedBy()@NotNull java.lang.StringgetCreatedById()@Nullable java.util.Map<java.lang.String,java.lang.Object>getCustom()@Nullable java.lang.StringgetDescription()@NotNull java.lang.BooleangetEnforceUniqueVote()@NotNull java.lang.StringgetId()@NotNull java.lang.BooleangetIsClosed()@Nullable java.util.List<Poll.PollVote>getLatestAnswers()@Nullable java.util.Map<java.lang.String,java.util.List<Poll.PollVote>>getLatestVotesByOption()@Nullable java.lang.IntegergetMaxVotesAllowed()@NotNull java.lang.StringgetName()static @NotNull Poll.PollOptionGetRequestgetOption(@NotNull java.lang.String pollId, @NotNull java.lang.String optionId)Creates a get option request@Nullable java.util.List<Poll.PollOption>getOptions()@Nullable java.util.List<Poll.PollVote>getOwnVotes()@NotNull java.util.DategetUpdatedAt()@Nullable java.lang.IntegergetVoteCount()@Nullable java.util.Map<java.lang.String,java.lang.Integer>getVoteCountsByOption()@Nullable Poll.VotingVisibilitygetVotingVisibility()inthashCode()static @NotNull Poll.PollQueryRequestData.PollQueryRequestquery()Creates a query requeststatic @NotNull Poll.PollVoteQueryRequestData.PollVoteQueryRequestqueryVotes(@NotNull java.lang.String pollId)Creates a query votes requestvoidsetAllowAnswers(@NotNull java.lang.Boolean allowAnswers)voidsetAllowUserSuggestedOptions(@NotNull java.lang.Boolean allowUserSuggestedOptions)voidsetAnswersCount(@Nullable java.lang.Integer answersCount)voidsetCreatedAt(@NotNull java.util.Date createdAt)voidsetCreatedBy(@Nullable User createdBy)voidsetCreatedById(@NotNull java.lang.String createdById)voidsetCustom(@Nullable java.util.Map<java.lang.String,java.lang.Object> custom)voidsetDescription(@Nullable java.lang.String description)voidsetEnforceUniqueVote(@NotNull java.lang.Boolean enforceUniqueVote)voidsetId(@NotNull java.lang.String id)voidsetIsClosed(@NotNull java.lang.Boolean isClosed)voidsetLatestAnswers(@Nullable java.util.List<Poll.PollVote> latestAnswers)voidsetLatestVotesByOption(@Nullable java.util.Map<java.lang.String,java.util.List<Poll.PollVote>> latestVotesByOption)voidsetMaxVotesAllowed(@Nullable java.lang.Integer maxVotesAllowed)voidsetName(@NotNull java.lang.String name)voidsetOptions(@Nullable java.util.List<Poll.PollOption> options)voidsetOwnVotes(@Nullable java.util.List<Poll.PollVote> ownVotes)voidsetUpdatedAt(@NotNull java.util.Date updatedAt)voidsetVoteCount(@Nullable java.lang.Integer voteCount)voidsetVoteCountsByOption(@Nullable java.util.Map<java.lang.String,java.lang.Integer> voteCountsByOption)voidsetVotingVisibility(@Nullable Poll.VotingVisibility votingVisibility)java.lang.StringtoString()static @NotNull Poll.PollUpdateRequestData.PollUpdateRequestupdate(@NotNull java.lang.String pollId)Creates an update requeststatic @NotNull Poll.PollOptionUpdateRequestData.PollOptionUpdateRequestupdateOption(@NotNull java.lang.String pollId)Creates an update option requeststatic @NotNull Poll.PollUpdatePartialRequestData.PollUpdatePartialRequestupdatePartial(@NotNull java.lang.String pollId)Creates a partial update request
-
-
-
Method Detail
-
create
@NotNull public static @NotNull Poll.PollCreateRequestData.PollCreateRequest create()
Creates a create request- Returns:
- the created request
-
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
-
updatePartial
@NotNull public static @NotNull Poll.PollUpdatePartialRequestData.PollUpdatePartialRequest updatePartial(@NotNull @NotNull java.lang.String pollId)
Creates a partial 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
-
query
@NotNull public static @NotNull Poll.PollQueryRequestData.PollQueryRequest query()
Creates a query request- Returns:
- the created request
-
createOption
@NotNull public static @NotNull Poll.PollOptionCreateRequestData.PollOptionCreateRequest createOption(@NotNull @NotNull java.lang.String pollId)
Creates a create option 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 idoptionId- the option id- Returns:
- the created request
-
updateOption
@NotNull public static @NotNull Poll.PollOptionUpdateRequestData.PollOptionUpdateRequest updateOption(@NotNull @NotNull java.lang.String pollId)
Creates an update option request- Parameters:
pollId- the poll 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 idoptionId- the option id- Returns:
- the created request
-
queryVotes
@NotNull public static @NotNull Poll.PollVoteQueryRequestData.PollVoteQueryRequest queryVotes(@NotNull @NotNull java.lang.String pollId)
Creates a query votes request- Parameters:
pollId- the poll 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 idpollId- 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 idpollId- the poll idvoteId- 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()
-
getVotingVisibility
@Nullable public @Nullable Poll.VotingVisibility getVotingVisibility()
-
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:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-