• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package com.google.common.truth.extensions.proto;
4
5import "google/protobuf/any.proto";
6
7option java_package = "com.google.common.truth.extensions.proto";
8option java_multiple_files = true;
9
10// For brevity: o_ means 'optional', r_ means 'repeated'
11
12// This file must be kept in sync with test_message2.proto for tests to work.
13// Field names and field numbers should all match. Features supported in one
14// syntax but not the other are commented out in the other file.
15
16message TestMessage3 {
17  enum TestEnum3 {
18    DEFAULT = 0;
19    ONE = 1;
20    TWO = 2;
21  }
22
23  int32 o_int = 1;
24  repeated string r_string = 2;
25  // optional int64 o_long_defaults_to_42 = 3 [default = 42];
26  TestEnum3 o_enum = 4;
27  float o_float = 5;
28  float o_float2 = 6;
29  double o_double = 7;
30  double o_double2 = 8;
31  // optional float o_float_defaults_to_42 = 9 [default = 42.0];
32  // optional double o_double_defaults_to_42 = 10 [default = 42.0];
33
34  // optional RequiredStringMessage3 o_required_string_message = 11;
35  // repeated RequiredStringMessage3 r_required_string_message = 12;
36  TestMessage3 o_test_message = 13;
37  repeated TestMessage3 r_test_message = 14;
38  SubTestMessage3 o_sub_test_message = 15;
39  repeated SubTestMessage3 r_sub_test_message = 16;
40  map<string, TestMessage3> test_message_map = 17;
41  .google.protobuf.Any o_any_message = 18;
42  repeated .google.protobuf.Any r_any_message = 19;
43
44  oneof oneof_field {
45    TestMessage3 oneof_message1 = 20;
46    TestMessage3 oneof_message2 = 21;
47  }
48}
49
50// message RequiredStringMessage3 {
51//   required string required_string = 1;
52// }
53
54message SubTestMessage3 {
55  int32 o_int = 1;
56  repeated string r_string = 2;
57  float o_float = 3;
58  double o_double = 4;
59
60  TestMessage3 o_test_message = 5;
61  SubSubTestMessage3 o_sub_sub_test_message = 6;
62}
63
64message SubSubTestMessage3 {
65  int32 o_int = 1;
66  repeated string r_string = 2;
67  float o_float = 3;
68  double o_double = 4;
69}
70