import "yt/yt_proto/yt/formats/extension.proto"; package NYql.NProtoTest; message TIntegral { optional double DoubleField = 1; optional float FloatField = 2; optional int32 Int32Field = 3; optional int64 Int64Field = 4; optional uint32 Uint32Field = 5; optional uint64 Uint64Field = 6; optional sint32 Sint32Field = 7; optional sint64 Sint64Field = 8; optional fixed32 Fixed32Field = 9; optional fixed64 Fixed64Field = 10; optional sfixed32 Sfixed32Field = 11; optional sfixed64 Sfixed64Field = 12; optional bool BoolField = 13; enum TriBool { TRI_FALSE = 0; TRI_TRUE = 1; TRI_UNDEF = -1; } optional TriBool EnumField = 14; } message TRepeated { repeated int32 Int32Field = 1; repeated float FloatField = 2; } message TWithDefaults { optional float DefFloat0 = 1 [default = 0]; optional float DefFloat05 = 2 [default = 0.5]; optional float DefFloatInf = 3 [default = inf]; optional float DefFloatNan = 4 [default = nan]; } message TWithTypeOptions { enum Color { WHITE = 0; BLUE = 1; RED = -1; } message TEmbedded { option (NYT.default_field_flags) = SERIALIZATION_YT; optional Color ColorIntField = 1 [(NYT.flags) = ENUM_INT]; optional Color ColorStringField = 2 [(NYT.flags) = ENUM_STRING]; optional bytes AnyField = 3 [(NYT.flags) = ANY]; required bytes RequiredAnyField = 4 [(NYT.flags) = ANY]; } optional Color ColorIntField = 1 [(NYT.flags) = ENUM_INT]; optional Color ColorStringField = 2 [(NYT.flags) = ENUM_STRING]; optional bytes AnyField = 3 [(NYT.flags) = ANY]; required bytes RequiredAnyField = 4 [(NYT.flags) = ANY]; // Not supported: // optional bytes OtherColumnsField = 5 [(NYT.flags) = OTHER_COLUMNS]; optional TEmbedded EmbeddedField = 6 [(NYT.flags) = SERIALIZATION_YT]; repeated Color RepeatedEnumIntField = 7 [(NYT.flags) = SERIALIZATION_YT, (NYT.flags) = ENUM_INT]; } message TOneOf { oneof Chooser { double DoubleField = 1; int32 Int32Field = 2; } optional bool BoolField = 3; } message TAggregated { optional string StringField = 1; optional bytes BytesField = 2; optional TIntegral NestedField = 3; optional TRepeated NestedRepeatedField = 4; optional TOneOf NestedOneOfField = 5; optional TAggregated NestedRecursiveField = 6; } //////////////////////////////////////////////////////////////////////////////// message TUrlRow { optional string Host = 1 [(NYT.column_name) = "Host"]; optional string Path = 2 [(NYT.column_name) = "Path"]; optional sint32 HttpCode = 3 [(NYT.column_name) = "HttpCode"]; } message TRowFieldSerializationOption { optional TUrlRow UrlRow_1 = 1 [(NYT.flags) = SERIALIZATION_YT]; optional TUrlRow UrlRow_2 = 2; } message TRowMessageSerializationOption { option (NYT.default_field_flags) = SERIALIZATION_YT; optional TUrlRow UrlRow_1 = 1; optional TUrlRow UrlRow_2 = 2; } message TRowMixedSerializationOptions { option (NYT.default_field_flags) = SERIALIZATION_YT; optional TUrlRow UrlRow_1 = 1; optional TUrlRow UrlRow_2 = 2 [(NYT.flags) = SERIALIZATION_PROTOBUF]; } message TRowSerializedRepeatedFields { option (NYT.default_field_flags) = SERIALIZATION_YT; repeated int64 Ints = 1; repeated TUrlRow UrlRows = 2; } message TUrlRowWithColumnNames { optional string Host = 1 [(NYT.column_name) = "Host_ColumnName", (NYT.key_column_name) = "Host_KeyColumnName"]; optional string Path = 2 [(NYT.key_column_name) = "Path_KeyColumnName"]; optional sint32 HttpCode = 3; } message TRowMixedSerializationOptions_ColumnNames { option (NYT.default_field_flags) = SERIALIZATION_YT; optional TUrlRowWithColumnNames UrlRow_1 = 1; optional TUrlRowWithColumnNames UrlRow_2 = 2 [(NYT.flags) = SERIALIZATION_PROTOBUF]; } message TNoOptionInheritance { message TDeepestEmbedded { optional int64 x = 1; } message TEmbedded { optional TDeepestEmbedded embedded = 1; } message TEmbeddedYt { option (NYT.default_field_flags) = SERIALIZATION_YT; optional TDeepestEmbedded embedded = 1; } message TEmbeddedProtobuf { option (NYT.default_field_flags) = SERIALIZATION_PROTOBUF; optional TDeepestEmbedded embedded = 1; } optional TEmbeddedYt EmbeddedYt_YtOption = 1 [(NYT.flags) = SERIALIZATION_YT]; optional TEmbeddedYt EmbeddedYt_ProtobufOption = 2 [(NYT.flags) = SERIALIZATION_PROTOBUF]; optional TEmbeddedYt EmbeddedYt_NoOption = 3; optional TEmbeddedProtobuf EmbeddedProtobuf_YtOption = 4 [(NYT.flags) = SERIALIZATION_YT]; optional TEmbeddedProtobuf EmbeddedProtobuf_ProtobufOption = 5 [(NYT.flags) = SERIALIZATION_PROTOBUF]; optional TEmbeddedProtobuf EmbeddedProtobuf_NoOption = 6; optional TEmbedded Embedded_YtOption = 7 [(NYT.flags) = SERIALIZATION_YT]; optional TEmbedded Embedded_ProtobufOption = 8 [(NYT.flags) = SERIALIZATION_PROTOBUF]; optional TEmbedded Embedded_NoOption = 9; } message TOptionalList { repeated int64 OptionalListInt64 = 1 [(NYT.flags) = OPTIONAL_LIST, (NYT.flags) = SERIALIZATION_YT]; } message TWithMap { option (NYT.default_field_flags) = SERIALIZATION_YT; message TEmbedded { optional int64 x = 1; optional string y = 2; } message TEmbeddedProtobuf { option (NYT.default_field_flags) = SERIALIZATION_PROTOBUF; optional int64 x = 1; optional string y = 2; } message TEmbeddedSubfieldProtobuf { option (NYT.default_field_flags) = SERIALIZATION_YT; optional int64 x = 1; optional string y = 2; message TSubField { repeated string List = 1 [(NYT.column_name) = "list"]; } required TSubField SubField = 3 [(NYT.column_name) = "sub_field", (NYT.flags) = SERIALIZATION_PROTOBUF]; } map MapDefault = 1; map MapListOfStructsLegacy = 2 [(NYT.flags) = MAP_AS_LIST_OF_STRUCTS_LEGACY]; map MapListOfStructs = 3 [(NYT.flags) = MAP_AS_LIST_OF_STRUCTS]; map MapOptionalDict = 4 [(NYT.flags) = MAP_AS_OPTIONAL_DICT]; map MapDict = 5 [(NYT.flags) = MAP_AS_DICT]; map Embedded_MapDefault = 6; map Embedded_MapListOfStructsLegacy = 7 [(NYT.flags) = MAP_AS_LIST_OF_STRUCTS_LEGACY]; map Embedded_MapListOfStructs = 8 [(NYT.flags) = MAP_AS_LIST_OF_STRUCTS]; map Embedded_MapOptionalDict = 9 [(NYT.flags) = MAP_AS_OPTIONAL_DICT]; map Embedded_MapDict = 10 [(NYT.flags) = MAP_AS_DICT]; map EmbeddedSubfield_MapDefault = 11; map EmbeddedSubfield_MapListOfStructsLegacy = 12 [(NYT.flags) = MAP_AS_LIST_OF_STRUCTS_LEGACY]; map EmbeddedSubfield_MapListOfStructs = 13 [(NYT.flags) = MAP_AS_LIST_OF_STRUCTS]; map EmbeddedSubfield_MapOptionalDict = 14 [(NYT.flags) = MAP_AS_OPTIONAL_DICT]; map EmbeddedSubfield_MapDict = 15 [(NYT.flags) = MAP_AS_DICT]; } message TWithOneof { option (NYT.default_field_flags) = SERIALIZATION_YT; message TEmbedded { option (NYT.default_field_flags) = SERIALIZATION_YT; oneof Oneof { int64 x = 1; string y = 2; } } message TDefaultSeparateFields { option (NYT.default_oneof_flags) = SEPARATE_FIELDS; option (NYT.default_field_flags) = SERIALIZATION_YT; optional string field = 1; oneof Oneof2 { option (NYT.variant_field_name) = "variant_field_name"; option (NYT.oneof_flags) = VARIANT; string y2 = 4; TEmbedded z2 = 6; int64 x2 = 2; } oneof Oneof1 { int64 x1 = 10; string y1 = 3; TEmbedded z1 = 5; } } message TNoDefault { option (NYT.default_field_flags) = SERIALIZATION_YT; optional string field = 1; oneof Oneof2 { string y2 = 4; TEmbedded z2 = 6; int64 x2 = 2; } oneof Oneof1 { option (NYT.oneof_flags) = SEPARATE_FIELDS; int64 x1 = 10; string y1 = 3; TEmbedded z1 = 5; } } message TSerializationProtobuf { oneof Oneof { int64 x1 = 2; string y1 = 1; TEmbedded z1 = 3; } } optional TDefaultSeparateFields DefaultSeparateFields = 1; optional TNoDefault NoDefault = 2; optional TSerializationProtobuf SerializationProtobuf = 3; oneof TopLevelOneof { int64 MemberOfTopLevelOneof = 4; } }