1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
syntax = "proto3";
import "google/protobuf/timestamp.proto";
package tests.integration.serialization.data;
option java_package = "io.confluent.kafka.serializers.protobuf.test";
option java_outer_classname = "NestedTestProto";
option java_multiple_files = false;
message UserId {
oneof user_id {
string kafka_user_id = 1;
int32 other_user_id = 2;
MessageId another_id = 3;
}
}
message MessageId {
string id = 1;
}
enum Status {
ACTIVE = 0;
INACTIVE = 1;
}
message ComplexType {
oneof some_val {
string one_id = 1;
int32 other_id = 2;
}
bool is_active = 3;
}
/*
* Complex message using nested protos and repeated fields
*/
message NestedMessage {
UserId user_id = 1;
bool is_active = 2;
repeated string experiments_active = 3;
Status status = 5;
ComplexType complex_type = 6;
map<string, string> map_type = 7;
InnerMessage inner = 8;
message InnerMessage {
string id = 1 [json_name="id"];
repeated int32 ids = 2 [packed=true];
}
enum InnerEnum {
option allow_alias = true;
ZERO = 0;
ALSO_ZERO = 0;
}
reserved 14, 15, 9 to 11;
reserved "foo", "bar";
}
|