Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: third_party/protobuf/java/core/src/test/proto/com/google/protobuf/field_presence_test.proto

Issue 2599263002: third_party/protobuf: Update to HEAD (f52e188fe4) (Closed)
Patch Set: Address comments Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 18 matching lines...) Expand all
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 30
31 syntax = "proto3"; 31 syntax = "proto3";
32 32
33 package field_presence_test; 33 package field_presence_test;
34 34
35 import "google/protobuf/unittest.proto"; 35 import "google/protobuf/unittest.proto";
36 36
37 option java_package = "com.google.protobuf"; 37 option java_package = "com.google.protobuf";
38 option java_outer_classname = "FieldPresenceTestProto"; 38 option java_outer_classname = "FieldPresenceTestProto";
39 option java_generate_equals_and_hash = true;
40 39
41 message TestAllTypes { 40 message TestAllTypes {
42 enum NestedEnum { 41 enum NestedEnum {
43 FOO = 0; 42 FOO = 0;
44 BAR = 1; 43 BAR = 1;
45 BAZ = 2; 44 BAZ = 2;
46 } 45 }
47 message NestedMessage { 46 message NestedMessage {
48 int32 value = 1; 47 int32 value = 1;
49 } 48 }
50 49
51 int32 optional_int32 = 1; 50 int32 optional_int32 = 1;
52 string optional_string = 2; 51 string optional_string = 2;
53 bytes optional_bytes = 3; 52 bytes optional_bytes = 3;
54 NestedEnum optional_nested_enum = 4; 53 NestedEnum optional_nested_enum = 4;
55 NestedMessage optional_nested_message = 5; 54 NestedMessage optional_nested_message = 5;
56 protobuf_unittest.TestRequired optional_proto2_message = 6; 55 protobuf_unittest.TestRequired optional_proto2_message = 6;
56 NestedMessage optional_lazy_message = 7 [lazy=true];
57 57
58 oneof oneof_field { 58 oneof oneof_field {
59 int32 oneof_int32 = 11; 59 int32 oneof_int32 = 11;
60 uint32 oneof_uint32 = 12; 60 uint32 oneof_uint32 = 12;
61 string oneof_string = 13; 61 string oneof_string = 13;
62 bytes oneof_bytes = 14; 62 bytes oneof_bytes = 14;
63 NestedEnum oneof_nested_enum = 15; 63 NestedEnum oneof_nested_enum = 15;
64 NestedMessage oneof_nested_message = 16; 64 NestedMessage oneof_nested_message = 16;
65 protobuf_unittest.TestRequired oneof_proto2_message = 17; 65 protobuf_unittest.TestRequired oneof_proto2_message = 17;
66 } 66 }
67 67
68 repeated int32 repeated_int32 = 21; 68 repeated int32 repeated_int32 = 21;
69 repeated string repeated_string = 22; 69 repeated string repeated_string = 22;
70 repeated bytes repeated_bytes = 23; 70 repeated bytes repeated_bytes = 23;
71 repeated NestedEnum repeated_nested_enum = 24; 71 repeated NestedEnum repeated_nested_enum = 24;
72 repeated NestedMessage repeated_nested_message = 25; 72 repeated NestedMessage repeated_nested_message = 25;
73 repeated protobuf_unittest.TestRequired repeated_proto2_message = 26; 73 repeated protobuf_unittest.TestRequired repeated_proto2_message = 26;
74 repeated NestedEnum packed_nested_enum = 27 [packed = true]; 74 repeated NestedEnum packed_nested_enum = 27 [packed = true];
75 } 75 }
76 76
77 message TestOptionalFieldsOnly { 77 message TestOptionalFieldsOnly {
78 int32 optional_int32 = 1; 78 int32 optional_int32 = 1;
79 string optional_string = 2; 79 string optional_string = 2;
80 bytes optional_bytes = 3; 80 bytes optional_bytes = 3;
81 TestAllTypes.NestedEnum optional_nested_enum = 4; 81 TestAllTypes.NestedEnum optional_nested_enum = 4;
82 TestAllTypes.NestedMessage optional_nested_message = 5; 82 TestAllTypes.NestedMessage optional_nested_message = 5;
83 protobuf_unittest.TestRequired optional_proto2_message = 6; 83 protobuf_unittest.TestRequired optional_proto2_message = 6;
84 TestAllTypes.NestedMessage optional_lazy_message = 7 [lazy=true];
84 } 85 }
85 86
86 message TestRepeatedFieldsOnly { 87 message TestRepeatedFieldsOnly {
87 repeated int32 repeated_int32 = 21; 88 repeated int32 repeated_int32 = 21;
88 repeated string repeated_string = 22; 89 repeated string repeated_string = 22;
89 repeated bytes repeated_bytes = 23; 90 repeated bytes repeated_bytes = 23;
90 repeated TestAllTypes.NestedEnum repeated_nested_enum = 24; 91 repeated TestAllTypes.NestedEnum repeated_nested_enum = 24;
91 repeated TestAllTypes.NestedMessage repeated_nested_message = 25; 92 repeated TestAllTypes.NestedMessage repeated_nested_message = 25;
92 repeated protobuf_unittest.TestRequired repeated_proto2_message = 26; 93 repeated protobuf_unittest.TestRequired repeated_proto2_message = 26;
93 } 94 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698