Package live.hms.video.polls
Class HMSPollBuilder.Builder
-
- All Implemented Interfaces:
public final class HMSPollBuilder.Builder
-
-
Field Summary
Fields Modifier and Type Field Description private IntegerquestionId
-
Constructor Summary
Constructors Constructor Description HMSPollBuilder.Builder()
-
Method Summary
-
-
Method Detail
-
getQuestionId
final Integer getQuestionId()
-
setQuestionId
final Unit setQuestionId(Integer questionId)
-
withPollId
final HMSPollBuilder.Builder withPollId(String pollId)
-
withTitle
final HMSPollBuilder.Builder withTitle(String title)
-
withDuration
final HMSPollBuilder.Builder withDuration(Long duration)
-
withAnonymous
final HMSPollBuilder.Builder withAnonymous(Boolean anonymous)
-
withCategory
final HMSPollBuilder.Builder withCategory(HmsPollCategory category)
-
withUserTrackingMode
final HMSPollBuilder.Builder withUserTrackingMode(HmsPollUserTrackingMode userTrackingMode)
-
withRolesThatCanVote
final HMSPollBuilder.Builder withRolesThatCanVote(List<HMSRole> rolesThatCanVote)
Sets the roles that can vote in the poll.
Parameter rolesThatCanVote: The roles that can vote in the poll.
Returns: The updated poll builder instance.
-
withRolesThatCanViewResponses
final HMSPollBuilder.Builder withRolesThatCanViewResponses(List<HMSRole> rolesThatCanViewResponses)
Sets the roles that can view responses in the poll.
Parameter rolesThatCanViewResponses: The roles that can view responses in the poll.
Returns: The updated poll builder instance.
-
build
final HMSPollBuilder build()
-
addQuestion
final HMSPollBuilder.Builder addQuestion(HMSPollQuestionBuilder withBuilder)
Adds a question to the poll using a question builder. Used for multi choice questions where there might be one or more correct answers.
Parameters:
builder: The builder instance for creating the question.
Returns: The updated poll builder instance.
-
addShortAnswerQuestion
final HMSPollBuilder.Builder addShortAnswerQuestion(String withTitle)
Adds a question that has a short text answer that the user will type in.
- Parameters:
withTitle- the title of the question.
-
addLongAnswerQuestion
final HMSPollBuilder.Builder addLongAnswerQuestion(String withTitle)
Adds a question that has a long text answer.
- Parameters:
withTitle- the title of the question.
-
-
-
-