Package io.getstream.chat.android.models
Class CreatePollParams
-
- All Implemented Interfaces:
public final class CreatePollParamsThe CreatePollParams object is used to configure a poll.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringnameprivate final Stringdescriptionprivate final VotingVisibilityvotingVisibilityprivate final BooleanenforceUniqueVoteprivate final IntegermaxVotesAllowedprivate final BooleanallowUserSuggestedOptionsprivate final BooleanallowAnswersprivate final Map<String, Object>extraDataprivate final List<PollOption>optionsWithExtraDataprivate final List<String>options
-
Constructor Summary
Constructors Constructor Description CreatePollParams(String name, List<PollOption> options, String description, VotingVisibility votingVisibility, Boolean enforceUniqueVote, Integer maxVotesAllowed, Boolean allowUserSuggestedOptions, Boolean allowAnswers, Map<String, Object> extraData)Alternative constructor to create a CreatePollParams with a list of options with extra data.
-
Method Summary
Modifier and Type Method Description final StringgetName()The name of the poll. final StringgetDescription()The description of the poll. final VotingVisibilitygetVotingVisibility()The visibility of the votes. final BooleangetEnforceUniqueVote()If set to true, a user can only vote once. final IntegergetMaxVotesAllowed()The maximum number of votes a user can cast, or null for unlimited votes. final BooleangetAllowUserSuggestedOptions()If set to true, users can suggest new options. final BooleangetAllowAnswers()If set to true, users can send answers. final Map<String, Object>getExtraData()Any additional data associated with the poll. final List<PollOption>getOptionsWithExtraData()The list of options for the poll. final List<String>getOptions()The list of option texts for the poll. -
-
Constructor Detail
-
CreatePollParams
CreatePollParams(String name, List<PollOption> options, String description, VotingVisibility votingVisibility, Boolean enforceUniqueVote, Integer maxVotesAllowed, Boolean allowUserSuggestedOptions, Boolean allowAnswers, Map<String, Object> extraData)
Alternative constructor to create a CreatePollParams with a list of options with extra data.
- Parameters:
name- The name of the poll.options- The list of options (with optional extra data) for the poll.description- The description of the poll.votingVisibility- The visibility of the votes.enforceUniqueVote- If set to true, a user can only vote once.maxVotesAllowed- The maximum number of votes a user can cast, or null for unlimited votes.allowUserSuggestedOptions- If set to true, users can suggest new options.allowAnswers- If set to true, users can send answers.extraData- Any additional data associated with the poll.
-
-
Method Detail
-
getDescription
final String getDescription()
The description of the poll.
-
getVotingVisibility
final VotingVisibility getVotingVisibility()
The visibility of the votes. If set to VotingVisibility.ANONYMOUS, the votes will be anonymous.
-
getEnforceUniqueVote
final Boolean getEnforceUniqueVote()
If set to true, a user can only vote once.
-
getMaxVotesAllowed
final Integer getMaxVotesAllowed()
The maximum number of votes a user can cast, or null for unlimited votes.
-
getAllowUserSuggestedOptions
final Boolean getAllowUserSuggestedOptions()
If set to true, users can suggest new options.
-
getAllowAnswers
final Boolean getAllowAnswers()
If set to true, users can send answers.
-
getExtraData
final Map<String, Object> getExtraData()
Any additional data associated with the poll.
-
getOptionsWithExtraData
final List<PollOption> getOptionsWithExtraData()
The list of options for the poll.
-
getOptions
final List<String> getOptions()
The list of option texts for the poll.
-
-
-
-