23 lines
599 B
Text
23 lines
599 B
Text
|
package languages.protobuf;
|
||
|
|
||
|
option java_package = "org.highlightjs.languages.protobuf";
|
||
|
|
||
|
message Customer {
|
||
|
required int64 customer_id = 1;
|
||
|
optional string name = 2;
|
||
|
optional string real_name = 3 [default = "Anonymous"];
|
||
|
optional Gender gender = 4;
|
||
|
repeated string email_addresses = 5;
|
||
|
|
||
|
optional bool is_admin = 6 [default = false]; // or should this be a repeated field in Account?
|
||
|
|
||
|
enum Gender {
|
||
|
MALE = 1,
|
||
|
FEMALE = 2
|
||
|
}
|
||
|
}
|
||
|
|
||
|
service CustomerSearch {
|
||
|
rpc FirstMatch(CustomerRequest) returns (CustomerResponse);
|
||
|
rpc AllMatches(CustomerRequest) returns (CustomerResponse);
|
||
|
}
|