syntax = "proto3";

package meerkat;

option java_package = "meerkat.protobuf";

// Message that represent single answer for given question
message UIAnswer{
    bytes answer=1;
    string description=2;
}

// Message object which is number of bytes
message ListOfAnswers{
	repeated UIAnswer answers = 1;
}


// Message object which contains the type of the answers and their data in bytes
message UIAnswers {
	int32 AnswersType = 1;

	ListOfAnswers answers = 2;
}

// Message Question are bytes
message Question {
	bytes question = 1;
}

// Message object which contains the question and its type
message UIQuestion{
	int32 QuestionType = 1;

	Question question  = 2;
}

message BallotQuestionUIElement {
    // Message object which contains all the potential answers for given question
	UIAnswers answers = 1;

	// Should those answers locations should be randomized before shown to the voter ?
	bool RandomizeListOrder = 2;

	// Message object which contains the question itself
	UIQuestion question = 3;
}

message BallotQuestionsUIElements {
	// for easy storing all wanted questions
	repeated BallotQuestionUIElement questions = 1;
}

// Enumeration that represents the available types of questions/answers that can be
enum ValueType {
	TEXT_TYPE = 0;
	AUDIO_TYPE = 1;
	IMAGE_TYPE = 2;
}


// NOTE: the idea is next when UIQuestion/Answer is received i first check out its type then i convert it to given type.