syntax = "proto3";

package stan;

service Stan{
 // Unary
 rpc OneQuestionOneResponse(QuestionRequest) returns (QuestionResponse) {}

 // Streaming
 rpc ManyQuestionsOneResponse(stream QuestionRequest) returns (QuestionResponse){}
 rpc OneQuestionManyResponses(QuestionRequest) returns (stream QuestionResponse){}
 rpc ManyQuestionsManyReponses(stream QuestionRequest) returns (stream QuestionResponse){}

 // Error Testing
 rpc OneQuestionOneErrorResponse(QuestionRequest) returns (QuestionResponse) {}
 rpc OneErroredQuestionOneResponse(QuestionRequest) returns (QuestionResponse) {}
}


message QuestionRequest {
    string question = 1;
}

message QuestionResponse {
    string answer = 1;
    bool was_answered = 2;
}
