aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/interface/protobuf_file_options_ut.proto
blob: 4804b2f60c1e7d4ecf54f57a44bce0f633d08fb1 (plain) (blame)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import "yt/yt_proto/yt/formats/extension.proto";

package NYT.NTestingFileOptions;

option (NYT.file_default_field_flags) = SERIALIZATION_YT;
option (NYT.file_default_field_flags) = MAP_AS_LIST_OF_STRUCTS;
option (NYT.file_default_message_flags) = DEPRECATED_SORT_FIELDS_AS_IN_PROTO_FILE;
option (NYT.file_default_oneof_flags) = SEPARATE_FIELDS;

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_PROTOBUF];
    optional TUrlRow UrlRow_2 = 2;
}

message TRowMixedSerializationOptions
{
    option (NYT.default_field_flags) = SERIALIZATION_PROTOBUF;
    optional TUrlRow UrlRow_1 = 1;
    optional TUrlRow UrlRow_2 = 2 [(NYT.flags) = SERIALIZATION_YT];
}

message TRowSerializedRepeatedFields
{
    repeated int64 Ints = 1;
    repeated TUrlRow UrlRows = 2;
}

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
{
    message TEmbedded {
        optional int64 x = 1;
        optional string y = 2;
    }

    map<int64, TEmbedded> MapDefault = 1;
    map<int64, TEmbedded> MapDict = 5 [(NYT.flags) = MAP_AS_DICT];
}

message TWithOneof
{
    message TEmbedded
    {
        oneof Oneof {
            int64 x = 1;
            string y = 2;
        }
    }

    message TDefaultVariant
    {
        option (NYT.default_oneof_flags) = VARIANT;
        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 TNoDefault
    {
        optional string field = 1;

        oneof Oneof2
        {
            string y2 = 4;
            TEmbedded z2 = 6;
            int64 x2 = 2;
        }

        oneof Oneof1
        {
            int64 x1 = 10;
            string y1 = 3;
            TEmbedded z1 = 5;
        }
    }

    message TSerializationProtobuf
    {
        option (NYT.default_field_flags) = SERIALIZATION_PROTOBUF;
        oneof Oneof
        {
            int64 x1 = 2;
            string y1 = 1;
            TEmbedded z1 = 3;
        }
    }

    optional TDefaultVariant DefaultVariant = 1;
    optional TNoDefault NoDefault = 2;
    optional TSerializationProtobuf SerializationProtobuf = 3;

    oneof TopLevelOneof
    {
        int64 MemberOfTopLevelOneof = 4;
    }
}