syntax = "proto2"; package basic; message Test1 { required int32 a = 1; } message Test2 { required string b = 2; } message Test3 { required Test1 c = 3; } message Test4 { repeated int32 d = 4 [packed=true]; } message TestPackedUnpacked { repeated int32 unpacked = 4; repeated int32 packed = 5 [packed=true]; } message TestEmpty { optional int32 foo = 10; } message TestUnknownFields { required int32 a = 1; } // just check it compiles message TestSelfReference { required TestSelfReference r1 = 1; optional TestSelfReference r2 = 2; } message TestDefaultInstanceField { optional string s = 1; } message TestDefaultInstance { optional TestDefaultInstanceField field = 1; } message TestDescriptor { optional int32 stuff = 10; } enum TestEnumDescriptor { RED = 1; BLUE = 2; GREEN = 3; } message TestTypesSingular { optional double double_field = 1; optional float float_field = 2; optional int32 int32_field = 3; optional int64 int64_field = 4; optional uint32 uint32_field = 5; optional uint64 uint64_field = 6; optional sint32 sint32_field = 7; optional sint64 sint64_field = 8; optional fixed32 fixed32_field = 9; optional fixed64 fixed64_field = 10; optional sfixed32 sfixed32_field = 11; optional sfixed64 sfixed64_field = 12; optional bool bool_field = 13; optional string string_field = 14; optional bytes bytes_field = 15; optional TestEnumDescriptor enum_field = 16; } message TestTypesRepeated { repeated double double_field = 1 [packed=false]; repeated float float_field = 2 [packed=false]; repeated int32 int32_field = 3 [packed=false]; repeated int64 int64_field = 4 [packed=false]; repeated uint32 uint32_field = 5 [packed=false]; repeated uint64 uint64_field = 6 [packed=false]; repeated sint32 sint32_field = 7 [packed=false]; repeated sint64 sint64_field = 8 [packed=false]; repeated fixed32 fixed32_field = 9 [packed=false]; repeated fixed64 fixed64_field = 10 [packed=false]; repeated sfixed32 sfixed32_field = 11 [packed=false]; repeated sfixed64 sfixed64_field = 12 [packed=false]; repeated bool bool_field = 13 [packed=false]; repeated string string_field = 14; repeated bytes bytes_field = 15; repeated TestEnumDescriptor enum_field = 16 [packed=false]; } message TestTypesRepeatedPacked { repeated double double_field = 1 [packed=true]; repeated float float_field = 2 [packed=true]; repeated int32 int32_field = 3 [packed=true]; repeated int64 int64_field = 4 [packed=true]; repeated uint32 uint32_field = 5 [packed=true]; repeated uint64 uint64_field = 6 [packed=true]; repeated sint32 sint32_field = 7 [packed=true]; repeated sint64 sint64_field = 8 [packed=true]; repeated fixed32 fixed32_field = 9 [packed=true]; repeated fixed64 fixed64_field = 10 [packed=true]; repeated sfixed32 sfixed32_field = 11 [packed=true]; repeated sfixed64 sfixed64_field = 12 [packed=true]; repeated bool bool_field = 13 [packed=true]; repeated string string_field = 14; repeated bytes bytes_field = 15; repeated TestEnumDescriptor enum_field = 16 [packed=true]; } message TestInvalidTag { } message TestTruncated { repeated fixed32 ints = 2 [packed=true]; } message TestBugSint { optional sint32 s32 = 1; optional sint64 s64 = 2; }