File: generated_code_proto2.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (82 lines) | stat: -rw-r--r-- 2,154 bytes parent folder | download | duplicates (9)
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
syntax = "proto2";

package a.b.proto2;

message TestMessage {
  optional int32 optional_int32 = 1;
  optional int64 optional_int64 = 2;
  optional uint32 optional_uint32 = 3;
  optional uint64 optional_uint64 = 4;
  optional bool optional_bool = 5;
  optional double optional_double = 6;
  optional float optional_float = 7;
  optional string optional_string = 8;
  optional bytes optional_bytes = 9;
  optional TestEnum optional_enum = 10;
  optional TestMessage optional_msg = 11;

  repeated int32 repeated_int32 = 21;
  repeated int64 repeated_int64 = 22;
  repeated uint32 repeated_uint32 = 23;
  repeated uint64 repeated_uint64 = 24;
  repeated bool repeated_bool = 25;
  repeated double repeated_double = 26;
  repeated float repeated_float = 27;
  repeated string repeated_string = 28;
  repeated bytes repeated_bytes = 29;
  repeated TestEnum repeated_enum = 30;
  repeated TestMessage repeated_msg = 31;

  required int32 required_int32 = 41;
  required int64 required_int64 = 42;
  required uint32 required_uint32 = 43;
  required uint64 required_uint64 = 44;
  required bool required_bool = 45;
  required double required_double = 46;
  required float required_float = 47;
  required string required_string = 48;
  required bytes required_bytes = 49;
  required TestEnum required_enum = 50;
  required TestMessage required_msg = 51;

  oneof my_oneof {
    int32 oneof_int32 = 61;
    int64 oneof_int64 = 62;
    uint32 oneof_uint32 = 63;
    uint64 oneof_uint64 = 64;
    bool oneof_bool = 65;
    double oneof_double = 66;
    float oneof_float = 67;
    string oneof_string = 68;
    bytes oneof_bytes = 69;
    TestEnum oneof_enum = 70;
    TestMessage oneof_msg = 71;
  }

  message NestedMessage {
    optional int32 foo = 1;
  }

  optional NestedMessage nested_message = 80;

  // Reserved for non-existing field test.
  // int32 non_exist = 89;
}

enum TestEnum {
  Default = 0;
  A = 1;
  B = 2;
  C = 3;

  v0 = 4;
}

message TestUnknown {
  optional TestUnknown optional_unknown = 11;
  repeated TestUnknown repeated_unknown = 31;
  oneof my_oneof {
    TestUnknown oneof_unknown = 51;
  }
  optional int32 unknown_field = 89;
}