Package ch.threema.apitool.messages
Class BallotCreateMessage
java.lang.Object
ch.threema.apitool.messages.ThreemaMessage
ch.threema.apitool.messages.BallotCreateMessage
@Generated(value="msgapi-sdk-codegen",
date="2024-03-15T14:00:04.180868814+00:00")
public class BallotCreateMessage
extends ThreemaMessage
A poll create message that can be sent/received with end-to-end encryption via Threema.
-
Field Summary
FieldsFields inherited from class ch.threema.apitool.messages.ThreemaMessage
BLOB_ID_LEN -
Constructor Summary
ConstructorsConstructorDescriptionBallotCreateMessage(byte[] ballotId, String description, State state, VotingMode votingMode, ResultsDisclosureType resultsDisclosureType, int order, DisplayMode displayMode, List<BallotChoice> choices, List<String> participants) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic BallotCreateMessagefromString(byte[] data, int realDataLength) byte[]The poll ballot identifierThe available vote choicesbyte[]getData()The group poll descriptionThe display modeintgetOrder()Deprecated.The poll participantsThe poll results disclosure typegetState()The group poll stateintThe voting modeinthashCode()toString()
-
Field Details
-
TYPE_CODE
public static final int TYPE_CODE- See Also:
-
-
Constructor Details
-
BallotCreateMessage
public BallotCreateMessage(byte[] ballotId, String description, State state, VotingMode votingMode, ResultsDisclosureType resultsDisclosureType, int order, DisplayMode displayMode, List<BallotChoice> choices, List<String> participants)
-
-
Method Details
-
getBallotId
public byte[] getBallotId()The poll ballot identifier- Returns:
- ballotId
-
getDescription
The group poll description- Returns:
- description
-
getState
The group poll state- Returns:
- state
-
getVotingMode
The voting mode- Returns:
- votingMode
-
getResultsDisclosureType
The poll results disclosure type- Returns:
- resultsDisclosureType
-
getOrder
Deprecated.The poll results order- Returns:
- order
-
getDisplayMode
The display mode- Returns:
- displayMode
-
getChoices
The available vote choices- Returns:
- choices
-
getParticipants
The poll participants- Returns:
- participants
-
getTypeCode
public int getTypeCode()- Specified by:
getTypeCodein classThreemaMessage- Returns:
- the message's type code
-
getData
- Specified by:
getDatain classThreemaMessage- Returns:
- The message's raw content
- Throws:
BadMessageException
-
fromString
public static BallotCreateMessage fromString(byte[] data, int realDataLength) throws BadMessageException - Throws:
BadMessageException
-
equals
- Overrides:
equalsin classThreemaMessage
-
hashCode
public int hashCode() -
toString
-