123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402 |
- import "yt/yt_proto/yt/formats/extension.proto";
- package NYT.NUnitTesting;
- 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;
- }
- message TRepeatedYtMode
- {
- option (NYT.default_field_flags) = SERIALIZATION_YT;
- repeated int32 Int32Field = 1;
- }
- 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];
- }
- optional Color ColorIntField = 1 [(NYT.flags) = ENUM_INT];
- optional Color ColorStringField = 2 [(NYT.flags) = ENUM_STRING];
- optional bytes AnyField = 3 [(NYT.flags) = ANY];
- optional bytes OtherColumnsField = 4 [(NYT.flags) = OTHER_COLUMNS];
- optional TEmbedded EmbeddedField = 5 [(NYT.flags) = SERIALIZATION_YT];
- repeated Color RepeatedEnumIntField = 6 [(NYT.flags) = SERIALIZATION_YT, (NYT.flags) = ENUM_INT];
- }
- message TWithTypeOptions_TypeMismatch_EnumInt
- {
- optional int64 EnumField = 1 [(NYT.flags) = ENUM_INT];
- }
- message TWithTypeOptions_TypeMismatch_EnumString
- {
- optional string EnumField = 1 [(NYT.flags) = ENUM_STRING];
- }
- message TWithTypeOptions_TypeMismatch_Any
- {
- optional string AnyField = 1 [(NYT.flags) = ANY];
- }
- message TWithTypeOptions_TypeMismatch_OtherColumns
- {
- optional string OtherColumnsField = 1 [(NYT.flags) = OTHER_COLUMNS];
- }
- message TOneOf
- {
- oneof Chooser
- {
- double DoubleField = 1;
- int32 Int32Field = 2;
- }
- optional bool BoolField = 3;
- }
- message TWithRequired
- {
- required string RequiredField = 1;
- optional string NotRequiredField = 2;
- };
- 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 TAliased
- {
- optional int32 Key = 1 [(NYT.key_column_name) = "key"];
- optional double Subkey = 2 [(NYT.key_column_name) = "subkey"];
- optional TAggregated Data = 3;
- }
- ////////////////////////////////////////////////////////////////////////////////
- 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 TPacked
- {
- repeated int64 PackedListInt64 = 1 [(NYT.flags) = SERIALIZATION_YT, packed=true];
- }
- message TCyclic
- {
- option (NYT.default_field_flags) = SERIALIZATION_YT;
- message TA
- {
- option (NYT.default_field_flags) = SERIALIZATION_YT;
- repeated TB b = 1;
- optional TC c = 2;
- }
- message TB
- {
- option (NYT.default_field_flags) = SERIALIZATION_YT;
- optional TD d = 1;
- }
- message TC
- {
- option (NYT.default_field_flags) = SERIALIZATION_YT;
- optional TD d = 1;
- }
- message TD
- {
- option (NYT.default_field_flags) = SERIALIZATION_YT;
- optional TA a = 1;
- }
- message TE
- {
- optional TD d = 1 [(NYT.flags) = SERIALIZATION_PROTOBUF];
- }
- optional TA a = 1;
- }
- message TFieldSortOrder
- {
- message TEmbeddedDefault {
- optional int64 x = 2;
- optional string y = 12;
- optional bool z = 1;
- }
- message TEmbeddedAsInProtoFile {
- option (NYT.message_flags) = DEPRECATED_SORT_FIELDS_AS_IN_PROTO_FILE;
- optional int64 x = 2;
- optional string y = 12;
- optional bool z = 1;
- }
- message TEmbeddedByFieldNumber {
- option (NYT.message_flags) = SORT_FIELDS_BY_FIELD_NUMBER;
- optional int64 x = 2;
- optional string y = 12;
- optional bool z = 1;
- }
- option (NYT.default_field_flags) = SERIALIZATION_YT;
- optional TEmbeddedDefault EmbeddedDefault = 1;
- optional TEmbeddedAsInProtoFile EmbeddedAsInProtoFile = 2;
- optional TEmbeddedByFieldNumber EmbeddedByFieldNumber = 3;
- }
- message TWithMap
- {
- option (NYT.default_field_flags) = SERIALIZATION_YT;
- message TEmbedded {
- optional int64 x = 1;
- optional string y = 2;
- }
- map<int64, TEmbedded> MapDefault = 1;
- map<int64, TEmbedded> MapListOfStructsLegacy = 2 [(NYT.flags) = MAP_AS_LIST_OF_STRUCTS_LEGACY];
- map<int64, TEmbedded> MapListOfStructs = 3 [(NYT.flags) = MAP_AS_LIST_OF_STRUCTS];
- map<int64, TEmbedded> MapOptionalDict = 4 [(NYT.flags) = MAP_AS_OPTIONAL_DICT];
- map<int64, TEmbedded> MapDict = 5 [(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;
- }
- }
- message TEmbeddedStruct {
- optional float float1 = 1;
- optional string string1 = 2;
- }
- message TEmbedded2Message {
- option (NYT.default_field_flags) = SERIALIZATION_YT;
- optional uint64 embedded2_num = 10;
- optional TEmbeddedStruct embedded2_struct = 17;
- repeated string embedded2_repeated = 42;
- }
- message TEmbedded1Message {
- option (NYT.default_field_flags) = SERIALIZATION_YT;
- required TEmbedded2Message t2 = 1 [(NYT.flags) = EMBEDDED];
- oneof variant {
- string str_variant = 101;
- uint64 uint_variant = 102;
- }
- optional uint64 embedded_num = 10; // make intentional field_num collision!
- optional string embedded_extra_field = 11;
- }
- message TEmbeddingMessage {
- optional bytes other_columns_field = 15 [(NYT.flags) = OTHER_COLUMNS];
- required TEmbedded1Message t1 = 2 [(NYT.flags) = EMBEDDED];
- optional uint64 num = 12;
- optional string extra_field = 13;
- }
|