syntax = "proto3";

option go_package = "./helloworld";

service Greeter {
	rpc SayHello (HelloRequest) returns (HelloReply) {
	}
}

message HelloRequest {
	string name = 100;
	int32 page_number = 101;
	repeated int32 ages = 102;
}

message HelloReply {
	string message = 1;
}

message SearchResult {
	string query = 1;
	int32 page_number = 2;
	int32 result_per_page = 3;

	enum Corpus {
		option allow_alias = true;

		UNIVERSAL = 0;
		WEB = 1;
		IMAGES = 2;
		RUNNING = 2;
	}

	Corpus corpus = 4;
	SearchResponse result = 5;
	map<string, SearchResponse> resultMap = 6;
}

message SearchResponse {
	reserved 1 to 15;

	int32 count = 16;
	bool isOk = 17;
	bytes padding = 18;
}