Add test protos to test project
Fix generated group code missing end group tag case
Fix generated field classes searching for presence index for extensions
diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh
index 55e87d3..06daa4e 100755
--- a/csharp/generate_protos.sh
+++ b/csharp/generate_protos.sh
@@ -52,6 +52,9 @@
csharp/protos/unittest_proto3.proto \
csharp/protos/unittest_import_proto3.proto \
csharp/protos/unittest_import_public_proto3.proto \
+ csharp/protos/unittest.proto \
+ csharp/protos/unittest_import.proto \
+ csharp/protos/unittest_import_public.proto \
src/google/protobuf/unittest_well_known_types.proto \
src/google/protobuf/test_messages_proto3.proto \
src/google/protobuf/test_messages_proto2.proto
diff --git a/csharp/protos/unittest.proto b/csharp/protos/unittest.proto
new file mode 100644
index 0000000..15db332
--- /dev/null
+++ b/csharp/protos/unittest.proto
@@ -0,0 +1,1107 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+// Based on original Protocol Buffers design by
+// Sanjay Ghemawat, Jeff Dean, and others.
+//
+// A proto file we will use for unit testing.
+//
+// LINT: ALLOW_GROUPS, LEGACY_NAMES
+
+syntax = "proto2";
+
+// Some generic_services option(s) added automatically.
+// See: http://go/proto2-generic-services-default
+option cc_generic_services = true; // auto-added
+option java_generic_services = true; // auto-added
+option py_generic_services = true; // auto-added
+option cc_enable_arenas = true;
+
+import "unittest_import.proto";
+
+// We don't put this in a package within proto2 because we need to make sure
+// that the generated code doesn't depend on being in the proto2 namespace.
+// In test_util.h we do "using namespace unittest = protobuf_unittest".
+package protobuf_unittest_proto2;
+
+// Protos optimized for SPEED use a strict superset of the generated code
+// of equivalent ones optimized for CODE_SIZE, so we should optimize all our
+// tests for speed unless explicitly testing code size optimization.
+option optimize_for = SPEED;
+
+option csharp_namespace = "Google.Protobuf.TestProtos.Proto2";
+
+// This proto includes every type of field in both singular and repeated
+// forms.
+message TestAllTypes {
+ message NestedMessage {
+ // The field name "b" fails to compile in proto1 because it conflicts with
+ // a local variable named "b" in one of the generated methods. Doh.
+ // This file needs to compile in proto1 to test backwards-compatibility.
+ optional int32 bb = 1;
+ }
+
+ enum NestedEnum {
+ FOO = 1;
+ BAR = 2;
+ BAZ = 3;
+ NEG = -1; // Intentionally negative.
+ }
+
+ // Singular
+ optional int32 optional_int32 = 1;
+ optional int64 optional_int64 = 2;
+ optional uint32 optional_uint32 = 3;
+ optional uint64 optional_uint64 = 4;
+ optional sint32 optional_sint32 = 5;
+ optional sint64 optional_sint64 = 6;
+ optional fixed32 optional_fixed32 = 7;
+ optional fixed64 optional_fixed64 = 8;
+ optional sfixed32 optional_sfixed32 = 9;
+ optional sfixed64 optional_sfixed64 = 10;
+ optional float optional_float = 11;
+ optional double optional_double = 12;
+ optional bool optional_bool = 13;
+ optional string optional_string = 14;
+ optional bytes optional_bytes = 15;
+
+ optional group OptionalGroup = 16 {
+ optional int32 a = 17;
+ }
+
+ optional NestedMessage optional_nested_message = 18;
+ optional ForeignMessage optional_foreign_message = 19;
+ optional protobuf_unittest_import_proto2.ImportMessage optional_import_message = 20;
+
+ optional NestedEnum optional_nested_enum = 21;
+ optional ForeignEnum optional_foreign_enum = 22;
+ optional protobuf_unittest_import_proto2.ImportEnum optional_import_enum = 23;
+
+ optional string optional_string_piece = 24 [ctype=STRING_PIECE];
+ optional string optional_cord = 25 [ctype=CORD];
+
+ // Defined in unittest_import_public.proto
+ optional protobuf_unittest_import_proto2.PublicImportMessage
+ optional_public_import_message = 26;
+
+ optional NestedMessage optional_lazy_message = 27 [lazy=true];
+
+ // Repeated
+ repeated int32 repeated_int32 = 31;
+ repeated int64 repeated_int64 = 32;
+ repeated uint32 repeated_uint32 = 33;
+ repeated uint64 repeated_uint64 = 34;
+ repeated sint32 repeated_sint32 = 35;
+ repeated sint64 repeated_sint64 = 36;
+ repeated fixed32 repeated_fixed32 = 37;
+ repeated fixed64 repeated_fixed64 = 38;
+ repeated sfixed32 repeated_sfixed32 = 39;
+ repeated sfixed64 repeated_sfixed64 = 40;
+ repeated float repeated_float = 41;
+ repeated double repeated_double = 42;
+ repeated bool repeated_bool = 43;
+ repeated string repeated_string = 44;
+ repeated bytes repeated_bytes = 45;
+
+ repeated group RepeatedGroup = 46 {
+ optional int32 a = 47;
+ }
+
+ repeated NestedMessage repeated_nested_message = 48;
+ repeated ForeignMessage repeated_foreign_message = 49;
+ repeated protobuf_unittest_import_proto2.ImportMessage repeated_import_message = 50;
+
+ repeated NestedEnum repeated_nested_enum = 51;
+ repeated ForeignEnum repeated_foreign_enum = 52;
+ repeated protobuf_unittest_import_proto2.ImportEnum repeated_import_enum = 53;
+
+ repeated string repeated_string_piece = 54 [ctype=STRING_PIECE];
+ repeated string repeated_cord = 55 [ctype=CORD];
+
+ repeated NestedMessage repeated_lazy_message = 57 [lazy=true];
+
+ // Singular with defaults
+ optional int32 default_int32 = 61 [default = 41 ];
+ optional int64 default_int64 = 62 [default = 42 ];
+ optional uint32 default_uint32 = 63 [default = 43 ];
+ optional uint64 default_uint64 = 64 [default = 44 ];
+ optional sint32 default_sint32 = 65 [default = -45 ];
+ optional sint64 default_sint64 = 66 [default = 46 ];
+ optional fixed32 default_fixed32 = 67 [default = 47 ];
+ optional fixed64 default_fixed64 = 68 [default = 48 ];
+ optional sfixed32 default_sfixed32 = 69 [default = 49 ];
+ optional sfixed64 default_sfixed64 = 70 [default = -50 ];
+ optional float default_float = 71 [default = 51.5 ];
+ optional double default_double = 72 [default = 52e3 ];
+ optional bool default_bool = 73 [default = true ];
+ optional string default_string = 74 [default = "hello"];
+ optional bytes default_bytes = 75 [default = "world"];
+
+ optional NestedEnum default_nested_enum = 81 [default = BAR ];
+ optional ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
+ optional protobuf_unittest_import_proto2.ImportEnum
+ default_import_enum = 83 [default = IMPORT_BAR];
+
+ optional string default_string_piece = 84 [ctype=STRING_PIECE,default="abc"];
+ optional string default_cord = 85 [ctype=CORD,default="123"];
+
+ // For oneof test
+ oneof oneof_field {
+ uint32 oneof_uint32 = 111;
+ NestedMessage oneof_nested_message = 112;
+ string oneof_string = 113;
+ bytes oneof_bytes = 114;
+ }
+}
+
+// This proto includes a recusively nested message.
+message NestedTestAllTypes {
+ optional NestedTestAllTypes child = 1;
+ optional TestAllTypes payload = 2;
+ repeated NestedTestAllTypes repeated_child = 3;
+}
+
+message TestDeprecatedFields {
+ optional int32 deprecated_int32 = 1 [deprecated=true];
+ oneof oneof_fields {
+ int32 deprecated_int32_in_oneof = 2 [deprecated=true];
+ }
+}
+
+message TestDeprecatedMessage {
+ option deprecated = true;
+}
+
+// Define these after TestAllTypes to make sure the compiler can handle
+// that.
+message ForeignMessage {
+ optional int32 c = 1;
+ optional int32 d = 2;
+}
+
+enum ForeignEnum {
+ FOREIGN_FOO = 4;
+ FOREIGN_BAR = 5;
+ FOREIGN_BAZ = 6;
+}
+
+message TestReservedFields {
+ reserved 2, 15, 9 to 11;
+ reserved "bar", "baz";
+}
+
+message TestAllExtensions {
+ extensions 1 to max;
+}
+
+extend TestAllExtensions {
+ // Singular
+ optional int32 optional_int32_extension = 1;
+ optional int64 optional_int64_extension = 2;
+ optional uint32 optional_uint32_extension = 3;
+ optional uint64 optional_uint64_extension = 4;
+ optional sint32 optional_sint32_extension = 5;
+ optional sint64 optional_sint64_extension = 6;
+ optional fixed32 optional_fixed32_extension = 7;
+ optional fixed64 optional_fixed64_extension = 8;
+ optional sfixed32 optional_sfixed32_extension = 9;
+ optional sfixed64 optional_sfixed64_extension = 10;
+ optional float optional_float_extension = 11;
+ optional double optional_double_extension = 12;
+ optional bool optional_bool_extension = 13;
+ optional string optional_string_extension = 14;
+ optional bytes optional_bytes_extension = 15;
+
+ optional group OptionalGroup_extension = 16 {
+ optional int32 a = 17;
+ }
+
+ optional TestAllTypes.NestedMessage optional_nested_message_extension = 18;
+ optional ForeignMessage optional_foreign_message_extension = 19;
+ optional protobuf_unittest_import_proto2.ImportMessage
+ optional_import_message_extension = 20;
+
+ optional TestAllTypes.NestedEnum optional_nested_enum_extension = 21;
+ optional ForeignEnum optional_foreign_enum_extension = 22;
+ optional protobuf_unittest_import_proto2.ImportEnum
+ optional_import_enum_extension = 23;
+
+ optional string optional_string_piece_extension = 24 [ctype=STRING_PIECE];
+ optional string optional_cord_extension = 25 [ctype=CORD];
+
+ optional protobuf_unittest_import_proto2.PublicImportMessage
+ optional_public_import_message_extension = 26;
+
+ optional TestAllTypes.NestedMessage
+ optional_lazy_message_extension = 27 [lazy=true];
+
+ // Repeated
+ repeated int32 repeated_int32_extension = 31;
+ repeated int64 repeated_int64_extension = 32;
+ repeated uint32 repeated_uint32_extension = 33;
+ repeated uint64 repeated_uint64_extension = 34;
+ repeated sint32 repeated_sint32_extension = 35;
+ repeated sint64 repeated_sint64_extension = 36;
+ repeated fixed32 repeated_fixed32_extension = 37;
+ repeated fixed64 repeated_fixed64_extension = 38;
+ repeated sfixed32 repeated_sfixed32_extension = 39;
+ repeated sfixed64 repeated_sfixed64_extension = 40;
+ repeated float repeated_float_extension = 41;
+ repeated double repeated_double_extension = 42;
+ repeated bool repeated_bool_extension = 43;
+ repeated string repeated_string_extension = 44;
+ repeated bytes repeated_bytes_extension = 45;
+
+ repeated group RepeatedGroup_extension = 46 {
+ optional int32 a = 47;
+ }
+
+ repeated TestAllTypes.NestedMessage repeated_nested_message_extension = 48;
+ repeated ForeignMessage repeated_foreign_message_extension = 49;
+ repeated protobuf_unittest_import_proto2.ImportMessage
+ repeated_import_message_extension = 50;
+
+ repeated TestAllTypes.NestedEnum repeated_nested_enum_extension = 51;
+ repeated ForeignEnum repeated_foreign_enum_extension = 52;
+ repeated protobuf_unittest_import_proto2.ImportEnum
+ repeated_import_enum_extension = 53;
+
+ repeated string repeated_string_piece_extension = 54 [ctype=STRING_PIECE];
+ repeated string repeated_cord_extension = 55 [ctype=CORD];
+
+ repeated TestAllTypes.NestedMessage
+ repeated_lazy_message_extension = 57 [lazy=true];
+
+ // Singular with defaults
+ optional int32 default_int32_extension = 61 [default = 41 ];
+ optional int64 default_int64_extension = 62 [default = 42 ];
+ optional uint32 default_uint32_extension = 63 [default = 43 ];
+ optional uint64 default_uint64_extension = 64 [default = 44 ];
+ optional sint32 default_sint32_extension = 65 [default = -45 ];
+ optional sint64 default_sint64_extension = 66 [default = 46 ];
+ optional fixed32 default_fixed32_extension = 67 [default = 47 ];
+ optional fixed64 default_fixed64_extension = 68 [default = 48 ];
+ optional sfixed32 default_sfixed32_extension = 69 [default = 49 ];
+ optional sfixed64 default_sfixed64_extension = 70 [default = -50 ];
+ optional float default_float_extension = 71 [default = 51.5 ];
+ optional double default_double_extension = 72 [default = 52e3 ];
+ optional bool default_bool_extension = 73 [default = true ];
+ optional string default_string_extension = 74 [default = "hello"];
+ optional bytes default_bytes_extension = 75 [default = "world"];
+
+ optional TestAllTypes.NestedEnum
+ default_nested_enum_extension = 81 [default = BAR];
+ optional ForeignEnum
+ default_foreign_enum_extension = 82 [default = FOREIGN_BAR];
+ optional protobuf_unittest_import_proto2.ImportEnum
+ default_import_enum_extension = 83 [default = IMPORT_BAR];
+
+ optional string default_string_piece_extension = 84 [ctype=STRING_PIECE,
+ default="abc"];
+ optional string default_cord_extension = 85 [ctype=CORD, default="123"];
+
+ // For oneof test
+ optional uint32 oneof_uint32_extension = 111;
+ optional TestAllTypes.NestedMessage oneof_nested_message_extension = 112;
+ optional string oneof_string_extension = 113;
+ optional bytes oneof_bytes_extension = 114;
+}
+
+message TestGroup {
+ optional group OptionalGroup = 16 {
+ optional int32 a = 17;
+ }
+ optional ForeignEnum optional_foreign_enum = 22;
+}
+
+message TestGroupExtension {
+ extensions 1 to max;
+}
+
+message TestNestedExtension {
+ extend TestAllExtensions {
+ // Check for bug where string extensions declared in tested scope did not
+ // compile.
+ optional string test = 1002 [default="test"];
+ // Used to test if generated extension name is correct when there are
+ // underscores.
+ optional string nested_string_extension = 1003;
+ }
+
+ extend TestGroupExtension {
+ optional group OptionalGroup_extension = 16 {
+ optional int32 a = 17;
+ }
+ optional ForeignEnum optional_foreign_enum_extension = 22;
+ }
+}
+
+// We have separate messages for testing required fields because it's
+// annoying to have to fill in required fields in TestProto in order to
+// do anything with it. Note that we don't need to test every type of
+// required filed because the code output is basically identical to
+// optional fields for all types.
+message TestRequired {
+ required int32 a = 1;
+ optional int32 dummy2 = 2;
+ required int32 b = 3;
+
+ extend TestAllExtensions {
+ optional TestRequired single = 1000;
+ repeated TestRequired multi = 1001;
+ }
+
+ // Pad the field count to 32 so that we can test that IsInitialized()
+ // properly checks multiple elements of has_bits_.
+ optional int32 dummy4 = 4;
+ optional int32 dummy5 = 5;
+ optional int32 dummy6 = 6;
+ optional int32 dummy7 = 7;
+ optional int32 dummy8 = 8;
+ optional int32 dummy9 = 9;
+ optional int32 dummy10 = 10;
+ optional int32 dummy11 = 11;
+ optional int32 dummy12 = 12;
+ optional int32 dummy13 = 13;
+ optional int32 dummy14 = 14;
+ optional int32 dummy15 = 15;
+ optional int32 dummy16 = 16;
+ optional int32 dummy17 = 17;
+ optional int32 dummy18 = 18;
+ optional int32 dummy19 = 19;
+ optional int32 dummy20 = 20;
+ optional int32 dummy21 = 21;
+ optional int32 dummy22 = 22;
+ optional int32 dummy23 = 23;
+ optional int32 dummy24 = 24;
+ optional int32 dummy25 = 25;
+ optional int32 dummy26 = 26;
+ optional int32 dummy27 = 27;
+ optional int32 dummy28 = 28;
+ optional int32 dummy29 = 29;
+ optional int32 dummy30 = 30;
+ optional int32 dummy31 = 31;
+ optional int32 dummy32 = 32;
+
+ required int32 c = 33;
+}
+
+message TestRequiredForeign {
+ optional TestRequired optional_message = 1;
+ repeated TestRequired repeated_message = 2;
+ optional int32 dummy = 3;
+}
+
+message TestRequiredMessage {
+ optional TestRequired optional_message = 1;
+ repeated TestRequired repeated_message = 2;
+ required TestRequired required_message = 3;
+}
+
+// Test that we can use NestedMessage from outside TestAllTypes.
+message TestForeignNested {
+ optional TestAllTypes.NestedMessage foreign_nested = 1;
+}
+
+// TestEmptyMessage is used to test unknown field support.
+message TestEmptyMessage {
+}
+
+// Like above, but declare all field numbers as potential extensions. No
+// actual extensions should ever be defined for this type.
+message TestEmptyMessageWithExtensions {
+ extensions 1 to max;
+}
+
+message TestMultipleExtensionRanges {
+ extensions 42;
+ extensions 4143 to 4243;
+ extensions 65536 to max;
+}
+
+// Test that really large tag numbers don't break anything.
+message TestReallyLargeTagNumber {
+ // The largest possible tag number is 2^28 - 1, since the wire format uses
+ // three bits to communicate wire type.
+ optional int32 a = 1;
+ optional int32 bb = 268435455;
+}
+
+message TestRecursiveMessage {
+ optional TestRecursiveMessage a = 1;
+ optional int32 i = 2;
+}
+
+// Test that mutual recursion works.
+message TestMutualRecursionA {
+ message SubMessage {
+ optional TestMutualRecursionB b = 1;
+ }
+ optional TestMutualRecursionB bb = 1;
+ optional group SubGroup = 2 {
+ optional SubMessage sub_message = 3; // Needed because of bug in javatest
+ optional TestAllTypes not_in_this_scc = 4;
+ }
+}
+
+message TestMutualRecursionB {
+ optional TestMutualRecursionA a = 1;
+ optional int32 optional_int32 = 2;
+}
+
+message TestIsInitialized {
+ message SubMessage {
+ optional group SubGroup = 1 {
+ required int32 i = 2;
+ }
+ }
+ optional SubMessage sub_message = 1;
+}
+
+// Test that groups have disjoint field numbers from their siblings and
+// parents. This is NOT possible in proto1; only google.protobuf. When attempting
+// to compile with proto1, this will emit an error; so we only include it
+// in protobuf_unittest_proto.
+message TestDupFieldNumber { // NO_PROTO1
+ optional int32 a = 1; // NO_PROTO1
+ optional group Foo = 2 { optional int32 a = 1; } // NO_PROTO1
+ optional group Bar = 3 { optional int32 a = 1; } // NO_PROTO1
+} // NO_PROTO1
+
+// Additional messages for testing lazy fields.
+message TestEagerMessage {
+ optional TestAllTypes sub_message = 1 [lazy=false];
+}
+message TestLazyMessage {
+ optional TestAllTypes sub_message = 1 [lazy=true];
+}
+
+// Needed for a Python test.
+message TestNestedMessageHasBits {
+ message NestedMessage {
+ repeated int32 nestedmessage_repeated_int32 = 1;
+ repeated ForeignMessage nestedmessage_repeated_foreignmessage = 2;
+ }
+ optional NestedMessage optional_nested_message = 1;
+}
+
+
+// Test an enum that has multiple values with the same number.
+enum TestEnumWithDupValue {
+ option allow_alias = true;
+
+ FOO1 = 1;
+ BAR1 = 2;
+ BAZ = 3;
+ FOO2 = 1;
+ BAR2 = 2;
+}
+
+// Test an enum with large, unordered values.
+enum TestSparseEnum {
+ SPARSE_A = 123;
+ SPARSE_B = 62374;
+ SPARSE_C = 12589234;
+ SPARSE_D = -15;
+ SPARSE_E = -53452;
+ SPARSE_F = 0;
+ SPARSE_G = 2;
+}
+
+// Test message with CamelCase field names. This violates Protocol Buffer
+// standard style.
+message TestCamelCaseFieldNames {
+ optional int32 PrimitiveField = 1;
+ optional string StringField = 2;
+ optional ForeignEnum EnumField = 3;
+ optional ForeignMessage MessageField = 4;
+ optional string StringPieceField = 5 [ctype=STRING_PIECE];
+ optional string CordField = 6 [ctype=CORD];
+
+ repeated int32 RepeatedPrimitiveField = 7;
+ repeated string RepeatedStringField = 8;
+ repeated ForeignEnum RepeatedEnumField = 9;
+ repeated ForeignMessage RepeatedMessageField = 10;
+ repeated string RepeatedStringPieceField = 11 [ctype=STRING_PIECE];
+ repeated string RepeatedCordField = 12 [ctype=CORD];
+}
+
+
+// We list fields out of order, to ensure that we're using field number and not
+// field index to determine serialization order.
+message TestFieldOrderings {
+ optional string my_string = 11;
+ extensions 2 to 10;
+ optional int64 my_int = 1;
+ extensions 12 to 100;
+ optional float my_float = 101;
+ message NestedMessage {
+ optional int64 oo = 2;
+ // The field name "b" fails to compile in proto1 because it conflicts with
+ // a local variable named "b" in one of the generated methods. Doh.
+ // This file needs to compile in proto1 to test backwards-compatibility.
+ optional int32 bb = 1;
+ }
+
+ optional NestedMessage optional_nested_message = 200;
+}
+
+extend TestFieldOrderings {
+ optional string my_extension_string = 50;
+ optional int32 my_extension_int = 5;
+}
+
+message TestExtensionOrderings1 {
+ extend TestFieldOrderings {
+ optional TestExtensionOrderings1 test_ext_orderings1 = 13;
+ }
+ optional string my_string = 1;
+}
+
+message TestExtensionOrderings2 {
+ extend TestFieldOrderings {
+ optional TestExtensionOrderings2 test_ext_orderings2 = 12;
+ }
+ message TestExtensionOrderings3 {
+ extend TestFieldOrderings {
+ optional TestExtensionOrderings3 test_ext_orderings3 = 14;
+ }
+ optional string my_string = 1;
+ }
+ optional string my_string = 1;
+}
+
+message TestExtremeDefaultValues {
+ optional bytes escaped_bytes = 1 [default = "\0\001\a\b\f\n\r\t\v\\\'\"\xfe"];
+ optional uint32 large_uint32 = 2 [default = 0xFFFFFFFF];
+ optional uint64 large_uint64 = 3 [default = 0xFFFFFFFFFFFFFFFF];
+ optional int32 small_int32 = 4 [default = -0x7FFFFFFF];
+ optional int64 small_int64 = 5 [default = -0x7FFFFFFFFFFFFFFF];
+ optional int32 really_small_int32 = 21 [default = -0x80000000];
+ optional int64 really_small_int64 = 22 [default = -0x8000000000000000];
+
+ // The default value here is UTF-8 for "\u1234". (We could also just type
+ // the UTF-8 text directly into this text file rather than escape it, but
+ // lots of people use editors that would be confused by this.)
+ optional string utf8_string = 6 [default = "\341\210\264"];
+
+ // Tests for single-precision floating-point values.
+ optional float zero_float = 7 [default = 0];
+ optional float one_float = 8 [default = 1];
+ optional float small_float = 9 [default = 1.5];
+ optional float negative_one_float = 10 [default = -1];
+ optional float negative_float = 11 [default = -1.5];
+ // Using exponents
+ optional float large_float = 12 [default = 2E8];
+ optional float small_negative_float = 13 [default = -8e-28];
+
+ // Text for nonfinite floating-point values.
+ optional double inf_double = 14 [default = inf];
+ optional double neg_inf_double = 15 [default = -inf];
+ optional double nan_double = 16 [default = nan];
+ optional float inf_float = 17 [default = inf];
+ optional float neg_inf_float = 18 [default = -inf];
+ optional float nan_float = 19 [default = nan];
+
+ // Tests for C++ trigraphs.
+ // Trigraphs should be escaped in C++ generated files, but they should not be
+ // escaped for other languages.
+ // Note that in .proto file, "\?" is a valid way to escape ? in string
+ // literals.
+ optional string cpp_trigraph = 20 [default = "? \? ?? \?? \??? ??/ ?\?-"];
+
+ // String defaults containing the character '\000'
+ optional string string_with_zero = 23 [default = "hel\000lo"];
+ optional bytes bytes_with_zero = 24 [default = "wor\000ld"];
+ optional string string_piece_with_zero = 25 [ctype=STRING_PIECE,
+ default="ab\000c"];
+ optional string cord_with_zero = 26 [ctype=CORD,
+ default="12\0003"];
+ optional string replacement_string = 27 [default="${unknown}"];
+}
+
+message SparseEnumMessage {
+ optional TestSparseEnum sparse_enum = 1;
+}
+
+// Test String and Bytes: string is for valid UTF-8 strings
+message OneString {
+ optional string data = 1;
+}
+
+message MoreString {
+ repeated string data = 1;
+}
+
+message OneBytes {
+ optional bytes data = 1;
+}
+
+message MoreBytes {
+ repeated bytes data = 1;
+}
+
+// Test int32, uint32, int64, uint64, and bool are all compatible
+message Int32Message {
+ optional int32 data = 1;
+}
+
+message Uint32Message {
+ optional uint32 data = 1;
+}
+
+message Int64Message {
+ optional int64 data = 1;
+}
+
+message Uint64Message {
+ optional uint64 data = 1;
+}
+
+message BoolMessage {
+ optional bool data = 1;
+}
+
+// Test oneofs.
+message TestOneof {
+ oneof foo {
+ int32 foo_int = 1;
+ string foo_string = 2;
+ TestAllTypes foo_message = 3;
+ group FooGroup = 4 {
+ optional int32 a = 5;
+ optional string b = 6;
+ }
+ }
+}
+
+message TestOneofBackwardsCompatible {
+ optional int32 foo_int = 1;
+ optional string foo_string = 2;
+ optional TestAllTypes foo_message = 3;
+ optional group FooGroup = 4 {
+ optional int32 a = 5;
+ optional string b = 6;
+ }
+}
+
+message TestOneof2 {
+ oneof foo {
+ int32 foo_int = 1;
+ string foo_string = 2;
+ string foo_cord = 3 [ctype=CORD];
+ string foo_string_piece = 4 [ctype=STRING_PIECE];
+ bytes foo_bytes = 5;
+ NestedEnum foo_enum = 6;
+ NestedMessage foo_message = 7;
+ group FooGroup = 8 {
+ optional int32 a = 9;
+ optional string b = 10;
+ }
+ NestedMessage foo_lazy_message = 11 [lazy=true];
+ }
+
+ oneof bar {
+ int32 bar_int = 12 [default = 5];
+ string bar_string = 13 [default = "STRING"];
+ string bar_cord = 14 [ctype=CORD, default = "CORD"];
+ string bar_string_piece = 15 [ctype=STRING_PIECE, default = "SPIECE"];
+ bytes bar_bytes = 16 [default = "BYTES"];
+ NestedEnum bar_enum = 17 [default = BAR];
+ }
+
+ optional int32 baz_int = 18;
+ optional string baz_string = 19 [default = "BAZ"];
+
+ message NestedMessage {
+ optional int64 qux_int = 1;
+ repeated int32 corge_int = 2;
+ }
+
+ enum NestedEnum {
+ FOO = 1;
+ BAR = 2;
+ BAZ = 3;
+ }
+}
+
+message TestRequiredOneof {
+ oneof foo {
+ int32 foo_int = 1;
+ string foo_string = 2;
+ NestedMessage foo_message = 3;
+ }
+ message NestedMessage {
+ required double required_double = 1;
+ }
+}
+
+
+// Test messages for packed fields
+
+message TestPackedTypes {
+ repeated int32 packed_int32 = 90 [packed = true];
+ repeated int64 packed_int64 = 91 [packed = true];
+ repeated uint32 packed_uint32 = 92 [packed = true];
+ repeated uint64 packed_uint64 = 93 [packed = true];
+ repeated sint32 packed_sint32 = 94 [packed = true];
+ repeated sint64 packed_sint64 = 95 [packed = true];
+ repeated fixed32 packed_fixed32 = 96 [packed = true];
+ repeated fixed64 packed_fixed64 = 97 [packed = true];
+ repeated sfixed32 packed_sfixed32 = 98 [packed = true];
+ repeated sfixed64 packed_sfixed64 = 99 [packed = true];
+ repeated float packed_float = 100 [packed = true];
+ repeated double packed_double = 101 [packed = true];
+ repeated bool packed_bool = 102 [packed = true];
+ repeated ForeignEnum packed_enum = 103 [packed = true];
+}
+
+// A message with the same fields as TestPackedTypes, but without packing. Used
+// to test packed <-> unpacked wire compatibility.
+message TestUnpackedTypes {
+ repeated int32 unpacked_int32 = 90 [packed = false];
+ repeated int64 unpacked_int64 = 91 [packed = false];
+ repeated uint32 unpacked_uint32 = 92 [packed = false];
+ repeated uint64 unpacked_uint64 = 93 [packed = false];
+ repeated sint32 unpacked_sint32 = 94 [packed = false];
+ repeated sint64 unpacked_sint64 = 95 [packed = false];
+ repeated fixed32 unpacked_fixed32 = 96 [packed = false];
+ repeated fixed64 unpacked_fixed64 = 97 [packed = false];
+ repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
+ repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
+ repeated float unpacked_float = 100 [packed = false];
+ repeated double unpacked_double = 101 [packed = false];
+ repeated bool unpacked_bool = 102 [packed = false];
+ repeated ForeignEnum unpacked_enum = 103 [packed = false];
+}
+
+message TestPackedExtensions {
+ extensions 1 to max;
+}
+
+extend TestPackedExtensions {
+ repeated int32 packed_int32_extension = 90 [packed = true];
+ repeated int64 packed_int64_extension = 91 [packed = true];
+ repeated uint32 packed_uint32_extension = 92 [packed = true];
+ repeated uint64 packed_uint64_extension = 93 [packed = true];
+ repeated sint32 packed_sint32_extension = 94 [packed = true];
+ repeated sint64 packed_sint64_extension = 95 [packed = true];
+ repeated fixed32 packed_fixed32_extension = 96 [packed = true];
+ repeated fixed64 packed_fixed64_extension = 97 [packed = true];
+ repeated sfixed32 packed_sfixed32_extension = 98 [packed = true];
+ repeated sfixed64 packed_sfixed64_extension = 99 [packed = true];
+ repeated float packed_float_extension = 100 [packed = true];
+ repeated double packed_double_extension = 101 [packed = true];
+ repeated bool packed_bool_extension = 102 [packed = true];
+ repeated ForeignEnum packed_enum_extension = 103 [packed = true];
+}
+
+message TestUnpackedExtensions {
+ extensions 1 to max;
+}
+
+extend TestUnpackedExtensions {
+ repeated int32 unpacked_int32_extension = 90 [packed = false];
+ repeated int64 unpacked_int64_extension = 91 [packed = false];
+ repeated uint32 unpacked_uint32_extension = 92 [packed = false];
+ repeated uint64 unpacked_uint64_extension = 93 [packed = false];
+ repeated sint32 unpacked_sint32_extension = 94 [packed = false];
+ repeated sint64 unpacked_sint64_extension = 95 [packed = false];
+ repeated fixed32 unpacked_fixed32_extension = 96 [packed = false];
+ repeated fixed64 unpacked_fixed64_extension = 97 [packed = false];
+ repeated sfixed32 unpacked_sfixed32_extension = 98 [packed = false];
+ repeated sfixed64 unpacked_sfixed64_extension = 99 [packed = false];
+ repeated float unpacked_float_extension = 100 [packed = false];
+ repeated double unpacked_double_extension = 101 [packed = false];
+ repeated bool unpacked_bool_extension = 102 [packed = false];
+ repeated ForeignEnum unpacked_enum_extension = 103 [packed = false];
+}
+
+// Used by ExtensionSetTest/DynamicExtensions. The test actually builds
+// a set of extensions to TestAllExtensions dynamically, based on the fields
+// of this message type.
+message TestDynamicExtensions {
+ enum DynamicEnumType {
+ DYNAMIC_FOO = 2200;
+ DYNAMIC_BAR = 2201;
+ DYNAMIC_BAZ = 2202;
+ }
+ message DynamicMessageType {
+ optional int32 dynamic_field = 2100;
+ }
+
+ optional fixed32 scalar_extension = 2000;
+ optional ForeignEnum enum_extension = 2001;
+ optional DynamicEnumType dynamic_enum_extension = 2002;
+
+ optional ForeignMessage message_extension = 2003;
+ optional DynamicMessageType dynamic_message_extension = 2004;
+
+ repeated string repeated_extension = 2005;
+ repeated sint32 packed_extension = 2006 [packed = true];
+}
+
+message TestRepeatedScalarDifferentTagSizes {
+ // Parsing repeated fixed size values used to fail. This message needs to be
+ // used in order to get a tag of the right size; all of the repeated fields
+ // in TestAllTypes didn't trigger the check.
+ repeated fixed32 repeated_fixed32 = 12;
+ // Check for a varint type, just for good measure.
+ repeated int32 repeated_int32 = 13;
+
+ // These have two-byte tags.
+ repeated fixed64 repeated_fixed64 = 2046;
+ repeated int64 repeated_int64 = 2047;
+
+ // Three byte tags.
+ repeated float repeated_float = 262142;
+ repeated uint64 repeated_uint64 = 262143;
+}
+
+// Test that if an optional or required message/group field appears multiple
+// times in the input, they need to be merged.
+message TestParsingMerge {
+ // RepeatedFieldsGenerator defines matching field types as TestParsingMerge,
+ // except that all fields are repeated. In the tests, we will serialize the
+ // RepeatedFieldsGenerator to bytes, and parse the bytes to TestParsingMerge.
+ // Repeated fields in RepeatedFieldsGenerator are expected to be merged into
+ // the corresponding required/optional fields in TestParsingMerge.
+ message RepeatedFieldsGenerator {
+ repeated TestAllTypes field1 = 1;
+ repeated TestAllTypes field2 = 2;
+ repeated TestAllTypes field3 = 3;
+ repeated group Group1 = 10 {
+ optional TestAllTypes field1 = 11;
+ }
+ repeated group Group2 = 20 {
+ optional TestAllTypes field1 = 21;
+ }
+ repeated TestAllTypes ext1 = 1000;
+ repeated TestAllTypes ext2 = 1001;
+ }
+ required TestAllTypes required_all_types = 1;
+ optional TestAllTypes optional_all_types = 2;
+ repeated TestAllTypes repeated_all_types = 3;
+ optional group OptionalGroup = 10 {
+ optional TestAllTypes optional_group_all_types = 11;
+ }
+ repeated group RepeatedGroup = 20 {
+ optional TestAllTypes repeated_group_all_types = 21;
+ }
+ extensions 1000 to max;
+ extend TestParsingMerge {
+ optional TestAllTypes optional_ext = 1000;
+ repeated TestAllTypes repeated_ext = 1001;
+ }
+}
+
+message TestCommentInjectionMessage {
+ // */ <- This should not close the generated doc comment
+ optional string a = 1 [default="*/ <- Neither should this."];
+}
+
+
+// Test that RPC services work.
+message FooRequest {}
+message FooResponse {}
+
+message FooClientMessage {}
+message FooServerMessage{}
+
+service TestService {
+ rpc Foo(FooRequest) returns (FooResponse);
+ rpc Bar(BarRequest) returns (BarResponse);
+}
+
+
+message BarRequest {}
+message BarResponse {}
+
+message TestJsonName {
+ optional int32 field_name1 = 1;
+ optional int32 fieldName2 = 2;
+ optional int32 FieldName3 = 3;
+ optional int32 _field_name4 = 4;
+ optional int32 FIELD_NAME5 = 5;
+ optional int32 field_name6 = 6 [json_name = "@type"];
+}
+
+message TestHugeFieldNumbers {
+ optional int32 optional_int32 = 536870000;
+ optional int32 fixed_32 = 536870001;
+ repeated int32 repeated_int32 = 536870002 [packed = false];
+ repeated int32 packed_int32 = 536870003 [packed = true];
+
+ optional ForeignEnum optional_enum = 536870004;
+ optional string optional_string = 536870005;
+ optional bytes optional_bytes = 536870006;
+ optional ForeignMessage optional_message = 536870007;
+
+ optional group OptionalGroup = 536870008 {
+ optional int32 group_a = 536870009;
+ }
+
+ map<string, string> string_string_map = 536870010;
+
+ oneof oneof_field {
+ uint32 oneof_uint32 = 536870011;
+ TestAllTypes oneof_test_all_types = 536870012;
+ string oneof_string = 536870013;
+ bytes oneof_bytes = 536870014;
+ }
+
+ extensions 536860000 to 536869999;
+}
+
+extend TestHugeFieldNumbers {
+ optional TestAllTypes test_all_types = 536860000;
+}
+
+message TestExtensionInsideTable {
+ optional int32 field1 = 1;
+ optional int32 field2 = 2;
+ optional int32 field3 = 3;
+ optional int32 field4 = 4;
+ extensions 5 to 5;
+ optional int32 field6 = 6;
+ optional int32 field7 = 7;
+ optional int32 field8 = 8;
+ optional int32 field9 = 9;
+ optional int32 field10 = 10;
+}
+
+extend TestExtensionInsideTable {
+ optional int32 test_extension_inside_table_extension = 5;
+}
+
+enum VeryLargeEnum {
+ ENUM_LABEL_DEFAULT = 0;
+ ENUM_LABEL_1 = 1;
+ ENUM_LABEL_2 = 2;
+ ENUM_LABEL_3 = 3;
+ ENUM_LABEL_4 = 4;
+ ENUM_LABEL_5 = 5;
+ ENUM_LABEL_6 = 6;
+ ENUM_LABEL_7 = 7;
+ ENUM_LABEL_8 = 8;
+ ENUM_LABEL_9 = 9;
+ ENUM_LABEL_10 = 10;
+ ENUM_LABEL_11 = 11;
+ ENUM_LABEL_12 = 12;
+ ENUM_LABEL_13 = 13;
+ ENUM_LABEL_14 = 14;
+ ENUM_LABEL_15 = 15;
+ ENUM_LABEL_16 = 16;
+ ENUM_LABEL_17 = 17;
+ ENUM_LABEL_18 = 18;
+ ENUM_LABEL_19 = 19;
+ ENUM_LABEL_20 = 20;
+ ENUM_LABEL_21 = 21;
+ ENUM_LABEL_22 = 22;
+ ENUM_LABEL_23 = 23;
+ ENUM_LABEL_24 = 24;
+ ENUM_LABEL_25 = 25;
+ ENUM_LABEL_26 = 26;
+ ENUM_LABEL_27 = 27;
+ ENUM_LABEL_28 = 28;
+ ENUM_LABEL_29 = 29;
+ ENUM_LABEL_30 = 30;
+ ENUM_LABEL_31 = 31;
+ ENUM_LABEL_32 = 32;
+ ENUM_LABEL_33 = 33;
+ ENUM_LABEL_34 = 34;
+ ENUM_LABEL_35 = 35;
+ ENUM_LABEL_36 = 36;
+ ENUM_LABEL_37 = 37;
+ ENUM_LABEL_38 = 38;
+ ENUM_LABEL_39 = 39;
+ ENUM_LABEL_40 = 40;
+ ENUM_LABEL_41 = 41;
+ ENUM_LABEL_42 = 42;
+ ENUM_LABEL_43 = 43;
+ ENUM_LABEL_44 = 44;
+ ENUM_LABEL_45 = 45;
+ ENUM_LABEL_46 = 46;
+ ENUM_LABEL_47 = 47;
+ ENUM_LABEL_48 = 48;
+ ENUM_LABEL_49 = 49;
+ ENUM_LABEL_50 = 50;
+ ENUM_LABEL_51 = 51;
+ ENUM_LABEL_52 = 52;
+ ENUM_LABEL_53 = 53;
+ ENUM_LABEL_54 = 54;
+ ENUM_LABEL_55 = 55;
+ ENUM_LABEL_56 = 56;
+ ENUM_LABEL_57 = 57;
+ ENUM_LABEL_58 = 58;
+ ENUM_LABEL_59 = 59;
+ ENUM_LABEL_60 = 60;
+ ENUM_LABEL_61 = 61;
+ ENUM_LABEL_62 = 62;
+ ENUM_LABEL_63 = 63;
+ ENUM_LABEL_64 = 64;
+ ENUM_LABEL_65 = 65;
+ ENUM_LABEL_66 = 66;
+ ENUM_LABEL_67 = 67;
+ ENUM_LABEL_68 = 68;
+ ENUM_LABEL_69 = 69;
+ ENUM_LABEL_70 = 70;
+ ENUM_LABEL_71 = 71;
+ ENUM_LABEL_72 = 72;
+ ENUM_LABEL_73 = 73;
+ ENUM_LABEL_74 = 74;
+ ENUM_LABEL_75 = 75;
+ ENUM_LABEL_76 = 76;
+ ENUM_LABEL_77 = 77;
+ ENUM_LABEL_78 = 78;
+ ENUM_LABEL_79 = 79;
+ ENUM_LABEL_80 = 80;
+ ENUM_LABEL_81 = 81;
+ ENUM_LABEL_82 = 82;
+ ENUM_LABEL_83 = 83;
+ ENUM_LABEL_84 = 84;
+ ENUM_LABEL_85 = 85;
+ ENUM_LABEL_86 = 86;
+ ENUM_LABEL_87 = 87;
+ ENUM_LABEL_88 = 88;
+ ENUM_LABEL_89 = 89;
+ ENUM_LABEL_90 = 90;
+ ENUM_LABEL_91 = 91;
+ ENUM_LABEL_92 = 92;
+ ENUM_LABEL_93 = 93;
+ ENUM_LABEL_94 = 94;
+ ENUM_LABEL_95 = 95;
+ ENUM_LABEL_96 = 96;
+ ENUM_LABEL_97 = 97;
+ ENUM_LABEL_98 = 98;
+ ENUM_LABEL_99 = 99;
+ ENUM_LABEL_100 = 100;
+};
diff --git a/csharp/protos/unittest_import.proto b/csharp/protos/unittest_import.proto
new file mode 100644
index 0000000..a0198c3
--- /dev/null
+++ b/csharp/protos/unittest_import.proto
@@ -0,0 +1,69 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+// Based on original Protocol Buffers design by
+// Sanjay Ghemawat, Jeff Dean, and others.
+//
+// A proto file which is imported by unittest.proto to test importing.
+
+syntax = "proto2";
+
+// We don't put this in a package within proto2 because we need to make sure
+// that the generated code doesn't depend on being in the proto2 namespace.
+// In test_util.h we do
+// "using namespace unittest_import = protobuf_unittest_import".
+package protobuf_unittest_import_proto2;
+
+option optimize_for = SPEED;
+option cc_enable_arenas = true;
+
+option csharp_namespace = "Google.Protobuf.TestProtos.Proto2";
+
+// Test public import
+import public "unittest_import_public.proto";
+
+message ImportMessage {
+ optional int32 d = 1;
+}
+
+enum ImportEnum {
+ IMPORT_FOO = 7;
+ IMPORT_BAR = 8;
+ IMPORT_BAZ = 9;
+}
+
+
+// To use an enum in a map, it must has the first value as 0.
+enum ImportEnumForMap {
+ UNKNOWN = 0;
+ FOO = 1;
+ BAR = 2;
+}
diff --git a/csharp/protos/unittest_import_public.proto b/csharp/protos/unittest_import_public.proto
new file mode 100644
index 0000000..6ae34ef
--- /dev/null
+++ b/csharp/protos/unittest_import_public.proto
@@ -0,0 +1,41 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: liujisi@google.com (Pherl Liu)
+
+syntax = "proto2";
+
+package protobuf_unittest_import_proto2;
+
+option csharp_namespace = "Google.Protobuf.TestProtos.Proto2";
+
+message PublicImportMessage {
+ optional int32 e = 1;
+}
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs
index c9c063f..355463c 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs
@@ -3666,6 +3666,8 @@
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
+ case 1612:
+ return;
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs
new file mode 100644
index 0000000..217e2d2
--- /dev/null
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs
@@ -0,0 +1,23617 @@
+// <auto-generated>
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: unittest.proto
+// </auto-generated>
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Google.Protobuf.TestProtos.Proto2 {
+
+ /// <summary>Holder for reflection information generated from unittest.proto</summary>
+ public static partial class UnittestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for unittest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static UnittestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Cg51bml0dGVzdC5wcm90bxIYcHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yGhV1",
+ "bml0dGVzdF9pbXBvcnQucHJvdG8igBoKDFRlc3RBbGxUeXBlcxIWCg5vcHRp",
+ "b25hbF9pbnQzMhgBIAEoBRIWCg5vcHRpb25hbF9pbnQ2NBgCIAEoAxIXCg9v",
+ "cHRpb25hbF91aW50MzIYAyABKA0SFwoPb3B0aW9uYWxfdWludDY0GAQgASgE",
+ "EhcKD29wdGlvbmFsX3NpbnQzMhgFIAEoERIXCg9vcHRpb25hbF9zaW50NjQY",
+ "BiABKBISGAoQb3B0aW9uYWxfZml4ZWQzMhgHIAEoBxIYChBvcHRpb25hbF9m",
+ "aXhlZDY0GAggASgGEhkKEW9wdGlvbmFsX3NmaXhlZDMyGAkgASgPEhkKEW9w",
+ "dGlvbmFsX3NmaXhlZDY0GAogASgQEhYKDm9wdGlvbmFsX2Zsb2F0GAsgASgC",
+ "EhcKD29wdGlvbmFsX2RvdWJsZRgMIAEoARIVCg1vcHRpb25hbF9ib29sGA0g",
+ "ASgIEhcKD29wdGlvbmFsX3N0cmluZxgOIAEoCRIWCg5vcHRpb25hbF9ieXRl",
+ "cxgPIAEoDBJLCg1vcHRpb25hbGdyb3VwGBAgASgKMjQucHJvdG9idWZfdW5p",
+ "dHRlc3RfcHJvdG8yLlRlc3RBbGxUeXBlcy5PcHRpb25hbEdyb3VwElUKF29w",
+ "dGlvbmFsX25lc3RlZF9tZXNzYWdlGBIgASgLMjQucHJvdG9idWZfdW5pdHRl",
+ "c3RfcHJvdG8yLlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlEkoKGG9wdGlv",
+ "bmFsX2ZvcmVpZ25fbWVzc2FnZRgTIAEoCzIoLnByb3RvYnVmX3VuaXR0ZXN0",
+ "X3Byb3RvMi5Gb3JlaWduTWVzc2FnZRJPChdvcHRpb25hbF9pbXBvcnRfbWVz",
+ "c2FnZRgUIAEoCzIuLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydF9wcm90bzIu",
+ "SW1wb3J0TWVzc2FnZRJPChRvcHRpb25hbF9uZXN0ZWRfZW51bRgVIAEoDjIx",
+ "LnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsVHlwZXMuTmVzdGVk",
+ "RW51bRJEChVvcHRpb25hbF9mb3JlaWduX2VudW0YFiABKA4yJS5wcm90b2J1",
+ "Zl91bml0dGVzdF9wcm90bzIuRm9yZWlnbkVudW0SSQoUb3B0aW9uYWxfaW1w",
+ "b3J0X2VudW0YFyABKA4yKy5wcm90b2J1Zl91bml0dGVzdF9pbXBvcnRfcHJv",
+ "dG8yLkltcG9ydEVudW0SIQoVb3B0aW9uYWxfc3RyaW5nX3BpZWNlGBggASgJ",
+ "QgIIAhIZCg1vcHRpb25hbF9jb3JkGBkgASgJQgIIARJcCh5vcHRpb25hbF9w",
+ "dWJsaWNfaW1wb3J0X21lc3NhZ2UYGiABKAsyNC5wcm90b2J1Zl91bml0dGVz",
+ "dF9pbXBvcnRfcHJvdG8yLlB1YmxpY0ltcG9ydE1lc3NhZ2USVwoVb3B0aW9u",
+ "YWxfbGF6eV9tZXNzYWdlGBsgASgLMjQucHJvdG9idWZfdW5pdHRlc3RfcHJv",
+ "dG8yLlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlQgIoARIWCg5yZXBlYXRl",
+ "ZF9pbnQzMhgfIAMoBRIWCg5yZXBlYXRlZF9pbnQ2NBggIAMoAxIXCg9yZXBl",
+ "YXRlZF91aW50MzIYISADKA0SFwoPcmVwZWF0ZWRfdWludDY0GCIgAygEEhcK",
+ "D3JlcGVhdGVkX3NpbnQzMhgjIAMoERIXCg9yZXBlYXRlZF9zaW50NjQYJCAD",
+ "KBISGAoQcmVwZWF0ZWRfZml4ZWQzMhglIAMoBxIYChByZXBlYXRlZF9maXhl",
+ "ZDY0GCYgAygGEhkKEXJlcGVhdGVkX3NmaXhlZDMyGCcgAygPEhkKEXJlcGVh",
+ "dGVkX3NmaXhlZDY0GCggAygQEhYKDnJlcGVhdGVkX2Zsb2F0GCkgAygCEhcK",
+ "D3JlcGVhdGVkX2RvdWJsZRgqIAMoARIVCg1yZXBlYXRlZF9ib29sGCsgAygI",
+ "EhcKD3JlcGVhdGVkX3N0cmluZxgsIAMoCRIWCg5yZXBlYXRlZF9ieXRlcxgt",
+ "IAMoDBJLCg1yZXBlYXRlZGdyb3VwGC4gAygKMjQucHJvdG9idWZfdW5pdHRl",
+ "c3RfcHJvdG8yLlRlc3RBbGxUeXBlcy5SZXBlYXRlZEdyb3VwElUKF3JlcGVh",
+ "dGVkX25lc3RlZF9tZXNzYWdlGDAgAygLMjQucHJvdG9idWZfdW5pdHRlc3Rf",
+ "cHJvdG8yLlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlEkoKGHJlcGVhdGVk",
+ "X2ZvcmVpZ25fbWVzc2FnZRgxIAMoCzIoLnByb3RvYnVmX3VuaXR0ZXN0X3By",
+ "b3RvMi5Gb3JlaWduTWVzc2FnZRJPChdyZXBlYXRlZF9pbXBvcnRfbWVzc2Fn",
+ "ZRgyIAMoCzIuLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydF9wcm90bzIuSW1w",
+ "b3J0TWVzc2FnZRJPChRyZXBlYXRlZF9uZXN0ZWRfZW51bRgzIAMoDjIxLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsVHlwZXMuTmVzdGVkRW51",
+ "bRJEChVyZXBlYXRlZF9mb3JlaWduX2VudW0YNCADKA4yJS5wcm90b2J1Zl91",
+ "bml0dGVzdF9wcm90bzIuRm9yZWlnbkVudW0SSQoUcmVwZWF0ZWRfaW1wb3J0",
+ "X2VudW0YNSADKA4yKy5wcm90b2J1Zl91bml0dGVzdF9pbXBvcnRfcHJvdG8y",
+ "LkltcG9ydEVudW0SIQoVcmVwZWF0ZWRfc3RyaW5nX3BpZWNlGDYgAygJQgII",
+ "AhIZCg1yZXBlYXRlZF9jb3JkGDcgAygJQgIIARJXChVyZXBlYXRlZF9sYXp5",
+ "X21lc3NhZ2UYOSADKAsyNC5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVz",
+ "dEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2VCAigBEhkKDWRlZmF1bHRfaW50MzIY",
+ "PSABKAU6AjQxEhkKDWRlZmF1bHRfaW50NjQYPiABKAM6AjQyEhoKDmRlZmF1",
+ "bHRfdWludDMyGD8gASgNOgI0MxIaCg5kZWZhdWx0X3VpbnQ2NBhAIAEoBDoC",
+ "NDQSGwoOZGVmYXVsdF9zaW50MzIYQSABKBE6Ay00NRIaCg5kZWZhdWx0X3Np",
+ "bnQ2NBhCIAEoEjoCNDYSGwoPZGVmYXVsdF9maXhlZDMyGEMgASgHOgI0NxIb",
+ "Cg9kZWZhdWx0X2ZpeGVkNjQYRCABKAY6AjQ4EhwKEGRlZmF1bHRfc2ZpeGVk",
+ "MzIYRSABKA86AjQ5Eh0KEGRlZmF1bHRfc2ZpeGVkNjQYRiABKBA6Ay01MBIb",
+ "Cg1kZWZhdWx0X2Zsb2F0GEcgASgCOgQ1MS41Eh0KDmRlZmF1bHRfZG91Ymxl",
+ "GEggASgBOgU1MjAwMBIaCgxkZWZhdWx0X2Jvb2wYSSABKAg6BHRydWUSHQoO",
+ "ZGVmYXVsdF9zdHJpbmcYSiABKAk6BWhlbGxvEhwKDWRlZmF1bHRfYnl0ZXMY",
+ "SyABKAw6BXdvcmxkElMKE2RlZmF1bHRfbmVzdGVkX2VudW0YUSABKA4yMS5w",
+ "cm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbFR5cGVzLk5lc3RlZEVu",
+ "dW06A0JBUhJQChRkZWZhdWx0X2ZvcmVpZ25fZW51bRhSIAEoDjIlLnByb3Rv",
+ "YnVmX3VuaXR0ZXN0X3Byb3RvMi5Gb3JlaWduRW51bToLRk9SRUlHTl9CQVIS",
+ "VAoTZGVmYXVsdF9pbXBvcnRfZW51bRhTIAEoDjIrLnByb3RvYnVmX3VuaXR0",
+ "ZXN0X2ltcG9ydF9wcm90bzIuSW1wb3J0RW51bToKSU1QT1JUX0JBUhIlChRk",
+ "ZWZhdWx0X3N0cmluZ19waWVjZRhUIAEoCToDYWJjQgIIAhIdCgxkZWZhdWx0",
+ "X2NvcmQYVSABKAk6AzEyM0ICCAESFgoMb25lb2ZfdWludDMyGG8gASgNSAAS",
+ "VAoUb25lb2ZfbmVzdGVkX21lc3NhZ2UYcCABKAsyNC5wcm90b2J1Zl91bml0",
+ "dGVzdF9wcm90bzIuVGVzdEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2VIABIWCgxv",
+ "bmVvZl9zdHJpbmcYcSABKAlIABIVCgtvbmVvZl9ieXRlcxhyIAEoDEgAGhsK",
+ "DU5lc3RlZE1lc3NhZ2USCgoCYmIYASABKAUaGgoNT3B0aW9uYWxHcm91cBIJ",
+ "CgFhGBEgASgFGhoKDVJlcGVhdGVkR3JvdXASCQoBYRgvIAEoBSI5CgpOZXN0",
+ "ZWRFbnVtEgcKA0ZPTxABEgcKA0JBUhACEgcKA0JBWhADEhAKA05FRxD/////",
+ "//////8BQg0KC29uZW9mX2ZpZWxkItABChJOZXN0ZWRUZXN0QWxsVHlwZXMS",
+ "OwoFY2hpbGQYASABKAsyLC5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuTmVz",
+ "dGVkVGVzdEFsbFR5cGVzEjcKB3BheWxvYWQYAiABKAsyJi5wcm90b2J1Zl91",
+ "bml0dGVzdF9wcm90bzIuVGVzdEFsbFR5cGVzEkQKDnJlcGVhdGVkX2NoaWxk",
+ "GAMgAygLMiwucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLk5lc3RlZFRlc3RB",
+ "bGxUeXBlcyJtChRUZXN0RGVwcmVjYXRlZEZpZWxkcxIcChBkZXByZWNhdGVk",
+ "X2ludDMyGAEgASgFQgIYARInChlkZXByZWNhdGVkX2ludDMyX2luX29uZW9m",
+ "GAIgASgFQgIYAUgAQg4KDG9uZW9mX2ZpZWxkcyIbChVUZXN0RGVwcmVjYXRl",
+ "ZE1lc3NhZ2U6AhgBIiYKDkZvcmVpZ25NZXNzYWdlEgkKAWMYASABKAUSCQoB",
+ "ZBgCIAEoBSIwChJUZXN0UmVzZXJ2ZWRGaWVsZHNKBAgCEANKBAgPEBBKBAgJ",
+ "EAxSA2JhclIDYmF6Ih0KEVRlc3RBbGxFeHRlbnNpb25zKggIARCAgICAAiIk",
+ "ChdPcHRpb25hbEdyb3VwX2V4dGVuc2lvbhIJCgFhGBEgASgFIiQKF1JlcGVh",
+ "dGVkR3JvdXBfZXh0ZW5zaW9uEgkKAWEYLyABKAUitwEKCVRlc3RHcm91cBJI",
+ "Cg1vcHRpb25hbGdyb3VwGBAgASgKMjEucHJvdG9idWZfdW5pdHRlc3RfcHJv",
+ "dG8yLlRlc3RHcm91cC5PcHRpb25hbEdyb3VwEkQKFW9wdGlvbmFsX2ZvcmVp",
+ "Z25fZW51bRgWIAEoDjIlLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5Gb3Jl",
+ "aWduRW51bRoaCg1PcHRpb25hbEdyb3VwEgkKAWEYESABKAUiHgoSVGVzdEdy",
+ "b3VwRXh0ZW5zaW9uKggIARCAgICAAiLhAwoTVGVzdE5lc3RlZEV4dGVuc2lv",
+ "bhokChdPcHRpb25hbEdyb3VwX2V4dGVuc2lvbhIJCgFhGBEgASgFMkAKBHRl",
+ "c3QSKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4dGVuc2lv",
+ "bnMY6gcgASgJOgR0ZXN0Mk0KF25lc3RlZF9zdHJpbmdfZXh0ZW5zaW9uEisu",
+ "cHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNpb25zGOsH",
+ "IAEoCTKUAQoXb3B0aW9uYWxncm91cF9leHRlbnNpb24SLC5wcm90b2J1Zl91",
+ "bml0dGVzdF9wcm90bzIuVGVzdEdyb3VwRXh0ZW5zaW9uGBAgASgKMkUucHJv",
+ "dG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3ROZXN0ZWRFeHRlbnNpb24uT3B0",
+ "aW9uYWxHcm91cF9leHRlbnNpb24yfAofb3B0aW9uYWxfZm9yZWlnbl9lbnVt",
+ "X2V4dGVuc2lvbhIsLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0R3Jv",
+ "dXBFeHRlbnNpb24YFiABKA4yJS5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIu",
+ "Rm9yZWlnbkVudW0i8QUKDFRlc3RSZXF1aXJlZBIJCgFhGAEgAigFEg4KBmR1",
+ "bW15MhgCIAEoBRIJCgFiGAMgAigFEg4KBmR1bW15NBgEIAEoBRIOCgZkdW1t",
+ "eTUYBSABKAUSDgoGZHVtbXk2GAYgASgFEg4KBmR1bW15NxgHIAEoBRIOCgZk",
+ "dW1teTgYCCABKAUSDgoGZHVtbXk5GAkgASgFEg8KB2R1bW15MTAYCiABKAUS",
+ "DwoHZHVtbXkxMRgLIAEoBRIPCgdkdW1teTEyGAwgASgFEg8KB2R1bW15MTMY",
+ "DSABKAUSDwoHZHVtbXkxNBgOIAEoBRIPCgdkdW1teTE1GA8gASgFEg8KB2R1",
+ "bW15MTYYECABKAUSDwoHZHVtbXkxNxgRIAEoBRIPCgdkdW1teTE4GBIgASgF",
+ "Eg8KB2R1bW15MTkYEyABKAUSDwoHZHVtbXkyMBgUIAEoBRIPCgdkdW1teTIx",
+ "GBUgASgFEg8KB2R1bW15MjIYFiABKAUSDwoHZHVtbXkyMxgXIAEoBRIPCgdk",
+ "dW1teTI0GBggASgFEg8KB2R1bW15MjUYGSABKAUSDwoHZHVtbXkyNhgaIAEo",
+ "BRIPCgdkdW1teTI3GBsgASgFEg8KB2R1bW15MjgYHCABKAUSDwoHZHVtbXky",
+ "ORgdIAEoBRIPCgdkdW1teTMwGB4gASgFEg8KB2R1bW15MzEYHyABKAUSDwoH",
+ "ZHVtbXkzMhggIAEoBRIJCgFjGCEgAigFMmQKBnNpbmdsZRIrLnByb3RvYnVm",
+ "X3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5zaW9ucxjoByABKAsyJi5w",
+ "cm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdFJlcXVpcmVkMmMKBW11bHRp",
+ "EisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNpb25z",
+ "GOkHIAMoCzImLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0UmVxdWly",
+ "ZWQiqAEKE1Rlc3RSZXF1aXJlZEZvcmVpZ24SQAoQb3B0aW9uYWxfbWVzc2Fn",
+ "ZRgBIAEoCzImLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0UmVxdWly",
+ "ZWQSQAoQcmVwZWF0ZWRfbWVzc2FnZRgCIAMoCzImLnByb3RvYnVmX3VuaXR0",
+ "ZXN0X3Byb3RvMi5UZXN0UmVxdWlyZWQSDQoFZHVtbXkYAyABKAUi2wEKE1Rl",
+ "c3RSZXF1aXJlZE1lc3NhZ2USQAoQb3B0aW9uYWxfbWVzc2FnZRgBIAEoCzIm",
+ "LnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0UmVxdWlyZWQSQAoQcmVw",
+ "ZWF0ZWRfbWVzc2FnZRgCIAMoCzImLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3Rv",
+ "Mi5UZXN0UmVxdWlyZWQSQAoQcmVxdWlyZWRfbWVzc2FnZRgDIAIoCzImLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0UmVxdWlyZWQiYQoRVGVzdEZv",
+ "cmVpZ25OZXN0ZWQSTAoOZm9yZWlnbl9uZXN0ZWQYASABKAsyNC5wcm90b2J1",
+ "Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2Ui",
+ "EgoQVGVzdEVtcHR5TWVzc2FnZSIqCh5UZXN0RW1wdHlNZXNzYWdlV2l0aEV4",
+ "dGVuc2lvbnMqCAgBEICAgIACIjcKG1Rlc3RNdWx0aXBsZUV4dGVuc2lvblJh",
+ "bmdlcyoECCoQKyoGCK8gEJQhKgoIgIAEEICAgIACIjQKGFRlc3RSZWFsbHlM",
+ "YXJnZVRhZ051bWJlchIJCgFhGAEgASgFEg0KAmJiGP///38gASgFIlwKFFRl",
+ "c3RSZWN1cnNpdmVNZXNzYWdlEjkKAWEYASABKAsyLi5wcm90b2J1Zl91bml0",
+ "dGVzdF9wcm90bzIuVGVzdFJlY3Vyc2l2ZU1lc3NhZ2USCQoBaRgCIAEoBSKE",
+ "AwoUVGVzdE11dHVhbFJlY3Vyc2lvbkESOgoCYmIYASABKAsyLi5wcm90b2J1",
+ "Zl91bml0dGVzdF9wcm90bzIuVGVzdE11dHVhbFJlY3Vyc2lvbkISSQoIc3Vi",
+ "Z3JvdXAYAiABKAoyNy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdE11",
+ "dHVhbFJlY3Vyc2lvbkEuU3ViR3JvdXAaRwoKU3ViTWVzc2FnZRI5CgFiGAEg",
+ "ASgLMi4ucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RNdXR1YWxSZWN1",
+ "cnNpb25CGpsBCghTdWJHcm91cBJOCgtzdWJfbWVzc2FnZRgDIAEoCzI5LnBy",
+ "b3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0TXV0dWFsUmVjdXJzaW9uQS5T",
+ "dWJNZXNzYWdlEj8KD25vdF9pbl90aGlzX3NjYxgEIAEoCzImLnByb3RvYnVm",
+ "X3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsVHlwZXMiaQoUVGVzdE11dHVhbFJl",
+ "Y3Vyc2lvbkISOQoBYRgBIAEoCzIuLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3Rv",
+ "Mi5UZXN0TXV0dWFsUmVjdXJzaW9uQRIWCg5vcHRpb25hbF9pbnQzMhgCIAEo",
+ "BSLYAQoRVGVzdElzSW5pdGlhbGl6ZWQSSwoLc3ViX21lc3NhZ2UYASABKAsy",
+ "Ni5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdElzSW5pdGlhbGl6ZWQu",
+ "U3ViTWVzc2FnZRp2CgpTdWJNZXNzYWdlElEKCHN1Ymdyb3VwGAEgASgKMj8u",
+ "cHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RJc0luaXRpYWxpemVkLlN1",
+ "Yk1lc3NhZ2UuU3ViR3JvdXAaFQoIU3ViR3JvdXASCQoBaRgCIAIoBSLBAQoS",
+ "VGVzdER1cEZpZWxkTnVtYmVyEgkKAWEYASABKAUSPQoDZm9vGAIgASgKMjAu",
+ "cHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3REdXBGaWVsZE51bWJlci5G",
+ "b28SPQoDYmFyGAMgASgKMjAucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRl",
+ "c3REdXBGaWVsZE51bWJlci5CYXIaEAoDRm9vEgkKAWEYASABKAUaEAoDQmFy",
+ "EgkKAWEYASABKAUiUwoQVGVzdEVhZ2VyTWVzc2FnZRI/CgtzdWJfbWVzc2Fn",
+ "ZRgBIAEoCzImLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsVHlw",
+ "ZXNCAigAIlIKD1Rlc3RMYXp5TWVzc2FnZRI/CgtzdWJfbWVzc2FnZRgBIAEo",
+ "CzImLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsVHlwZXNCAigB",
+ "Io4CChhUZXN0TmVzdGVkTWVzc2FnZUhhc0JpdHMSYQoXb3B0aW9uYWxfbmVz",
+ "dGVkX21lc3NhZ2UYASABKAsyQC5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIu",
+ "VGVzdE5lc3RlZE1lc3NhZ2VIYXNCaXRzLk5lc3RlZE1lc3NhZ2UajgEKDU5l",
+ "c3RlZE1lc3NhZ2USJAocbmVzdGVkbWVzc2FnZV9yZXBlYXRlZF9pbnQzMhgB",
+ "IAMoBRJXCiVuZXN0ZWRtZXNzYWdlX3JlcGVhdGVkX2ZvcmVpZ25tZXNzYWdl",
+ "GAIgAygLMigucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLkZvcmVpZ25NZXNz",
+ "YWdlIoEEChdUZXN0Q2FtZWxDYXNlRmllbGROYW1lcxIWCg5QcmltaXRpdmVG",
+ "aWVsZBgBIAEoBRITCgtTdHJpbmdGaWVsZBgCIAEoCRI4CglFbnVtRmllbGQY",
+ "AyABKA4yJS5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuRm9yZWlnbkVudW0S",
+ "PgoMTWVzc2FnZUZpZWxkGAQgASgLMigucHJvdG9idWZfdW5pdHRlc3RfcHJv",
+ "dG8yLkZvcmVpZ25NZXNzYWdlEhwKEFN0cmluZ1BpZWNlRmllbGQYBSABKAlC",
+ "AggCEhUKCUNvcmRGaWVsZBgGIAEoCUICCAESHgoWUmVwZWF0ZWRQcmltaXRp",
+ "dmVGaWVsZBgHIAMoBRIbChNSZXBlYXRlZFN0cmluZ0ZpZWxkGAggAygJEkAK",
+ "EVJlcGVhdGVkRW51bUZpZWxkGAkgAygOMiUucHJvdG9idWZfdW5pdHRlc3Rf",
+ "cHJvdG8yLkZvcmVpZ25FbnVtEkYKFFJlcGVhdGVkTWVzc2FnZUZpZWxkGAog",
+ "AygLMigucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLkZvcmVpZ25NZXNzYWdl",
+ "EiQKGFJlcGVhdGVkU3RyaW5nUGllY2VGaWVsZBgLIAMoCUICCAISHQoRUmVw",
+ "ZWF0ZWRDb3JkRmllbGQYDCADKAlCAggBItwBChJUZXN0RmllbGRPcmRlcmlu",
+ "Z3MSEQoJbXlfc3RyaW5nGAsgASgJEg4KBm15X2ludBgBIAEoAxIQCghteV9m",
+ "bG9hdBhlIAEoAhJcChdvcHRpb25hbF9uZXN0ZWRfbWVzc2FnZRjIASABKAsy",
+ "Oi5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEZpZWxkT3JkZXJpbmdz",
+ "Lk5lc3RlZE1lc3NhZ2UaJwoNTmVzdGVkTWVzc2FnZRIKCgJvbxgCIAEoAxIK",
+ "CgJiYhgBIAEoBSoECAIQCyoECAwQZSKqAQoXVGVzdEV4dGVuc2lvbk9yZGVy",
+ "aW5nczESEQoJbXlfc3RyaW5nGAEgASgJMnwKE3Rlc3RfZXh0X29yZGVyaW5n",
+ "czESLC5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEZpZWxkT3JkZXJp",
+ "bmdzGA0gASgLMjEucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RFeHRl",
+ "bnNpb25PcmRlcmluZ3MxIvACChdUZXN0RXh0ZW5zaW9uT3JkZXJpbmdzMhIR",
+ "CglteV9zdHJpbmcYASABKAkawwEKF1Rlc3RFeHRlbnNpb25PcmRlcmluZ3Mz",
+ "EhEKCW15X3N0cmluZxgBIAEoCTKUAQoTdGVzdF9leHRfb3JkZXJpbmdzMxIs",
+ "LnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0RmllbGRPcmRlcmluZ3MY",
+ "DiABKAsySS5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEV4dGVuc2lv",
+ "bk9yZGVyaW5nczIuVGVzdEV4dGVuc2lvbk9yZGVyaW5nczMyfAoTdGVzdF9l",
+ "eHRfb3JkZXJpbmdzMhIsLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0",
+ "RmllbGRPcmRlcmluZ3MYDCABKAsyMS5wcm90b2J1Zl91bml0dGVzdF9wcm90",
+ "bzIuVGVzdEV4dGVuc2lvbk9yZGVyaW5nczIitgcKGFRlc3RFeHRyZW1lRGVm",
+ "YXVsdFZhbHVlcxI/Cg1lc2NhcGVkX2J5dGVzGAEgASgMOihcMDAwXDAwMVww",
+ "MDdcMDEwXDAxNFxuXHJcdFwwMTNcXFwnXCJcMzc2EiAKDGxhcmdlX3VpbnQz",
+ "MhgCIAEoDToKNDI5NDk2NzI5NRIqCgxsYXJnZV91aW50NjQYAyABKAQ6FDE4",
+ "NDQ2NzQ0MDczNzA5NTUxNjE1EiAKC3NtYWxsX2ludDMyGAQgASgFOgstMjE0",
+ "NzQ4MzY0NxIpCgtzbWFsbF9pbnQ2NBgFIAEoAzoULTkyMjMzNzIwMzY4NTQ3",
+ "NzU4MDcSJwoScmVhbGx5X3NtYWxsX2ludDMyGBUgASgFOgstMjE0NzQ4MzY0",
+ "OBIwChJyZWFsbHlfc21hbGxfaW50NjQYFiABKAM6FC05MjIzMzcyMDM2ODU0",
+ "Nzc1ODA4EhgKC3V0Zjhfc3RyaW5nGAYgASgJOgPhiLQSFQoKemVyb19mbG9h",
+ "dBgHIAEoAjoBMBIUCglvbmVfZmxvYXQYCCABKAI6ATESGAoLc21hbGxfZmxv",
+ "YXQYCSABKAI6AzEuNRIeChJuZWdhdGl2ZV9vbmVfZmxvYXQYCiABKAI6Ai0x",
+ "EhwKDm5lZ2F0aXZlX2Zsb2F0GAsgASgCOgQtMS41EhoKC2xhcmdlX2Zsb2F0",
+ "GAwgASgCOgUyZSswOBIkChRzbWFsbF9uZWdhdGl2ZV9mbG9hdBgNIAEoAjoG",
+ "LThlLTI4EhcKCmluZl9kb3VibGUYDiABKAE6A2luZhIcCg5uZWdfaW5mX2Rv",
+ "dWJsZRgPIAEoAToELWluZhIXCgpuYW5fZG91YmxlGBAgASgBOgNuYW4SFgoJ",
+ "aW5mX2Zsb2F0GBEgASgCOgNpbmYSGwoNbmVnX2luZl9mbG9hdBgSIAEoAjoE",
+ "LWluZhIWCgluYW5fZmxvYXQYEyABKAI6A25hbhIrCgxjcHBfdHJpZ3JhcGgY",
+ "FCABKAk6FT8gPyA/PyA/PyA/Pz8gPz8vID8/LRIgChBzdHJpbmdfd2l0aF96",
+ "ZXJvGBcgASgJOgZoZWwAbG8SIgoPYnl0ZXNfd2l0aF96ZXJvGBggASgMOgl3",
+ "b3JcMDAwbGQSKAoWc3RyaW5nX3BpZWNlX3dpdGhfemVybxgZIAEoCToEYWIA",
+ "Y0ICCAISIAoOY29yZF93aXRoX3plcm8YGiABKAk6BDEyADNCAggBEiYKEnJl",
+ "cGxhY2VtZW50X3N0cmluZxgbIAEoCToKJHt1bmtub3dufSJSChFTcGFyc2VF",
+ "bnVtTWVzc2FnZRI9CgtzcGFyc2VfZW51bRgBIAEoDjIoLnByb3RvYnVmX3Vu",
+ "aXR0ZXN0X3Byb3RvMi5UZXN0U3BhcnNlRW51bSIZCglPbmVTdHJpbmcSDAoE",
+ "ZGF0YRgBIAEoCSIaCgpNb3JlU3RyaW5nEgwKBGRhdGEYASADKAkiGAoIT25l",
+ "Qnl0ZXMSDAoEZGF0YRgBIAEoDCIZCglNb3JlQnl0ZXMSDAoEZGF0YRgBIAMo",
+ "DCIcCgxJbnQzMk1lc3NhZ2USDAoEZGF0YRgBIAEoBSIdCg1VaW50MzJNZXNz",
+ "YWdlEgwKBGRhdGEYASABKA0iHAoMSW50NjRNZXNzYWdlEgwKBGRhdGEYASAB",
+ "KAMiHQoNVWludDY0TWVzc2FnZRIMCgRkYXRhGAEgASgEIhsKC0Jvb2xNZXNz",
+ "YWdlEgwKBGRhdGEYASABKAgi3gEKCVRlc3RPbmVvZhIRCgdmb29faW50GAEg",
+ "ASgFSAASFAoKZm9vX3N0cmluZxgCIAEoCUgAEj0KC2Zvb19tZXNzYWdlGAMg",
+ "ASgLMiYucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxUeXBlc0gA",
+ "EkAKCGZvb2dyb3VwGAQgASgKMiwucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8y",
+ "LlRlc3RPbmVvZi5Gb29Hcm91cEgAGiAKCEZvb0dyb3VwEgkKAWEYBSABKAUS",
+ "CQoBYhgGIAEoCUIFCgNmb28i9QEKHFRlc3RPbmVvZkJhY2t3YXJkc0NvbXBh",
+ "dGlibGUSDwoHZm9vX2ludBgBIAEoBRISCgpmb29fc3RyaW5nGAIgASgJEjsK",
+ "C2Zvb19tZXNzYWdlGAMgASgLMiYucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8y",
+ "LlRlc3RBbGxUeXBlcxJRCghmb29ncm91cBgEIAEoCjI/LnByb3RvYnVmX3Vu",
+ "aXR0ZXN0X3Byb3RvMi5UZXN0T25lb2ZCYWNrd2FyZHNDb21wYXRpYmxlLkZv",
+ "b0dyb3VwGiAKCEZvb0dyb3VwEgkKAWEYBSABKAUSCQoBYhgGIAEoCSLBBgoK",
+ "VGVzdE9uZW9mMhIRCgdmb29faW50GAEgASgFSAASFAoKZm9vX3N0cmluZxgC",
+ "IAEoCUgAEhYKCGZvb19jb3JkGAMgASgJQgIIAUgAEh4KEGZvb19zdHJpbmdf",
+ "cGllY2UYBCABKAlCAggCSAASEwoJZm9vX2J5dGVzGAUgASgMSAASQwoIZm9v",
+ "X2VudW0YBiABKA4yLy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdE9u",
+ "ZW9mMi5OZXN0ZWRFbnVtSAASSQoLZm9vX21lc3NhZ2UYByABKAsyMi5wcm90",
+ "b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdE9uZW9mMi5OZXN0ZWRNZXNzYWdl",
+ "SAASQQoIZm9vZ3JvdXAYCCABKAoyLS5wcm90b2J1Zl91bml0dGVzdF9wcm90",
+ "bzIuVGVzdE9uZW9mMi5Gb29Hcm91cEgAElIKEGZvb19sYXp5X21lc3NhZ2UY",
+ "CyABKAsyMi5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdE9uZW9mMi5O",
+ "ZXN0ZWRNZXNzYWdlQgIoAUgAEhQKB2Jhcl9pbnQYDCABKAU6ATVIARIcCgpi",
+ "YXJfc3RyaW5nGA0gASgJOgZTVFJJTkdIARIcCghiYXJfY29yZBgOIAEoCToE",
+ "Q09SREICCAFIARImChBiYXJfc3RyaW5nX3BpZWNlGA8gASgJOgZTUElFQ0VC",
+ "AggCSAESGgoJYmFyX2J5dGVzGBAgASgMOgVCWVRFU0gBEkgKCGJhcl9lbnVt",
+ "GBEgASgOMi8ucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RPbmVvZjIu",
+ "TmVzdGVkRW51bToDQkFSSAESDwoHYmF6X2ludBgSIAEoBRIXCgpiYXpfc3Ry",
+ "aW5nGBMgASgJOgNCQVoaIAoIRm9vR3JvdXASCQoBYRgJIAEoBRIJCgFiGAog",
+ "ASgJGjMKDU5lc3RlZE1lc3NhZ2USDwoHcXV4X2ludBgBIAEoAxIRCgljb3Jn",
+ "ZV9pbnQYAiADKAUiJwoKTmVzdGVkRW51bRIHCgNGT08QARIHCgNCQVIQAhIH",
+ "CgNCQVoQA0IFCgNmb29CBQoDYmFyIr8BChFUZXN0UmVxdWlyZWRPbmVvZhIR",
+ "Cgdmb29faW50GAEgASgFSAASFAoKZm9vX3N0cmluZxgCIAEoCUgAElAKC2Zv",
+ "b19tZXNzYWdlGAMgASgLMjkucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRl",
+ "c3RSZXF1aXJlZE9uZW9mLk5lc3RlZE1lc3NhZ2VIABooCg1OZXN0ZWRNZXNz",
+ "YWdlEhcKD3JlcXVpcmVkX2RvdWJsZRgBIAIoAUIFCgNmb28isQMKD1Rlc3RQ",
+ "YWNrZWRUeXBlcxIYCgxwYWNrZWRfaW50MzIYWiADKAVCAhABEhgKDHBhY2tl",
+ "ZF9pbnQ2NBhbIAMoA0ICEAESGQoNcGFja2VkX3VpbnQzMhhcIAMoDUICEAES",
+ "GQoNcGFja2VkX3VpbnQ2NBhdIAMoBEICEAESGQoNcGFja2VkX3NpbnQzMhhe",
+ "IAMoEUICEAESGQoNcGFja2VkX3NpbnQ2NBhfIAMoEkICEAESGgoOcGFja2Vk",
+ "X2ZpeGVkMzIYYCADKAdCAhABEhoKDnBhY2tlZF9maXhlZDY0GGEgAygGQgIQ",
+ "ARIbCg9wYWNrZWRfc2ZpeGVkMzIYYiADKA9CAhABEhsKD3BhY2tlZF9zZml4",
+ "ZWQ2NBhjIAMoEEICEAESGAoMcGFja2VkX2Zsb2F0GGQgAygCQgIQARIZCg1w",
+ "YWNrZWRfZG91YmxlGGUgAygBQgIQARIXCgtwYWNrZWRfYm9vbBhmIAMoCEIC",
+ "EAESPgoLcGFja2VkX2VudW0YZyADKA4yJS5wcm90b2J1Zl91bml0dGVzdF9w",
+ "cm90bzIuRm9yZWlnbkVudW1CAhABIs8DChFUZXN0VW5wYWNrZWRUeXBlcxIa",
+ "Cg51bnBhY2tlZF9pbnQzMhhaIAMoBUICEAASGgoOdW5wYWNrZWRfaW50NjQY",
+ "WyADKANCAhAAEhsKD3VucGFja2VkX3VpbnQzMhhcIAMoDUICEAASGwoPdW5w",
+ "YWNrZWRfdWludDY0GF0gAygEQgIQABIbCg91bnBhY2tlZF9zaW50MzIYXiAD",
+ "KBFCAhAAEhsKD3VucGFja2VkX3NpbnQ2NBhfIAMoEkICEAASHAoQdW5wYWNr",
+ "ZWRfZml4ZWQzMhhgIAMoB0ICEAASHAoQdW5wYWNrZWRfZml4ZWQ2NBhhIAMo",
+ "BkICEAASHQoRdW5wYWNrZWRfc2ZpeGVkMzIYYiADKA9CAhAAEh0KEXVucGFj",
+ "a2VkX3NmaXhlZDY0GGMgAygQQgIQABIaCg51bnBhY2tlZF9mbG9hdBhkIAMo",
+ "AkICEAASGwoPdW5wYWNrZWRfZG91YmxlGGUgAygBQgIQABIZCg11bnBhY2tl",
+ "ZF9ib29sGGYgAygIQgIQABJACg11bnBhY2tlZF9lbnVtGGcgAygOMiUucHJv",
+ "dG9idWZfdW5pdHRlc3RfcHJvdG8yLkZvcmVpZ25FbnVtQgIQACIgChRUZXN0",
+ "UGFja2VkRXh0ZW5zaW9ucyoICAEQgICAgAIiIgoWVGVzdFVucGFja2VkRXh0",
+ "ZW5zaW9ucyoICAEQgICAgAIitQQKFVRlc3REeW5hbWljRXh0ZW5zaW9ucxIZ",
+ "ChBzY2FsYXJfZXh0ZW5zaW9uGNAPIAEoBxI+Cg5lbnVtX2V4dGVuc2lvbhjR",
+ "DyABKA4yJS5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuRm9yZWlnbkVudW0S",
+ "YAoWZHluYW1pY19lbnVtX2V4dGVuc2lvbhjSDyABKA4yPy5wcm90b2J1Zl91",
+ "bml0dGVzdF9wcm90bzIuVGVzdER5bmFtaWNFeHRlbnNpb25zLkR5bmFtaWNF",
+ "bnVtVHlwZRJEChFtZXNzYWdlX2V4dGVuc2lvbhjTDyABKAsyKC5wcm90b2J1",
+ "Zl91bml0dGVzdF9wcm90bzIuRm9yZWlnbk1lc3NhZ2USZgoZZHluYW1pY19t",
+ "ZXNzYWdlX2V4dGVuc2lvbhjUDyABKAsyQi5wcm90b2J1Zl91bml0dGVzdF9w",
+ "cm90bzIuVGVzdER5bmFtaWNFeHRlbnNpb25zLkR5bmFtaWNNZXNzYWdlVHlw",
+ "ZRIbChJyZXBlYXRlZF9leHRlbnNpb24Y1Q8gAygJEh0KEHBhY2tlZF9leHRl",
+ "bnNpb24Y1g8gAygRQgIQARosChJEeW5hbWljTWVzc2FnZVR5cGUSFgoNZHlu",
+ "YW1pY19maWVsZBi0ECABKAUiRwoPRHluYW1pY0VudW1UeXBlEhAKC0RZTkFN",
+ "SUNfRk9PEJgREhAKC0RZTkFNSUNfQkFSEJkREhAKC0RZTkFNSUNfQkFaEJoR",
+ "IsABCiNUZXN0UmVwZWF0ZWRTY2FsYXJEaWZmZXJlbnRUYWdTaXplcxIYChBy",
+ "ZXBlYXRlZF9maXhlZDMyGAwgAygHEhYKDnJlcGVhdGVkX2ludDMyGA0gAygF",
+ "EhkKEHJlcGVhdGVkX2ZpeGVkNjQY/g8gAygGEhcKDnJlcGVhdGVkX2ludDY0",
+ "GP8PIAMoAxIYCg5yZXBlYXRlZF9mbG9hdBj+/w8gAygCEhkKD3JlcGVhdGVk",
+ "X3VpbnQ2NBj//w8gAygEIoMLChBUZXN0UGFyc2luZ01lcmdlEkIKEnJlcXVp",
+ "cmVkX2FsbF90eXBlcxgBIAIoCzImLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3Rv",
+ "Mi5UZXN0QWxsVHlwZXMSQgoSb3B0aW9uYWxfYWxsX3R5cGVzGAIgASgLMiYu",
+ "cHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxUeXBlcxJCChJyZXBl",
+ "YXRlZF9hbGxfdHlwZXMYAyADKAsyJi5wcm90b2J1Zl91bml0dGVzdF9wcm90",
+ "bzIuVGVzdEFsbFR5cGVzEk8KDW9wdGlvbmFsZ3JvdXAYCiABKAoyOC5wcm90",
+ "b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdFBhcnNpbmdNZXJnZS5PcHRpb25h",
+ "bEdyb3VwEk8KDXJlcGVhdGVkZ3JvdXAYFCADKAoyOC5wcm90b2J1Zl91bml0",
+ "dGVzdF9wcm90bzIuVGVzdFBhcnNpbmdNZXJnZS5SZXBlYXRlZEdyb3VwGukE",
+ "ChdSZXBlYXRlZEZpZWxkc0dlbmVyYXRvchI2CgZmaWVsZDEYASADKAsyJi5w",
+ "cm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbFR5cGVzEjYKBmZpZWxk",
+ "MhgCIAMoCzImLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsVHlw",
+ "ZXMSNgoGZmllbGQzGAMgAygLMiYucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8y",
+ "LlRlc3RBbGxUeXBlcxJZCgZncm91cDEYCiADKAoySS5wcm90b2J1Zl91bml0",
+ "dGVzdF9wcm90bzIuVGVzdFBhcnNpbmdNZXJnZS5SZXBlYXRlZEZpZWxkc0dl",
+ "bmVyYXRvci5Hcm91cDESWQoGZ3JvdXAyGBQgAygKMkkucHJvdG9idWZfdW5p",
+ "dHRlc3RfcHJvdG8yLlRlc3RQYXJzaW5nTWVyZ2UuUmVwZWF0ZWRGaWVsZHNH",
+ "ZW5lcmF0b3IuR3JvdXAyEjUKBGV4dDEY6AcgAygLMiYucHJvdG9idWZfdW5p",
+ "dHRlc3RfcHJvdG8yLlRlc3RBbGxUeXBlcxI1CgRleHQyGOkHIAMoCzImLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsVHlwZXMaQAoGR3JvdXAx",
+ "EjYKBmZpZWxkMRgLIAEoCzImLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5U",
+ "ZXN0QWxsVHlwZXMaQAoGR3JvdXAyEjYKBmZpZWxkMRgVIAEoCzImLnByb3Rv",
+ "YnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsVHlwZXMaWQoNT3B0aW9uYWxH",
+ "cm91cBJIChhvcHRpb25hbF9ncm91cF9hbGxfdHlwZXMYCyABKAsyJi5wcm90",
+ "b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbFR5cGVzGlkKDVJlcGVhdGVk",
+ "R3JvdXASSAoYcmVwZWF0ZWRfZ3JvdXBfYWxsX3R5cGVzGBUgASgLMiYucHJv",
+ "dG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxUeXBlcyoJCOgHEICAgIAC",
+ "MmkKDG9wdGlvbmFsX2V4dBIqLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5U",
+ "ZXN0UGFyc2luZ01lcmdlGOgHIAEoCzImLnByb3RvYnVmX3VuaXR0ZXN0X3By",
+ "b3RvMi5UZXN0QWxsVHlwZXMyaQoMcmVwZWF0ZWRfZXh0EioucHJvdG9idWZf",
+ "dW5pdHRlc3RfcHJvdG8yLlRlc3RQYXJzaW5nTWVyZ2UY6QcgAygLMiYucHJv",
+ "dG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxUeXBlcyJEChtUZXN0Q29t",
+ "bWVudEluamVjdGlvbk1lc3NhZ2USJQoBYRgBIAEoCToaKi8gPC0gTmVpdGhl",
+ "ciBzaG91bGQgdGhpcy4iDAoKRm9vUmVxdWVzdCINCgtGb29SZXNwb25zZSIS",
+ "ChBGb29DbGllbnRNZXNzYWdlIhIKEEZvb1NlcnZlck1lc3NhZ2UiDAoKQmFy",
+ "UmVxdWVzdCINCgtCYXJSZXNwb25zZSKSAQoMVGVzdEpzb25OYW1lEhMKC2Zp",
+ "ZWxkX25hbWUxGAEgASgFEhIKCmZpZWxkTmFtZTIYAiABKAUSEgoKRmllbGRO",
+ "YW1lMxgDIAEoBRIUCgxfZmllbGRfbmFtZTQYBCABKAUSEwoLRklFTERfTkFN",
+ "RTUYBSABKAUSGgoLZmllbGRfbmFtZTYYBiABKAVSBUB0eXBlIqAGChRUZXN0",
+ "SHVnZUZpZWxkTnVtYmVycxIaCg5vcHRpb25hbF9pbnQzMhjw+P//ASABKAUS",
+ "FAoIZml4ZWRfMzIY8fj//wEgASgFEh4KDnJlcGVhdGVkX2ludDMyGPL4//8B",
+ "IAMoBUICEAASHAoMcGFja2VkX2ludDMyGPP4//8BIAMoBUICEAESQAoNb3B0",
+ "aW9uYWxfZW51bRj0+P//ASABKA4yJS5wcm90b2J1Zl91bml0dGVzdF9wcm90",
+ "bzIuRm9yZWlnbkVudW0SGwoPb3B0aW9uYWxfc3RyaW5nGPX4//8BIAEoCRIa",
+ "Cg5vcHRpb25hbF9ieXRlcxj2+P//ASABKAwSRgoQb3B0aW9uYWxfbWVzc2Fn",
+ "ZRj3+P//ASABKAsyKC5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuRm9yZWln",
+ "bk1lc3NhZ2USVwoNb3B0aW9uYWxncm91cBj4+P//ASABKAoyPC5wcm90b2J1",
+ "Zl91bml0dGVzdF9wcm90bzIuVGVzdEh1Z2VGaWVsZE51bWJlcnMuT3B0aW9u",
+ "YWxHcm91cBJiChFzdHJpbmdfc3RyaW5nX21hcBj6+P//ASADKAsyQy5wcm90",
+ "b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEh1Z2VGaWVsZE51bWJlcnMuU3Ry",
+ "aW5nU3RyaW5nTWFwRW50cnkSGgoMb25lb2ZfdWludDMyGPv4//8BIAEoDUgA",
+ "EkoKFG9uZW9mX3Rlc3RfYWxsX3R5cGVzGPz4//8BIAEoCzImLnByb3RvYnVm",
+ "X3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsVHlwZXNIABIaCgxvbmVvZl9zdHJp",
+ "bmcY/fj//wEgASgJSAASGQoLb25lb2ZfYnl0ZXMY/vj//wEgASgMSAAaJAoN",
+ "T3B0aW9uYWxHcm91cBITCgdncm91cF9hGPn4//8BIAEoBRo2ChRTdHJpbmdT",
+ "dHJpbmdNYXBFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgB",
+ "KgwI4Kr//wEQ8Pj//wFCDQoLb25lb2ZfZmllbGQisQEKGFRlc3RFeHRlbnNp",
+ "b25JbnNpZGVUYWJsZRIOCgZmaWVsZDEYASABKAUSDgoGZmllbGQyGAIgASgF",
+ "Eg4KBmZpZWxkMxgDIAEoBRIOCgZmaWVsZDQYBCABKAUSDgoGZmllbGQ2GAYg",
+ "ASgFEg4KBmZpZWxkNxgHIAEoBRIOCgZmaWVsZDgYCCABKAUSDgoGZmllbGQ5",
+ "GAkgASgFEg8KB2ZpZWxkMTAYCiABKAUqBAgFEAYqQAoLRm9yZWlnbkVudW0S",
+ "DwoLRk9SRUlHTl9GT08QBBIPCgtGT1JFSUdOX0JBUhAFEg8KC0ZPUkVJR05f",
+ "QkFaEAYqSwoUVGVzdEVudW1XaXRoRHVwVmFsdWUSCAoERk9PMRABEggKBEJB",
+ "UjEQAhIHCgNCQVoQAxIICgRGT08yEAESCAoEQkFSMhACGgIQASqJAQoOVGVz",
+ "dFNwYXJzZUVudW0SDAoIU1BBUlNFX0EQexIOCghTUEFSU0VfQhCm5wMSDwoI",
+ "U1BBUlNFX0MQsrGABhIVCghTUEFSU0VfRBDx//////////8BEhUKCFNQQVJT",
+ "RV9FELTe/P///////wESDAoIU1BBUlNFX0YQABIMCghTUEFSU0VfRxACKosP",
+ "Cg1WZXJ5TGFyZ2VFbnVtEhYKEkVOVU1fTEFCRUxfREVGQVVMVBAAEhAKDEVO",
+ "VU1fTEFCRUxfMRABEhAKDEVOVU1fTEFCRUxfMhACEhAKDEVOVU1fTEFCRUxf",
+ "MxADEhAKDEVOVU1fTEFCRUxfNBAEEhAKDEVOVU1fTEFCRUxfNRAFEhAKDEVO",
+ "VU1fTEFCRUxfNhAGEhAKDEVOVU1fTEFCRUxfNxAHEhAKDEVOVU1fTEFCRUxf",
+ "OBAIEhAKDEVOVU1fTEFCRUxfORAJEhEKDUVOVU1fTEFCRUxfMTAQChIRCg1F",
+ "TlVNX0xBQkVMXzExEAsSEQoNRU5VTV9MQUJFTF8xMhAMEhEKDUVOVU1fTEFC",
+ "RUxfMTMQDRIRCg1FTlVNX0xBQkVMXzE0EA4SEQoNRU5VTV9MQUJFTF8xNRAP",
+ "EhEKDUVOVU1fTEFCRUxfMTYQEBIRCg1FTlVNX0xBQkVMXzE3EBESEQoNRU5V",
+ "TV9MQUJFTF8xOBASEhEKDUVOVU1fTEFCRUxfMTkQExIRCg1FTlVNX0xBQkVM",
+ "XzIwEBQSEQoNRU5VTV9MQUJFTF8yMRAVEhEKDUVOVU1fTEFCRUxfMjIQFhIR",
+ "Cg1FTlVNX0xBQkVMXzIzEBcSEQoNRU5VTV9MQUJFTF8yNBAYEhEKDUVOVU1f",
+ "TEFCRUxfMjUQGRIRCg1FTlVNX0xBQkVMXzI2EBoSEQoNRU5VTV9MQUJFTF8y",
+ "NxAbEhEKDUVOVU1fTEFCRUxfMjgQHBIRCg1FTlVNX0xBQkVMXzI5EB0SEQoN",
+ "RU5VTV9MQUJFTF8zMBAeEhEKDUVOVU1fTEFCRUxfMzEQHxIRCg1FTlVNX0xB",
+ "QkVMXzMyECASEQoNRU5VTV9MQUJFTF8zMxAhEhEKDUVOVU1fTEFCRUxfMzQQ",
+ "IhIRCg1FTlVNX0xBQkVMXzM1ECMSEQoNRU5VTV9MQUJFTF8zNhAkEhEKDUVO",
+ "VU1fTEFCRUxfMzcQJRIRCg1FTlVNX0xBQkVMXzM4ECYSEQoNRU5VTV9MQUJF",
+ "TF8zORAnEhEKDUVOVU1fTEFCRUxfNDAQKBIRCg1FTlVNX0xBQkVMXzQxECkS",
+ "EQoNRU5VTV9MQUJFTF80MhAqEhEKDUVOVU1fTEFCRUxfNDMQKxIRCg1FTlVN",
+ "X0xBQkVMXzQ0ECwSEQoNRU5VTV9MQUJFTF80NRAtEhEKDUVOVU1fTEFCRUxf",
+ "NDYQLhIRCg1FTlVNX0xBQkVMXzQ3EC8SEQoNRU5VTV9MQUJFTF80OBAwEhEK",
+ "DUVOVU1fTEFCRUxfNDkQMRIRCg1FTlVNX0xBQkVMXzUwEDISEQoNRU5VTV9M",
+ "QUJFTF81MRAzEhEKDUVOVU1fTEFCRUxfNTIQNBIRCg1FTlVNX0xBQkVMXzUz",
+ "EDUSEQoNRU5VTV9MQUJFTF81NBA2EhEKDUVOVU1fTEFCRUxfNTUQNxIRCg1F",
+ "TlVNX0xBQkVMXzU2EDgSEQoNRU5VTV9MQUJFTF81NxA5EhEKDUVOVU1fTEFC",
+ "RUxfNTgQOhIRCg1FTlVNX0xBQkVMXzU5EDsSEQoNRU5VTV9MQUJFTF82MBA8",
+ "EhEKDUVOVU1fTEFCRUxfNjEQPRIRCg1FTlVNX0xBQkVMXzYyED4SEQoNRU5V",
+ "TV9MQUJFTF82MxA/EhEKDUVOVU1fTEFCRUxfNjQQQBIRCg1FTlVNX0xBQkVM",
+ "XzY1EEESEQoNRU5VTV9MQUJFTF82NhBCEhEKDUVOVU1fTEFCRUxfNjcQQxIR",
+ "Cg1FTlVNX0xBQkVMXzY4EEQSEQoNRU5VTV9MQUJFTF82ORBFEhEKDUVOVU1f",
+ "TEFCRUxfNzAQRhIRCg1FTlVNX0xBQkVMXzcxEEcSEQoNRU5VTV9MQUJFTF83",
+ "MhBIEhEKDUVOVU1fTEFCRUxfNzMQSRIRCg1FTlVNX0xBQkVMXzc0EEoSEQoN",
+ "RU5VTV9MQUJFTF83NRBLEhEKDUVOVU1fTEFCRUxfNzYQTBIRCg1FTlVNX0xB",
+ "QkVMXzc3EE0SEQoNRU5VTV9MQUJFTF83OBBOEhEKDUVOVU1fTEFCRUxfNzkQ",
+ "TxIRCg1FTlVNX0xBQkVMXzgwEFASEQoNRU5VTV9MQUJFTF84MRBREhEKDUVO",
+ "VU1fTEFCRUxfODIQUhIRCg1FTlVNX0xBQkVMXzgzEFMSEQoNRU5VTV9MQUJF",
+ "TF84NBBUEhEKDUVOVU1fTEFCRUxfODUQVRIRCg1FTlVNX0xBQkVMXzg2EFYS",
+ "EQoNRU5VTV9MQUJFTF84NxBXEhEKDUVOVU1fTEFCRUxfODgQWBIRCg1FTlVN",
+ "X0xBQkVMXzg5EFkSEQoNRU5VTV9MQUJFTF85MBBaEhEKDUVOVU1fTEFCRUxf",
+ "OTEQWxIRCg1FTlVNX0xBQkVMXzkyEFwSEQoNRU5VTV9MQUJFTF85MxBdEhEK",
+ "DUVOVU1fTEFCRUxfOTQQXhIRCg1FTlVNX0xBQkVMXzk1EF8SEQoNRU5VTV9M",
+ "QUJFTF85NhBgEhEKDUVOVU1fTEFCRUxfOTcQYRIRCg1FTlVNX0xBQkVMXzk4",
+ "EGISEQoNRU5VTV9MQUJFTF85ORBjEhIKDkVOVU1fTEFCRUxfMTAwEGQytQEK",
+ "C1Rlc3RTZXJ2aWNlElIKA0ZvbxIkLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3Rv",
+ "Mi5Gb29SZXF1ZXN0GiUucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLkZvb1Jl",
+ "c3BvbnNlElIKA0JhchIkLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5CYXJS",
+ "ZXF1ZXN0GiUucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLkJhclJlc3BvbnNl",
+ "Ok0KGG9wdGlvbmFsX2ludDMyX2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0",
+ "ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5zaW9ucxgBIAEoBTpNChhvcHRpb25h",
+ "bF9pbnQ2NF9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIu",
+ "VGVzdEFsbEV4dGVuc2lvbnMYAiABKAM6TgoZb3B0aW9uYWxfdWludDMyX2V4",
+ "dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0",
+ "ZW5zaW9ucxgDIAEoDTpOChlvcHRpb25hbF91aW50NjRfZXh0ZW5zaW9uEisu",
+ "cHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNpb25zGAQg",
+ "ASgEOk4KGW9wdGlvbmFsX3NpbnQzMl9leHRlbnNpb24SKy5wcm90b2J1Zl91",
+ "bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4dGVuc2lvbnMYBSABKBE6TgoZb3B0",
+ "aW9uYWxfc2ludDY0X2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3By",
+ "b3RvMi5UZXN0QWxsRXh0ZW5zaW9ucxgGIAEoEjpPChpvcHRpb25hbF9maXhl",
+ "ZDMyX2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0",
+ "QWxsRXh0ZW5zaW9ucxgHIAEoBzpPChpvcHRpb25hbF9maXhlZDY0X2V4dGVu",
+ "c2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5z",
+ "aW9ucxgIIAEoBjpQChtvcHRpb25hbF9zZml4ZWQzMl9leHRlbnNpb24SKy5w",
+ "cm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4dGVuc2lvbnMYCSAB",
+ "KA86UAobb3B0aW9uYWxfc2ZpeGVkNjRfZXh0ZW5zaW9uEisucHJvdG9idWZf",
+ "dW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNpb25zGAogASgQOk0KGG9w",
+ "dGlvbmFsX2Zsb2F0X2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3By",
+ "b3RvMi5UZXN0QWxsRXh0ZW5zaW9ucxgLIAEoAjpOChlvcHRpb25hbF9kb3Vi",
+ "bGVfZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RB",
+ "bGxFeHRlbnNpb25zGAwgASgBOkwKF29wdGlvbmFsX2Jvb2xfZXh0ZW5zaW9u",
+ "EisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNpb25z",
+ "GA0gASgIOk4KGW9wdGlvbmFsX3N0cmluZ19leHRlbnNpb24SKy5wcm90b2J1",
+ "Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4dGVuc2lvbnMYDiABKAk6TQoY",
+ "b3B0aW9uYWxfYnl0ZXNfZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3Rf",
+ "cHJvdG8yLlRlc3RBbGxFeHRlbnNpb25zGA8gASgMOn8KF29wdGlvbmFsZ3Jv",
+ "dXBfZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RB",
+ "bGxFeHRlbnNpb25zGBAgASgKMjEucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8y",
+ "Lk9wdGlvbmFsR3JvdXBfZXh0ZW5zaW9uOowBCiFvcHRpb25hbF9uZXN0ZWRf",
+ "bWVzc2FnZV9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIu",
+ "VGVzdEFsbEV4dGVuc2lvbnMYEiABKAsyNC5wcm90b2J1Zl91bml0dGVzdF9w",
+ "cm90bzIuVGVzdEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2U6gQEKIm9wdGlvbmFs",
+ "X2ZvcmVpZ25fbWVzc2FnZV9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVz",
+ "dF9wcm90bzIuVGVzdEFsbEV4dGVuc2lvbnMYEyABKAsyKC5wcm90b2J1Zl91",
+ "bml0dGVzdF9wcm90bzIuRm9yZWlnbk1lc3NhZ2U6hgEKIW9wdGlvbmFsX2lt",
+ "cG9ydF9tZXNzYWdlX2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3By",
+ "b3RvMi5UZXN0QWxsRXh0ZW5zaW9ucxgUIAEoCzIuLnByb3RvYnVmX3VuaXR0",
+ "ZXN0X2ltcG9ydF9wcm90bzIuSW1wb3J0TWVzc2FnZTqGAQoeb3B0aW9uYWxf",
+ "bmVzdGVkX2VudW1fZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3RfcHJv",
+ "dG8yLlRlc3RBbGxFeHRlbnNpb25zGBUgASgOMjEucHJvdG9idWZfdW5pdHRl",
+ "c3RfcHJvdG8yLlRlc3RBbGxUeXBlcy5OZXN0ZWRFbnVtOnsKH29wdGlvbmFs",
+ "X2ZvcmVpZ25fZW51bV9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9w",
+ "cm90bzIuVGVzdEFsbEV4dGVuc2lvbnMYFiABKA4yJS5wcm90b2J1Zl91bml0",
+ "dGVzdF9wcm90bzIuRm9yZWlnbkVudW06gAEKHm9wdGlvbmFsX2ltcG9ydF9l",
+ "bnVtX2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0",
+ "QWxsRXh0ZW5zaW9ucxgXIAEoDjIrLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9y",
+ "dF9wcm90bzIuSW1wb3J0RW51bTpYCh9vcHRpb25hbF9zdHJpbmdfcGllY2Vf",
+ "ZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxF",
+ "eHRlbnNpb25zGBggASgJQgIIAjpQChdvcHRpb25hbF9jb3JkX2V4dGVuc2lv",
+ "bhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5zaW9u",
+ "cxgZIAEoCUICCAE6kwEKKG9wdGlvbmFsX3B1YmxpY19pbXBvcnRfbWVzc2Fn",
+ "ZV9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFs",
+ "bEV4dGVuc2lvbnMYGiABKAsyNC5wcm90b2J1Zl91bml0dGVzdF9pbXBvcnRf",
+ "cHJvdG8yLlB1YmxpY0ltcG9ydE1lc3NhZ2U6jgEKH29wdGlvbmFsX2xhenlf",
+ "bWVzc2FnZV9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIu",
+ "VGVzdEFsbEV4dGVuc2lvbnMYGyABKAsyNC5wcm90b2J1Zl91bml0dGVzdF9w",
+ "cm90bzIuVGVzdEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2VCAigBOk0KGHJlcGVh",
+ "dGVkX2ludDMyX2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3Rv",
+ "Mi5UZXN0QWxsRXh0ZW5zaW9ucxgfIAMoBTpNChhyZXBlYXRlZF9pbnQ2NF9l",
+ "eHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4",
+ "dGVuc2lvbnMYICADKAM6TgoZcmVwZWF0ZWRfdWludDMyX2V4dGVuc2lvbhIr",
+ "LnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5zaW9ucxgh",
+ "IAMoDTpOChlyZXBlYXRlZF91aW50NjRfZXh0ZW5zaW9uEisucHJvdG9idWZf",
+ "dW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNpb25zGCIgAygEOk4KGXJl",
+ "cGVhdGVkX3NpbnQzMl9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9w",
+ "cm90bzIuVGVzdEFsbEV4dGVuc2lvbnMYIyADKBE6TgoZcmVwZWF0ZWRfc2lu",
+ "dDY0X2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0",
+ "QWxsRXh0ZW5zaW9ucxgkIAMoEjpPChpyZXBlYXRlZF9maXhlZDMyX2V4dGVu",
+ "c2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5z",
+ "aW9ucxglIAMoBzpPChpyZXBlYXRlZF9maXhlZDY0X2V4dGVuc2lvbhIrLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5zaW9ucxgmIAMo",
+ "BjpQChtyZXBlYXRlZF9zZml4ZWQzMl9leHRlbnNpb24SKy5wcm90b2J1Zl91",
+ "bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4dGVuc2lvbnMYJyADKA86UAobcmVw",
+ "ZWF0ZWRfc2ZpeGVkNjRfZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3Rf",
+ "cHJvdG8yLlRlc3RBbGxFeHRlbnNpb25zGCggAygQOk0KGHJlcGVhdGVkX2Zs",
+ "b2F0X2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0",
+ "QWxsRXh0ZW5zaW9ucxgpIAMoAjpOChlyZXBlYXRlZF9kb3VibGVfZXh0ZW5z",
+ "aW9uEisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNp",
+ "b25zGCogAygBOkwKF3JlcGVhdGVkX2Jvb2xfZXh0ZW5zaW9uEisucHJvdG9i",
+ "dWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNpb25zGCsgAygIOk4K",
+ "GXJlcGVhdGVkX3N0cmluZ19leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVz",
+ "dF9wcm90bzIuVGVzdEFsbEV4dGVuc2lvbnMYLCADKAk6TQoYcmVwZWF0ZWRf",
+ "Ynl0ZXNfZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRl",
+ "c3RBbGxFeHRlbnNpb25zGC0gAygMOn8KF3JlcGVhdGVkZ3JvdXBfZXh0ZW5z",
+ "aW9uEisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNp",
+ "b25zGC4gAygKMjEucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlJlcGVhdGVk",
+ "R3JvdXBfZXh0ZW5zaW9uOowBCiFyZXBlYXRlZF9uZXN0ZWRfbWVzc2FnZV9l",
+ "eHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4",
+ "dGVuc2lvbnMYMCADKAsyNC5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVz",
+ "dEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2U6gQEKInJlcGVhdGVkX2ZvcmVpZ25f",
+ "bWVzc2FnZV9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIu",
+ "VGVzdEFsbEV4dGVuc2lvbnMYMSADKAsyKC5wcm90b2J1Zl91bml0dGVzdF9w",
+ "cm90bzIuRm9yZWlnbk1lc3NhZ2U6hgEKIXJlcGVhdGVkX2ltcG9ydF9tZXNz",
+ "YWdlX2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0",
+ "QWxsRXh0ZW5zaW9ucxgyIAMoCzIuLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9y",
+ "dF9wcm90bzIuSW1wb3J0TWVzc2FnZTqGAQoecmVwZWF0ZWRfbmVzdGVkX2Vu",
+ "dW1fZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RB",
+ "bGxFeHRlbnNpb25zGDMgAygOMjEucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8y",
+ "LlRlc3RBbGxUeXBlcy5OZXN0ZWRFbnVtOnsKH3JlcGVhdGVkX2ZvcmVpZ25f",
+ "ZW51bV9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVz",
+ "dEFsbEV4dGVuc2lvbnMYNCADKA4yJS5wcm90b2J1Zl91bml0dGVzdF9wcm90",
+ "bzIuRm9yZWlnbkVudW06gAEKHnJlcGVhdGVkX2ltcG9ydF9lbnVtX2V4dGVu",
+ "c2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5z",
+ "aW9ucxg1IAMoDjIrLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydF9wcm90bzIu",
+ "SW1wb3J0RW51bTpYCh9yZXBlYXRlZF9zdHJpbmdfcGllY2VfZXh0ZW5zaW9u",
+ "EisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNpb25z",
+ "GDYgAygJQgIIAjpQChdyZXBlYXRlZF9jb3JkX2V4dGVuc2lvbhIrLnByb3Rv",
+ "YnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5zaW9ucxg3IAMoCUIC",
+ "CAE6jgEKH3JlcGVhdGVkX2xhenlfbWVzc2FnZV9leHRlbnNpb24SKy5wcm90",
+ "b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4dGVuc2lvbnMYOSADKAsy",
+ "NC5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbFR5cGVzLk5lc3Rl",
+ "ZE1lc3NhZ2VCAigBOlAKF2RlZmF1bHRfaW50MzJfZXh0ZW5zaW9uEisucHJv",
+ "dG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNpb25zGD0gASgF",
+ "OgI0MTpQChdkZWZhdWx0X2ludDY0X2V4dGVuc2lvbhIrLnByb3RvYnVmX3Vu",
+ "aXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5zaW9ucxg+IAEoAzoCNDI6UQoY",
+ "ZGVmYXVsdF91aW50MzJfZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3Rf",
+ "cHJvdG8yLlRlc3RBbGxFeHRlbnNpb25zGD8gASgNOgI0MzpRChhkZWZhdWx0",
+ "X3VpbnQ2NF9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIu",
+ "VGVzdEFsbEV4dGVuc2lvbnMYQCABKAQ6AjQ0OlIKGGRlZmF1bHRfc2ludDMy",
+ "X2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxs",
+ "RXh0ZW5zaW9ucxhBIAEoEToDLTQ1OlEKGGRlZmF1bHRfc2ludDY0X2V4dGVu",
+ "c2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5z",
+ "aW9ucxhCIAEoEjoCNDY6UgoZZGVmYXVsdF9maXhlZDMyX2V4dGVuc2lvbhIr",
+ "LnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5zaW9ucxhD",
+ "IAEoBzoCNDc6UgoZZGVmYXVsdF9maXhlZDY0X2V4dGVuc2lvbhIrLnByb3Rv",
+ "YnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5zaW9ucxhEIAEoBjoC",
+ "NDg6UwoaZGVmYXVsdF9zZml4ZWQzMl9leHRlbnNpb24SKy5wcm90b2J1Zl91",
+ "bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4dGVuc2lvbnMYRSABKA86AjQ5OlQK",
+ "GmRlZmF1bHRfc2ZpeGVkNjRfZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRl",
+ "c3RfcHJvdG8yLlRlc3RBbGxFeHRlbnNpb25zGEYgASgQOgMtNTA6UgoXZGVm",
+ "YXVsdF9mbG9hdF9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90",
+ "bzIuVGVzdEFsbEV4dGVuc2lvbnMYRyABKAI6BDUxLjU6VAoYZGVmYXVsdF9k",
+ "b3VibGVfZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRl",
+ "c3RBbGxFeHRlbnNpb25zGEggASgBOgU1MjAwMDpRChZkZWZhdWx0X2Jvb2xf",
+ "ZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxF",
+ "eHRlbnNpb25zGEkgASgIOgR0cnVlOlQKGGRlZmF1bHRfc3RyaW5nX2V4dGVu",
+ "c2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5z",
+ "aW9ucxhKIAEoCToFaGVsbG86UwoXZGVmYXVsdF9ieXRlc19leHRlbnNpb24S",
+ "Ky5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4dGVuc2lvbnMY",
+ "SyABKAw6BXdvcmxkOooBCh1kZWZhdWx0X25lc3RlZF9lbnVtX2V4dGVuc2lv",
+ "bhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5zaW9u",
+ "cxhRIAEoDjIxLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsVHlw",
+ "ZXMuTmVzdGVkRW51bToDQkFSOocBCh5kZWZhdWx0X2ZvcmVpZ25fZW51bV9l",
+ "eHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4",
+ "dGVuc2lvbnMYUiABKA4yJS5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuRm9y",
+ "ZWlnbkVudW06C0ZPUkVJR05fQkFSOosBCh1kZWZhdWx0X2ltcG9ydF9lbnVt",
+ "X2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxs",
+ "RXh0ZW5zaW9ucxhTIAEoDjIrLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydF9w",
+ "cm90bzIuSW1wb3J0RW51bToKSU1QT1JUX0JBUjpcCh5kZWZhdWx0X3N0cmlu",
+ "Z19waWVjZV9leHRlbnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIu",
+ "VGVzdEFsbEV4dGVuc2lvbnMYVCABKAk6A2FiY0ICCAI6VAoWZGVmYXVsdF9j",
+ "b3JkX2V4dGVuc2lvbhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0",
+ "QWxsRXh0ZW5zaW9ucxhVIAEoCToDMTIzQgIIATpLChZvbmVvZl91aW50MzJf",
+ "ZXh0ZW5zaW9uEisucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RBbGxF",
+ "eHRlbnNpb25zGG8gASgNOokBCh5vbmVvZl9uZXN0ZWRfbWVzc2FnZV9leHRl",
+ "bnNpb24SKy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4dGVu",
+ "c2lvbnMYcCABKAsyNC5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdEFs",
+ "bFR5cGVzLk5lc3RlZE1lc3NhZ2U6SwoWb25lb2Zfc3RyaW5nX2V4dGVuc2lv",
+ "bhIrLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0QWxsRXh0ZW5zaW9u",
+ "cxhxIAEoCTpKChVvbmVvZl9ieXRlc19leHRlbnNpb24SKy5wcm90b2J1Zl91",
+ "bml0dGVzdF9wcm90bzIuVGVzdEFsbEV4dGVuc2lvbnMYciABKAw6SQoTbXlf",
+ "ZXh0ZW5zaW9uX3N0cmluZxIsLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5U",
+ "ZXN0RmllbGRPcmRlcmluZ3MYMiABKAk6RgoQbXlfZXh0ZW5zaW9uX2ludBIs",
+ "LnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0RmllbGRPcmRlcmluZ3MY",
+ "BSABKAU6UgoWcGFja2VkX2ludDMyX2V4dGVuc2lvbhIuLnByb3RvYnVmX3Vu",
+ "aXR0ZXN0X3Byb3RvMi5UZXN0UGFja2VkRXh0ZW5zaW9ucxhaIAMoBUICEAE6",
+ "UgoWcGFja2VkX2ludDY0X2V4dGVuc2lvbhIuLnByb3RvYnVmX3VuaXR0ZXN0",
+ "X3Byb3RvMi5UZXN0UGFja2VkRXh0ZW5zaW9ucxhbIAMoA0ICEAE6UwoXcGFj",
+ "a2VkX3VpbnQzMl9leHRlbnNpb24SLi5wcm90b2J1Zl91bml0dGVzdF9wcm90",
+ "bzIuVGVzdFBhY2tlZEV4dGVuc2lvbnMYXCADKA1CAhABOlMKF3BhY2tlZF91",
+ "aW50NjRfZXh0ZW5zaW9uEi4ucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRl",
+ "c3RQYWNrZWRFeHRlbnNpb25zGF0gAygEQgIQATpTChdwYWNrZWRfc2ludDMy",
+ "X2V4dGVuc2lvbhIuLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0UGFj",
+ "a2VkRXh0ZW5zaW9ucxheIAMoEUICEAE6UwoXcGFja2VkX3NpbnQ2NF9leHRl",
+ "bnNpb24SLi5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdFBhY2tlZEV4",
+ "dGVuc2lvbnMYXyADKBJCAhABOlQKGHBhY2tlZF9maXhlZDMyX2V4dGVuc2lv",
+ "bhIuLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0UGFja2VkRXh0ZW5z",
+ "aW9ucxhgIAMoB0ICEAE6VAoYcGFja2VkX2ZpeGVkNjRfZXh0ZW5zaW9uEi4u",
+ "cHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RQYWNrZWRFeHRlbnNpb25z",
+ "GGEgAygGQgIQATpVChlwYWNrZWRfc2ZpeGVkMzJfZXh0ZW5zaW9uEi4ucHJv",
+ "dG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RQYWNrZWRFeHRlbnNpb25zGGIg",
+ "AygPQgIQATpVChlwYWNrZWRfc2ZpeGVkNjRfZXh0ZW5zaW9uEi4ucHJvdG9i",
+ "dWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RQYWNrZWRFeHRlbnNpb25zGGMgAygQ",
+ "QgIQATpSChZwYWNrZWRfZmxvYXRfZXh0ZW5zaW9uEi4ucHJvdG9idWZfdW5p",
+ "dHRlc3RfcHJvdG8yLlRlc3RQYWNrZWRFeHRlbnNpb25zGGQgAygCQgIQATpT",
+ "ChdwYWNrZWRfZG91YmxlX2V4dGVuc2lvbhIuLnByb3RvYnVmX3VuaXR0ZXN0",
+ "X3Byb3RvMi5UZXN0UGFja2VkRXh0ZW5zaW9ucxhlIAMoAUICEAE6UQoVcGFj",
+ "a2VkX2Jvb2xfZXh0ZW5zaW9uEi4ucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8y",
+ "LlRlc3RQYWNrZWRFeHRlbnNpb25zGGYgAygIQgIQATp4ChVwYWNrZWRfZW51",
+ "bV9leHRlbnNpb24SLi5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdFBh",
+ "Y2tlZEV4dGVuc2lvbnMYZyADKA4yJS5wcm90b2J1Zl91bml0dGVzdF9wcm90",
+ "bzIuRm9yZWlnbkVudW1CAhABOlYKGHVucGFja2VkX2ludDMyX2V4dGVuc2lv",
+ "bhIwLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0VW5wYWNrZWRFeHRl",
+ "bnNpb25zGFogAygFQgIQADpWChh1bnBhY2tlZF9pbnQ2NF9leHRlbnNpb24S",
+ "MC5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdFVucGFja2VkRXh0ZW5z",
+ "aW9ucxhbIAMoA0ICEAA6VwoZdW5wYWNrZWRfdWludDMyX2V4dGVuc2lvbhIw",
+ "LnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0VW5wYWNrZWRFeHRlbnNp",
+ "b25zGFwgAygNQgIQADpXChl1bnBhY2tlZF91aW50NjRfZXh0ZW5zaW9uEjAu",
+ "cHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RVbnBhY2tlZEV4dGVuc2lv",
+ "bnMYXSADKARCAhAAOlcKGXVucGFja2VkX3NpbnQzMl9leHRlbnNpb24SMC5w",
+ "cm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdFVucGFja2VkRXh0ZW5zaW9u",
+ "cxheIAMoEUICEAA6VwoZdW5wYWNrZWRfc2ludDY0X2V4dGVuc2lvbhIwLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0VW5wYWNrZWRFeHRlbnNpb25z",
+ "GF8gAygSQgIQADpYChp1bnBhY2tlZF9maXhlZDMyX2V4dGVuc2lvbhIwLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0VW5wYWNrZWRFeHRlbnNpb25z",
+ "GGAgAygHQgIQADpYChp1bnBhY2tlZF9maXhlZDY0X2V4dGVuc2lvbhIwLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0VW5wYWNrZWRFeHRlbnNpb25z",
+ "GGEgAygGQgIQADpZCht1bnBhY2tlZF9zZml4ZWQzMl9leHRlbnNpb24SMC5w",
+ "cm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdFVucGFja2VkRXh0ZW5zaW9u",
+ "cxhiIAMoD0ICEAA6WQobdW5wYWNrZWRfc2ZpeGVkNjRfZXh0ZW5zaW9uEjAu",
+ "cHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RVbnBhY2tlZEV4dGVuc2lv",
+ "bnMYYyADKBBCAhAAOlYKGHVucGFja2VkX2Zsb2F0X2V4dGVuc2lvbhIwLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0VW5wYWNrZWRFeHRlbnNpb25z",
+ "GGQgAygCQgIQADpXChl1bnBhY2tlZF9kb3VibGVfZXh0ZW5zaW9uEjAucHJv",
+ "dG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RVbnBhY2tlZEV4dGVuc2lvbnMY",
+ "ZSADKAFCAhAAOlUKF3VucGFja2VkX2Jvb2xfZXh0ZW5zaW9uEjAucHJvdG9i",
+ "dWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RVbnBhY2tlZEV4dGVuc2lvbnMYZiAD",
+ "KAhCAhAAOnwKF3VucGFja2VkX2VudW1fZXh0ZW5zaW9uEjAucHJvdG9idWZf",
+ "dW5pdHRlc3RfcHJvdG8yLlRlc3RVbnBhY2tlZEV4dGVuc2lvbnMYZyADKA4y",
+ "JS5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuRm9yZWlnbkVudW1CAhAAOnIK",
+ "DnRlc3RfYWxsX3R5cGVzEi4ucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRl",
+ "c3RIdWdlRmllbGROdW1iZXJzGOCq//8BIAEoCzImLnByb3RvYnVmX3VuaXR0",
+ "ZXN0X3Byb3RvMi5UZXN0QWxsVHlwZXM6YQoldGVzdF9leHRlbnNpb25faW5z",
+ "aWRlX3RhYmxlX2V4dGVuc2lvbhIyLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3Rv",
+ "Mi5UZXN0RXh0ZW5zaW9uSW5zaWRlVGFibGUYBSABKAVCMkgBgAEBiAEBkAEB",
+ "+AEBqgIhR29vZ2xlLlByb3RvYnVmLlRlc3RQcm90b3MuUHJvdG8y"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.Proto2.UnittestImportReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.Proto2.ForeignEnum), typeof(global::Google.Protobuf.TestProtos.Proto2.TestEnumWithDupValue), typeof(global::Google.Protobuf.TestProtos.Proto2.TestSparseEnum), typeof(global::Google.Protobuf.TestProtos.Proto2.VeryLargeEnum), }, new pb::Extension[] { UnittestExtensions.OptionalInt32Extension, UnittestExtensions.OptionalInt64Extension, UnittestExtensions.OptionalUint32Extension, UnittestExtensions.OptionalUint64Extension, UnittestExtensions.OptionalSint32Extension, UnittestExtensions.OptionalSint64Extension, UnittestExtensions.OptionalFixed32Extension, UnittestExtensions.OptionalFixed64Extension, UnittestExtensions.OptionalSfixed32Extension, UnittestExtensions.OptionalSfixed64Extension, UnittestExtensions.OptionalFloatExtension, UnittestExtensions.OptionalDoubleExtension, UnittestExtensions.OptionalBoolExtension, UnittestExtensions.OptionalStringExtension, UnittestExtensions.OptionalBytesExtension, UnittestExtensions.OptionalGroupExtension, UnittestExtensions.OptionalNestedMessageExtension, UnittestExtensions.OptionalForeignMessageExtension, UnittestExtensions.OptionalImportMessageExtension, UnittestExtensions.OptionalNestedEnumExtension, UnittestExtensions.OptionalForeignEnumExtension, UnittestExtensions.OptionalImportEnumExtension, UnittestExtensions.OptionalStringPieceExtension, UnittestExtensions.OptionalCordExtension, UnittestExtensions.OptionalPublicImportMessageExtension, UnittestExtensions.OptionalLazyMessageExtension, UnittestExtensions.RepeatedInt32Extension, UnittestExtensions.RepeatedInt64Extension, UnittestExtensions.RepeatedUint32Extension, UnittestExtensions.RepeatedUint64Extension, UnittestExtensions.RepeatedSint32Extension, UnittestExtensions.RepeatedSint64Extension, UnittestExtensions.RepeatedFixed32Extension, UnittestExtensions.RepeatedFixed64Extension, UnittestExtensions.RepeatedSfixed32Extension, UnittestExtensions.RepeatedSfixed64Extension, UnittestExtensions.RepeatedFloatExtension, UnittestExtensions.RepeatedDoubleExtension, UnittestExtensions.RepeatedBoolExtension, UnittestExtensions.RepeatedStringExtension, UnittestExtensions.RepeatedBytesExtension, UnittestExtensions.RepeatedGroupExtension, UnittestExtensions.RepeatedNestedMessageExtension, UnittestExtensions.RepeatedForeignMessageExtension, UnittestExtensions.RepeatedImportMessageExtension, UnittestExtensions.RepeatedNestedEnumExtension, UnittestExtensions.RepeatedForeignEnumExtension, UnittestExtensions.RepeatedImportEnumExtension, UnittestExtensions.RepeatedStringPieceExtension, UnittestExtensions.RepeatedCordExtension, UnittestExtensions.RepeatedLazyMessageExtension, UnittestExtensions.DefaultInt32Extension, UnittestExtensions.DefaultInt64Extension, UnittestExtensions.DefaultUint32Extension, UnittestExtensions.DefaultUint64Extension, UnittestExtensions.DefaultSint32Extension, UnittestExtensions.DefaultSint64Extension, UnittestExtensions.DefaultFixed32Extension, UnittestExtensions.DefaultFixed64Extension, UnittestExtensions.DefaultSfixed32Extension, UnittestExtensions.DefaultSfixed64Extension, UnittestExtensions.DefaultFloatExtension, UnittestExtensions.DefaultDoubleExtension, UnittestExtensions.DefaultBoolExtension, UnittestExtensions.DefaultStringExtension, UnittestExtensions.DefaultBytesExtension, UnittestExtensions.DefaultNestedEnumExtension, UnittestExtensions.DefaultForeignEnumExtension, UnittestExtensions.DefaultImportEnumExtension, UnittestExtensions.DefaultStringPieceExtension, UnittestExtensions.DefaultCordExtension, UnittestExtensions.OneofUint32Extension, UnittestExtensions.OneofNestedMessageExtension, UnittestExtensions.OneofStringExtension, UnittestExtensions.OneofBytesExtension, UnittestExtensions.MyExtensionString, UnittestExtensions.MyExtensionInt, UnittestExtensions.PackedInt32Extension, UnittestExtensions.PackedInt64Extension, UnittestExtensions.PackedUint32Extension, UnittestExtensions.PackedUint64Extension, UnittestExtensions.PackedSint32Extension, UnittestExtensions.PackedSint64Extension, UnittestExtensions.PackedFixed32Extension, UnittestExtensions.PackedFixed64Extension, UnittestExtensions.PackedSfixed32Extension, UnittestExtensions.PackedSfixed64Extension, UnittestExtensions.PackedFloatExtension, UnittestExtensions.PackedDoubleExtension, UnittestExtensions.PackedBoolExtension, UnittestExtensions.PackedEnumExtension, UnittestExtensions.UnpackedInt32Extension, UnittestExtensions.UnpackedInt64Extension, UnittestExtensions.UnpackedUint32Extension, UnittestExtensions.UnpackedUint64Extension, UnittestExtensions.UnpackedSint32Extension, UnittestExtensions.UnpackedSint64Extension, UnittestExtensions.UnpackedFixed32Extension, UnittestExtensions.UnpackedFixed64Extension, UnittestExtensions.UnpackedSfixed32Extension, UnittestExtensions.UnpackedSfixed64Extension, UnittestExtensions.UnpackedFloatExtension, UnittestExtensions.UnpackedDoubleExtension, UnittestExtensions.UnpackedBoolExtension, UnittestExtensions.UnpackedEnumExtension, UnittestExtensions.TestAllTypes, UnittestExtensions.TestExtensionInsideTableExtension }, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestAllTypes), global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalGroup", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalImportMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalImportEnum", "OptionalStringPiece", "OptionalCord", "OptionalPublicImportMessage", "OptionalLazyMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedGroup", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedImportMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedImportEnum", "RepeatedStringPiece", "RepeatedCord", "RepeatedLazyMessage", "DefaultInt32", "DefaultInt64", "DefaultUint32", "DefaultUint64", "DefaultSint32", "DefaultSint64", "DefaultFixed32", "DefaultFixed64", "DefaultSfixed32", "DefaultSfixed64", "DefaultFloat", "DefaultDouble", "DefaultBool", "DefaultString", "DefaultBytes", "DefaultNestedEnum", "DefaultForeignEnum", "DefaultImportEnum", "DefaultStringPiece", "DefaultCord", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes" }, new[]{ "OneofField" }, new[]{ typeof(global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage), global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser, new[]{ "Bb" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.OptionalGroup), global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.OptionalGroup.Parser, new[]{ "A" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.RepeatedGroup), global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.RepeatedGroup.Parser, new[]{ "A" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes), global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes.Parser, new[]{ "Child", "Payload", "RepeatedChild" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestDeprecatedFields), global::Google.Protobuf.TestProtos.Proto2.TestDeprecatedFields.Parser, new[]{ "DeprecatedInt32", "DeprecatedInt32InOneof" }, new[]{ "OneofFields" }, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestDeprecatedMessage), global::Google.Protobuf.TestProtos.Proto2.TestDeprecatedMessage.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.ForeignMessage), global::Google.Protobuf.TestProtos.Proto2.ForeignMessage.Parser, new[]{ "C", "D" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestReservedFields), global::Google.Protobuf.TestProtos.Proto2.TestReservedFields.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions), global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.OptionalGroup_extension), global::Google.Protobuf.TestProtos.Proto2.OptionalGroup_extension.Parser, new[]{ "A" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.RepeatedGroup_extension), global::Google.Protobuf.TestProtos.Proto2.RepeatedGroup_extension.Parser, new[]{ "A" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestGroup), global::Google.Protobuf.TestProtos.Proto2.TestGroup.Parser, new[]{ "OptionalGroup", "OptionalForeignEnum" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestGroup.Types.OptionalGroup), global::Google.Protobuf.TestProtos.Proto2.TestGroup.Types.OptionalGroup.Parser, new[]{ "A" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestGroupExtension), global::Google.Protobuf.TestProtos.Proto2.TestGroupExtension.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension), global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Parser, null, null, null, new pb::Extension[] { global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Extensions.Test, global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Extensions.NestedStringExtension, global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Extensions.OptionalGroupExtension, global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Extensions.OptionalForeignEnumExtension }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Types.OptionalGroup_extension), global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Types.OptionalGroup_extension.Parser, new[]{ "A" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestRequired), global::Google.Protobuf.TestProtos.Proto2.TestRequired.Parser, new[]{ "A", "Dummy2", "B", "Dummy4", "Dummy5", "Dummy6", "Dummy7", "Dummy8", "Dummy9", "Dummy10", "Dummy11", "Dummy12", "Dummy13", "Dummy14", "Dummy15", "Dummy16", "Dummy17", "Dummy18", "Dummy19", "Dummy20", "Dummy21", "Dummy22", "Dummy23", "Dummy24", "Dummy25", "Dummy26", "Dummy27", "Dummy28", "Dummy29", "Dummy30", "Dummy31", "Dummy32", "C" }, null, null, new pb::Extension[] { global::Google.Protobuf.TestProtos.Proto2.TestRequired.Extensions.Single, global::Google.Protobuf.TestProtos.Proto2.TestRequired.Extensions.Multi }, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestRequiredForeign), global::Google.Protobuf.TestProtos.Proto2.TestRequiredForeign.Parser, new[]{ "OptionalMessage", "RepeatedMessage", "Dummy" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestRequiredMessage), global::Google.Protobuf.TestProtos.Proto2.TestRequiredMessage.Parser, new[]{ "OptionalMessage", "RepeatedMessage", "RequiredMessage" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestForeignNested), global::Google.Protobuf.TestProtos.Proto2.TestForeignNested.Parser, new[]{ "ForeignNested" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestEmptyMessage), global::Google.Protobuf.TestProtos.Proto2.TestEmptyMessage.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestEmptyMessageWithExtensions), global::Google.Protobuf.TestProtos.Proto2.TestEmptyMessageWithExtensions.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestMultipleExtensionRanges), global::Google.Protobuf.TestProtos.Proto2.TestMultipleExtensionRanges.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestReallyLargeTagNumber), global::Google.Protobuf.TestProtos.Proto2.TestReallyLargeTagNumber.Parser, new[]{ "A", "Bb" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestRecursiveMessage), global::Google.Protobuf.TestProtos.Proto2.TestRecursiveMessage.Parser, new[]{ "A", "I" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA), global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Parser, new[]{ "Bb", "SubGroup" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubMessage), global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubMessage.Parser, new[]{ "B" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubGroup), global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubGroup.Parser, new[]{ "SubMessage", "NotInThisScc" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionB), global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionB.Parser, new[]{ "A", "OptionalInt32" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized), global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Parser, new[]{ "SubMessage" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage), global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage.Parser, new[]{ "SubGroup" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage.Types.SubGroup), global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage.Types.SubGroup.Parser, new[]{ "I" }, null, null, null, null)})}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber), global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Parser, new[]{ "A", "Foo", "Bar" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Foo), global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Foo.Parser, new[]{ "A" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Bar), global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Bar.Parser, new[]{ "A" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestEagerMessage), global::Google.Protobuf.TestProtos.Proto2.TestEagerMessage.Parser, new[]{ "SubMessage" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestLazyMessage), global::Google.Protobuf.TestProtos.Proto2.TestLazyMessage.Parser, new[]{ "SubMessage" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestNestedMessageHasBits), global::Google.Protobuf.TestProtos.Proto2.TestNestedMessageHasBits.Parser, new[]{ "OptionalNestedMessage" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestNestedMessageHasBits.Types.NestedMessage), global::Google.Protobuf.TestProtos.Proto2.TestNestedMessageHasBits.Types.NestedMessage.Parser, new[]{ "NestedmessageRepeatedInt32", "NestedmessageRepeatedForeignmessage" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestCamelCaseFieldNames), global::Google.Protobuf.TestProtos.Proto2.TestCamelCaseFieldNames.Parser, new[]{ "PrimitiveField", "StringField", "EnumField", "MessageField", "StringPieceField", "CordField", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedEnumField", "RepeatedMessageField", "RepeatedStringPieceField", "RepeatedCordField" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings), global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings.Parser, new[]{ "MyString", "MyInt", "MyFloat", "OptionalNestedMessage" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings.Types.NestedMessage), global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings.Types.NestedMessage.Parser, new[]{ "Oo", "Bb" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings1), global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings1.Parser, new[]{ "MyString" }, null, null, new pb::Extension[] { global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings1.Extensions.TestExtOrderings1 }, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2), global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Parser, new[]{ "MyString" }, null, null, new pb::Extension[] { global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Extensions.TestExtOrderings2 }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Types.TestExtensionOrderings3), global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Types.TestExtensionOrderings3.Parser, new[]{ "MyString" }, null, null, new pb::Extension[] { global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Types.TestExtensionOrderings3.Extensions.TestExtOrderings3 }, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestExtremeDefaultValues), global::Google.Protobuf.TestProtos.Proto2.TestExtremeDefaultValues.Parser, new[]{ "EscapedBytes", "LargeUint32", "LargeUint64", "SmallInt32", "SmallInt64", "ReallySmallInt32", "ReallySmallInt64", "Utf8String", "ZeroFloat", "OneFloat", "SmallFloat", "NegativeOneFloat", "NegativeFloat", "LargeFloat", "SmallNegativeFloat", "InfDouble", "NegInfDouble", "NanDouble", "InfFloat", "NegInfFloat", "NanFloat", "CppTrigraph", "StringWithZero", "BytesWithZero", "StringPieceWithZero", "CordWithZero", "ReplacementString" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.SparseEnumMessage), global::Google.Protobuf.TestProtos.Proto2.SparseEnumMessage.Parser, new[]{ "SparseEnum" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.OneString), global::Google.Protobuf.TestProtos.Proto2.OneString.Parser, new[]{ "Data" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.MoreString), global::Google.Protobuf.TestProtos.Proto2.MoreString.Parser, new[]{ "Data" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.OneBytes), global::Google.Protobuf.TestProtos.Proto2.OneBytes.Parser, new[]{ "Data" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.MoreBytes), global::Google.Protobuf.TestProtos.Proto2.MoreBytes.Parser, new[]{ "Data" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.Int32Message), global::Google.Protobuf.TestProtos.Proto2.Int32Message.Parser, new[]{ "Data" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.Uint32Message), global::Google.Protobuf.TestProtos.Proto2.Uint32Message.Parser, new[]{ "Data" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.Int64Message), global::Google.Protobuf.TestProtos.Proto2.Int64Message.Parser, new[]{ "Data" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.Uint64Message), global::Google.Protobuf.TestProtos.Proto2.Uint64Message.Parser, new[]{ "Data" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.BoolMessage), global::Google.Protobuf.TestProtos.Proto2.BoolMessage.Parser, new[]{ "Data" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestOneof), global::Google.Protobuf.TestProtos.Proto2.TestOneof.Parser, new[]{ "FooInt", "FooString", "FooMessage", "FooGroup" }, new[]{ "Foo" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestOneof.Types.FooGroup), global::Google.Protobuf.TestProtos.Proto2.TestOneof.Types.FooGroup.Parser, new[]{ "A", "B" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestOneofBackwardsCompatible), global::Google.Protobuf.TestProtos.Proto2.TestOneofBackwardsCompatible.Parser, new[]{ "FooInt", "FooString", "FooMessage", "FooGroup" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestOneofBackwardsCompatible.Types.FooGroup), global::Google.Protobuf.TestProtos.Proto2.TestOneofBackwardsCompatible.Types.FooGroup.Parser, new[]{ "A", "B" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestOneof2), global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Parser, new[]{ "FooInt", "FooString", "FooCord", "FooStringPiece", "FooBytes", "FooEnum", "FooMessage", "FooGroup", "FooLazyMessage", "BarInt", "BarString", "BarCord", "BarStringPiece", "BarBytes", "BarEnum", "BazInt", "BazString" }, new[]{ "Foo", "Bar" }, new[]{ typeof(global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedEnum) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.FooGroup), global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.FooGroup.Parser, new[]{ "A", "B" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage), global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage.Parser, new[]{ "QuxInt", "CorgeInt" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestRequiredOneof), global::Google.Protobuf.TestProtos.Proto2.TestRequiredOneof.Parser, new[]{ "FooInt", "FooString", "FooMessage" }, new[]{ "Foo" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestRequiredOneof.Types.NestedMessage), global::Google.Protobuf.TestProtos.Proto2.TestRequiredOneof.Types.NestedMessage.Parser, new[]{ "RequiredDouble" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestPackedTypes), global::Google.Protobuf.TestProtos.Proto2.TestPackedTypes.Parser, new[]{ "PackedInt32", "PackedInt64", "PackedUint32", "PackedUint64", "PackedSint32", "PackedSint64", "PackedFixed32", "PackedFixed64", "PackedSfixed32", "PackedSfixed64", "PackedFloat", "PackedDouble", "PackedBool", "PackedEnum" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestUnpackedTypes), global::Google.Protobuf.TestProtos.Proto2.TestUnpackedTypes.Parser, new[]{ "UnpackedInt32", "UnpackedInt64", "UnpackedUint32", "UnpackedUint64", "UnpackedSint32", "UnpackedSint64", "UnpackedFixed32", "UnpackedFixed64", "UnpackedSfixed32", "UnpackedSfixed64", "UnpackedFloat", "UnpackedDouble", "UnpackedBool", "UnpackedEnum" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions), global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions), global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions), global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Parser, new[]{ "ScalarExtension", "EnumExtension", "DynamicEnumExtension", "MessageExtension", "DynamicMessageExtension", "RepeatedExtension", "PackedExtension" }, null, new[]{ typeof(global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicEnumType) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicMessageType), global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicMessageType.Parser, new[]{ "DynamicField" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestRepeatedScalarDifferentTagSizes), global::Google.Protobuf.TestProtos.Proto2.TestRepeatedScalarDifferentTagSizes.Parser, new[]{ "RepeatedFixed32", "RepeatedInt32", "RepeatedFixed64", "RepeatedInt64", "RepeatedFloat", "RepeatedUint64" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge), global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Parser, new[]{ "RequiredAllTypes", "OptionalAllTypes", "RepeatedAllTypes", "OptionalGroup", "RepeatedGroup" }, null, null, new pb::Extension[] { global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Extensions.OptionalExt, global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Extensions.RepeatedExt }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator), global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Parser, new[]{ "Field1", "Field2", "Field3", "Group1", "Group2", "Ext1", "Ext2" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1), global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1.Parser, new[]{ "Field1" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2), global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2.Parser, new[]{ "Field1" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.OptionalGroup), global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.OptionalGroup.Parser, new[]{ "OptionalGroupAllTypes" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedGroup), global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedGroup.Parser, new[]{ "RepeatedGroupAllTypes" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestCommentInjectionMessage), global::Google.Protobuf.TestProtos.Proto2.TestCommentInjectionMessage.Parser, new[]{ "A" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.FooRequest), global::Google.Protobuf.TestProtos.Proto2.FooRequest.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.FooResponse), global::Google.Protobuf.TestProtos.Proto2.FooResponse.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.FooClientMessage), global::Google.Protobuf.TestProtos.Proto2.FooClientMessage.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.FooServerMessage), global::Google.Protobuf.TestProtos.Proto2.FooServerMessage.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.BarRequest), global::Google.Protobuf.TestProtos.Proto2.BarRequest.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.BarResponse), global::Google.Protobuf.TestProtos.Proto2.BarResponse.Parser, null, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestJsonName), global::Google.Protobuf.TestProtos.Proto2.TestJsonName.Parser, new[]{ "FieldName1", "FieldName2", "FieldName3", "FieldName4", "FIELDNAME5", "FieldName6" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestHugeFieldNumbers), global::Google.Protobuf.TestProtos.Proto2.TestHugeFieldNumbers.Parser, new[]{ "OptionalInt32", "Fixed32", "RepeatedInt32", "PackedInt32", "OptionalEnum", "OptionalString", "OptionalBytes", "OptionalMessage", "OptionalGroup", "StringStringMap", "OneofUint32", "OneofTestAllTypes", "OneofString", "OneofBytes" }, new[]{ "OneofField" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestHugeFieldNumbers.Types.OptionalGroup), global::Google.Protobuf.TestProtos.Proto2.TestHugeFieldNumbers.Types.OptionalGroup.Parser, new[]{ "GroupA" }, null, null, null, null),
+ null, }),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestExtensionInsideTable), global::Google.Protobuf.TestProtos.Proto2.TestExtensionInsideTable.Parser, new[]{ "Field1", "Field2", "Field3", "Field4", "Field6", "Field7", "Field8", "Field9", "Field10" }, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ /// <summary>Holder for extension identifiers generated from the top level of unittest.proto</summary>
+ public static partial class UnittestExtensions {
+ /// <summary>
+ /// Singular
+ /// </summary>
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int> OptionalInt32Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(1, pb::FieldCodec.ForInt32(8, 0));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long> OptionalInt64Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(2, pb::FieldCodec.ForInt64(16, 0L));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint> OptionalUint32Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint>(3, pb::FieldCodec.ForUInt32(24, 0));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong> OptionalUint64Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong>(4, pb::FieldCodec.ForUInt64(32, 0UL));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int> OptionalSint32Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(5, pb::FieldCodec.ForSInt32(40, 0));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long> OptionalSint64Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(6, pb::FieldCodec.ForSInt64(48, 0L));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint> OptionalFixed32Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint>(7, pb::FieldCodec.ForFixed32(61, 0));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong> OptionalFixed64Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong>(8, pb::FieldCodec.ForFixed64(65, 0UL));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int> OptionalSfixed32Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(9, pb::FieldCodec.ForSFixed32(77, 0));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long> OptionalSfixed64Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(10, pb::FieldCodec.ForSFixed64(81, 0L));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, float> OptionalFloatExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, float>(11, pb::FieldCodec.ForFloat(93, 0F));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, double> OptionalDoubleExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, double>(12, pb::FieldCodec.ForDouble(97, 0D));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, bool> OptionalBoolExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, bool>(13, pb::FieldCodec.ForBool(104, false));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> OptionalStringExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(14, pb::FieldCodec.ForString(114, ""));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, pb::ByteString> OptionalBytesExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, pb::ByteString>(15, pb::FieldCodec.ForBytes(122, pb::ByteString.Empty));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.OptionalGroup_extension> OptionalGroupExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.OptionalGroup_extension>(16, pb::FieldCodec.ForGroup(131, 132, global::Google.Protobuf.TestProtos.Proto2.OptionalGroup_extension.Parser));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage> OptionalNestedMessageExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage>(18, pb::FieldCodec.ForMessage(146, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage> OptionalForeignMessageExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage>(19, pb::FieldCodec.ForMessage(154, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage.Parser));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ImportMessage> OptionalImportMessageExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ImportMessage>(20, pb::FieldCodec.ForMessage(162, global::Google.Protobuf.TestProtos.Proto2.ImportMessage.Parser));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum> OptionalNestedEnumExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum>(21, pb::FieldCodec.ForEnum(168, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum) x, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum.Foo));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> OptionalForeignEnumExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum>(22, pb::FieldCodec.ForEnum(176, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum.ForeignFoo));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ImportEnum> OptionalImportEnumExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ImportEnum>(23, pb::FieldCodec.ForEnum(184, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ImportEnum) x, global::Google.Protobuf.TestProtos.Proto2.ImportEnum.ImportFoo));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> OptionalStringPieceExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(24, pb::FieldCodec.ForString(194, ""));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> OptionalCordExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(25, pb::FieldCodec.ForString(202, ""));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage> OptionalPublicImportMessageExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage>(26, pb::FieldCodec.ForMessage(210, global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage.Parser));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage> OptionalLazyMessageExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage>(27, pb::FieldCodec.ForMessage(218, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser));
+ /// <summary>
+ /// Repeated
+ /// </summary>
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int> RepeatedInt32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(31, pb::FieldCodec.ForInt32(248));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long> RepeatedInt64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(32, pb::FieldCodec.ForInt64(256));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint> RepeatedUint32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint>(33, pb::FieldCodec.ForUInt32(264));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong> RepeatedUint64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong>(34, pb::FieldCodec.ForUInt64(272));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int> RepeatedSint32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(35, pb::FieldCodec.ForSInt32(280));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long> RepeatedSint64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(36, pb::FieldCodec.ForSInt64(288));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint> RepeatedFixed32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint>(37, pb::FieldCodec.ForFixed32(301));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong> RepeatedFixed64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong>(38, pb::FieldCodec.ForFixed64(305));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int> RepeatedSfixed32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(39, pb::FieldCodec.ForSFixed32(317));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long> RepeatedSfixed64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(40, pb::FieldCodec.ForSFixed64(321));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, float> RepeatedFloatExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, float>(41, pb::FieldCodec.ForFloat(333));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, double> RepeatedDoubleExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, double>(42, pb::FieldCodec.ForDouble(337));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, bool> RepeatedBoolExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, bool>(43, pb::FieldCodec.ForBool(344));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> RepeatedStringExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(44, pb::FieldCodec.ForString(354));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, pb::ByteString> RepeatedBytesExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, pb::ByteString>(45, pb::FieldCodec.ForBytes(362));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.RepeatedGroup_extension> RepeatedGroupExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.RepeatedGroup_extension>(46, pb::FieldCodec.ForGroup(371, 372, global::Google.Protobuf.TestProtos.Proto2.RepeatedGroup_extension.Parser));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage> RepeatedNestedMessageExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage>(48, pb::FieldCodec.ForMessage(386, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage> RepeatedForeignMessageExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage>(49, pb::FieldCodec.ForMessage(394, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage.Parser));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ImportMessage> RepeatedImportMessageExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ImportMessage>(50, pb::FieldCodec.ForMessage(402, global::Google.Protobuf.TestProtos.Proto2.ImportMessage.Parser));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum> RepeatedNestedEnumExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum>(51, pb::FieldCodec.ForEnum(408, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum) x));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> RepeatedForeignEnumExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum>(52, pb::FieldCodec.ForEnum(416, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ImportEnum> RepeatedImportEnumExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ImportEnum>(53, pb::FieldCodec.ForEnum(424, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ImportEnum) x));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> RepeatedStringPieceExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(54, pb::FieldCodec.ForString(434));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> RepeatedCordExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(55, pb::FieldCodec.ForString(442));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage> RepeatedLazyMessageExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage>(57, pb::FieldCodec.ForMessage(458, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser));
+ /// <summary>
+ /// Singular with defaults
+ /// </summary>
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int> DefaultInt32Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(61, pb::FieldCodec.ForInt32(488, 41));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long> DefaultInt64Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(62, pb::FieldCodec.ForInt64(496, 42L));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint> DefaultUint32Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint>(63, pb::FieldCodec.ForUInt32(504, 43));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong> DefaultUint64Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong>(64, pb::FieldCodec.ForUInt64(512, 44UL));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int> DefaultSint32Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(65, pb::FieldCodec.ForSInt32(520, -45));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long> DefaultSint64Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(66, pb::FieldCodec.ForSInt64(528, 46L));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint> DefaultFixed32Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint>(67, pb::FieldCodec.ForFixed32(541, 47));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong> DefaultFixed64Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong>(68, pb::FieldCodec.ForFixed64(545, 48UL));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int> DefaultSfixed32Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(69, pb::FieldCodec.ForSFixed32(557, 49));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long> DefaultSfixed64Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(70, pb::FieldCodec.ForSFixed64(561, -50L));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, float> DefaultFloatExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, float>(71, pb::FieldCodec.ForFloat(573, 51.5F));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, double> DefaultDoubleExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, double>(72, pb::FieldCodec.ForDouble(577, 52000D));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, bool> DefaultBoolExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, bool>(73, pb::FieldCodec.ForBool(584, true));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> DefaultStringExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(74, pb::FieldCodec.ForString(594, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +aGVsbG8= +"))));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, pb::ByteString> DefaultBytesExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, pb::ByteString>(75, pb::FieldCodec.ForBytes(602, pb::ByteString.FromBase64("d29ybGQ=")));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum> DefaultNestedEnumExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum>(81, pb::FieldCodec.ForEnum(648, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum) x, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum.Bar));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> DefaultForeignEnumExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum>(82, pb::FieldCodec.ForEnum(656, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum.ForeignBar));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ImportEnum> DefaultImportEnumExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.ImportEnum>(83, pb::FieldCodec.ForEnum(664, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ImportEnum) x, global::Google.Protobuf.TestProtos.Proto2.ImportEnum.ImportBar));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> DefaultStringPieceExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(84, pb::FieldCodec.ForString(674, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +YWJj +"))));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> DefaultCordExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(85, pb::FieldCodec.ForString(682, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +MTIz +"))));
+ /// <summary>
+ /// For oneof test
+ /// </summary>
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint> OneofUint32Extension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint>(111, pb::FieldCodec.ForUInt32(888, 0));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage> OneofNestedMessageExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage>(112, pb::FieldCodec.ForMessage(898, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> OneofStringExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(113, pb::FieldCodec.ForString(906, ""));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, pb::ByteString> OneofBytesExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, pb::ByteString>(114, pb::FieldCodec.ForBytes(914, pb::ByteString.Empty));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings, string> MyExtensionString =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings, string>(50, pb::FieldCodec.ForString(402, ""));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings, int> MyExtensionInt =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings, int>(5, pb::FieldCodec.ForInt32(40, 0));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, int> PackedInt32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, int>(90, pb::FieldCodec.ForInt32(722));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, long> PackedInt64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, long>(91, pb::FieldCodec.ForInt64(730));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, uint> PackedUint32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, uint>(92, pb::FieldCodec.ForUInt32(738));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, ulong> PackedUint64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, ulong>(93, pb::FieldCodec.ForUInt64(746));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, int> PackedSint32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, int>(94, pb::FieldCodec.ForSInt32(754));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, long> PackedSint64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, long>(95, pb::FieldCodec.ForSInt64(762));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, uint> PackedFixed32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, uint>(96, pb::FieldCodec.ForFixed32(770));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, ulong> PackedFixed64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, ulong>(97, pb::FieldCodec.ForFixed64(778));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, int> PackedSfixed32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, int>(98, pb::FieldCodec.ForSFixed32(786));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, long> PackedSfixed64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, long>(99, pb::FieldCodec.ForSFixed64(794));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, float> PackedFloatExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, float>(100, pb::FieldCodec.ForFloat(802));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, double> PackedDoubleExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, double>(101, pb::FieldCodec.ForDouble(810));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, bool> PackedBoolExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, bool>(102, pb::FieldCodec.ForBool(818));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> PackedEnumExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestPackedExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum>(103, pb::FieldCodec.ForEnum(826, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, int> UnpackedInt32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, int>(90, pb::FieldCodec.ForInt32(720));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, long> UnpackedInt64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, long>(91, pb::FieldCodec.ForInt64(728));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, uint> UnpackedUint32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, uint>(92, pb::FieldCodec.ForUInt32(736));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, ulong> UnpackedUint64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, ulong>(93, pb::FieldCodec.ForUInt64(744));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, int> UnpackedSint32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, int>(94, pb::FieldCodec.ForSInt32(752));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, long> UnpackedSint64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, long>(95, pb::FieldCodec.ForSInt64(760));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, uint> UnpackedFixed32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, uint>(96, pb::FieldCodec.ForFixed32(773));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, ulong> UnpackedFixed64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, ulong>(97, pb::FieldCodec.ForFixed64(777));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, int> UnpackedSfixed32Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, int>(98, pb::FieldCodec.ForSFixed32(789));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, long> UnpackedSfixed64Extension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, long>(99, pb::FieldCodec.ForSFixed64(793));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, float> UnpackedFloatExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, float>(100, pb::FieldCodec.ForFloat(805));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, double> UnpackedDoubleExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, double>(101, pb::FieldCodec.ForDouble(809));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, bool> UnpackedBoolExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, bool>(102, pb::FieldCodec.ForBool(816));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> UnpackedEnumExtension =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestUnpackedExtensions, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum>(103, pb::FieldCodec.ForEnum(824, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestHugeFieldNumbers, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> TestAllTypes =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestHugeFieldNumbers, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes>(536860000, pb::FieldCodec.ForMessage(4294880002, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestExtensionInsideTable, int> TestExtensionInsideTableExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestExtensionInsideTable, int>(5, pb::FieldCodec.ForInt32(40, 0));
+ }
+
+ #region Enums
+ public enum ForeignEnum {
+ [pbr::OriginalName("FOREIGN_FOO")] ForeignFoo = 4,
+ [pbr::OriginalName("FOREIGN_BAR")] ForeignBar = 5,
+ [pbr::OriginalName("FOREIGN_BAZ")] ForeignBaz = 6,
+ }
+
+ /// <summary>
+ /// Test an enum that has multiple values with the same number.
+ /// </summary>
+ public enum TestEnumWithDupValue {
+ [pbr::OriginalName("FOO1")] Foo1 = 1,
+ [pbr::OriginalName("BAR1")] Bar1 = 2,
+ [pbr::OriginalName("BAZ")] Baz = 3,
+ [pbr::OriginalName("FOO2", PreferredAlias = false)] Foo2 = 1,
+ [pbr::OriginalName("BAR2", PreferredAlias = false)] Bar2 = 2,
+ }
+
+ /// <summary>
+ /// Test an enum with large, unordered values.
+ /// </summary>
+ public enum TestSparseEnum {
+ [pbr::OriginalName("SPARSE_A")] SparseA = 123,
+ [pbr::OriginalName("SPARSE_B")] SparseB = 62374,
+ [pbr::OriginalName("SPARSE_C")] SparseC = 12589234,
+ [pbr::OriginalName("SPARSE_D")] SparseD = -15,
+ [pbr::OriginalName("SPARSE_E")] SparseE = -53452,
+ [pbr::OriginalName("SPARSE_F")] SparseF = 0,
+ [pbr::OriginalName("SPARSE_G")] SparseG = 2,
+ }
+
+ public enum VeryLargeEnum {
+ [pbr::OriginalName("ENUM_LABEL_DEFAULT")] EnumLabelDefault = 0,
+ [pbr::OriginalName("ENUM_LABEL_1")] EnumLabel1 = 1,
+ [pbr::OriginalName("ENUM_LABEL_2")] EnumLabel2 = 2,
+ [pbr::OriginalName("ENUM_LABEL_3")] EnumLabel3 = 3,
+ [pbr::OriginalName("ENUM_LABEL_4")] EnumLabel4 = 4,
+ [pbr::OriginalName("ENUM_LABEL_5")] EnumLabel5 = 5,
+ [pbr::OriginalName("ENUM_LABEL_6")] EnumLabel6 = 6,
+ [pbr::OriginalName("ENUM_LABEL_7")] EnumLabel7 = 7,
+ [pbr::OriginalName("ENUM_LABEL_8")] EnumLabel8 = 8,
+ [pbr::OriginalName("ENUM_LABEL_9")] EnumLabel9 = 9,
+ [pbr::OriginalName("ENUM_LABEL_10")] EnumLabel10 = 10,
+ [pbr::OriginalName("ENUM_LABEL_11")] EnumLabel11 = 11,
+ [pbr::OriginalName("ENUM_LABEL_12")] EnumLabel12 = 12,
+ [pbr::OriginalName("ENUM_LABEL_13")] EnumLabel13 = 13,
+ [pbr::OriginalName("ENUM_LABEL_14")] EnumLabel14 = 14,
+ [pbr::OriginalName("ENUM_LABEL_15")] EnumLabel15 = 15,
+ [pbr::OriginalName("ENUM_LABEL_16")] EnumLabel16 = 16,
+ [pbr::OriginalName("ENUM_LABEL_17")] EnumLabel17 = 17,
+ [pbr::OriginalName("ENUM_LABEL_18")] EnumLabel18 = 18,
+ [pbr::OriginalName("ENUM_LABEL_19")] EnumLabel19 = 19,
+ [pbr::OriginalName("ENUM_LABEL_20")] EnumLabel20 = 20,
+ [pbr::OriginalName("ENUM_LABEL_21")] EnumLabel21 = 21,
+ [pbr::OriginalName("ENUM_LABEL_22")] EnumLabel22 = 22,
+ [pbr::OriginalName("ENUM_LABEL_23")] EnumLabel23 = 23,
+ [pbr::OriginalName("ENUM_LABEL_24")] EnumLabel24 = 24,
+ [pbr::OriginalName("ENUM_LABEL_25")] EnumLabel25 = 25,
+ [pbr::OriginalName("ENUM_LABEL_26")] EnumLabel26 = 26,
+ [pbr::OriginalName("ENUM_LABEL_27")] EnumLabel27 = 27,
+ [pbr::OriginalName("ENUM_LABEL_28")] EnumLabel28 = 28,
+ [pbr::OriginalName("ENUM_LABEL_29")] EnumLabel29 = 29,
+ [pbr::OriginalName("ENUM_LABEL_30")] EnumLabel30 = 30,
+ [pbr::OriginalName("ENUM_LABEL_31")] EnumLabel31 = 31,
+ [pbr::OriginalName("ENUM_LABEL_32")] EnumLabel32 = 32,
+ [pbr::OriginalName("ENUM_LABEL_33")] EnumLabel33 = 33,
+ [pbr::OriginalName("ENUM_LABEL_34")] EnumLabel34 = 34,
+ [pbr::OriginalName("ENUM_LABEL_35")] EnumLabel35 = 35,
+ [pbr::OriginalName("ENUM_LABEL_36")] EnumLabel36 = 36,
+ [pbr::OriginalName("ENUM_LABEL_37")] EnumLabel37 = 37,
+ [pbr::OriginalName("ENUM_LABEL_38")] EnumLabel38 = 38,
+ [pbr::OriginalName("ENUM_LABEL_39")] EnumLabel39 = 39,
+ [pbr::OriginalName("ENUM_LABEL_40")] EnumLabel40 = 40,
+ [pbr::OriginalName("ENUM_LABEL_41")] EnumLabel41 = 41,
+ [pbr::OriginalName("ENUM_LABEL_42")] EnumLabel42 = 42,
+ [pbr::OriginalName("ENUM_LABEL_43")] EnumLabel43 = 43,
+ [pbr::OriginalName("ENUM_LABEL_44")] EnumLabel44 = 44,
+ [pbr::OriginalName("ENUM_LABEL_45")] EnumLabel45 = 45,
+ [pbr::OriginalName("ENUM_LABEL_46")] EnumLabel46 = 46,
+ [pbr::OriginalName("ENUM_LABEL_47")] EnumLabel47 = 47,
+ [pbr::OriginalName("ENUM_LABEL_48")] EnumLabel48 = 48,
+ [pbr::OriginalName("ENUM_LABEL_49")] EnumLabel49 = 49,
+ [pbr::OriginalName("ENUM_LABEL_50")] EnumLabel50 = 50,
+ [pbr::OriginalName("ENUM_LABEL_51")] EnumLabel51 = 51,
+ [pbr::OriginalName("ENUM_LABEL_52")] EnumLabel52 = 52,
+ [pbr::OriginalName("ENUM_LABEL_53")] EnumLabel53 = 53,
+ [pbr::OriginalName("ENUM_LABEL_54")] EnumLabel54 = 54,
+ [pbr::OriginalName("ENUM_LABEL_55")] EnumLabel55 = 55,
+ [pbr::OriginalName("ENUM_LABEL_56")] EnumLabel56 = 56,
+ [pbr::OriginalName("ENUM_LABEL_57")] EnumLabel57 = 57,
+ [pbr::OriginalName("ENUM_LABEL_58")] EnumLabel58 = 58,
+ [pbr::OriginalName("ENUM_LABEL_59")] EnumLabel59 = 59,
+ [pbr::OriginalName("ENUM_LABEL_60")] EnumLabel60 = 60,
+ [pbr::OriginalName("ENUM_LABEL_61")] EnumLabel61 = 61,
+ [pbr::OriginalName("ENUM_LABEL_62")] EnumLabel62 = 62,
+ [pbr::OriginalName("ENUM_LABEL_63")] EnumLabel63 = 63,
+ [pbr::OriginalName("ENUM_LABEL_64")] EnumLabel64 = 64,
+ [pbr::OriginalName("ENUM_LABEL_65")] EnumLabel65 = 65,
+ [pbr::OriginalName("ENUM_LABEL_66")] EnumLabel66 = 66,
+ [pbr::OriginalName("ENUM_LABEL_67")] EnumLabel67 = 67,
+ [pbr::OriginalName("ENUM_LABEL_68")] EnumLabel68 = 68,
+ [pbr::OriginalName("ENUM_LABEL_69")] EnumLabel69 = 69,
+ [pbr::OriginalName("ENUM_LABEL_70")] EnumLabel70 = 70,
+ [pbr::OriginalName("ENUM_LABEL_71")] EnumLabel71 = 71,
+ [pbr::OriginalName("ENUM_LABEL_72")] EnumLabel72 = 72,
+ [pbr::OriginalName("ENUM_LABEL_73")] EnumLabel73 = 73,
+ [pbr::OriginalName("ENUM_LABEL_74")] EnumLabel74 = 74,
+ [pbr::OriginalName("ENUM_LABEL_75")] EnumLabel75 = 75,
+ [pbr::OriginalName("ENUM_LABEL_76")] EnumLabel76 = 76,
+ [pbr::OriginalName("ENUM_LABEL_77")] EnumLabel77 = 77,
+ [pbr::OriginalName("ENUM_LABEL_78")] EnumLabel78 = 78,
+ [pbr::OriginalName("ENUM_LABEL_79")] EnumLabel79 = 79,
+ [pbr::OriginalName("ENUM_LABEL_80")] EnumLabel80 = 80,
+ [pbr::OriginalName("ENUM_LABEL_81")] EnumLabel81 = 81,
+ [pbr::OriginalName("ENUM_LABEL_82")] EnumLabel82 = 82,
+ [pbr::OriginalName("ENUM_LABEL_83")] EnumLabel83 = 83,
+ [pbr::OriginalName("ENUM_LABEL_84")] EnumLabel84 = 84,
+ [pbr::OriginalName("ENUM_LABEL_85")] EnumLabel85 = 85,
+ [pbr::OriginalName("ENUM_LABEL_86")] EnumLabel86 = 86,
+ [pbr::OriginalName("ENUM_LABEL_87")] EnumLabel87 = 87,
+ [pbr::OriginalName("ENUM_LABEL_88")] EnumLabel88 = 88,
+ [pbr::OriginalName("ENUM_LABEL_89")] EnumLabel89 = 89,
+ [pbr::OriginalName("ENUM_LABEL_90")] EnumLabel90 = 90,
+ [pbr::OriginalName("ENUM_LABEL_91")] EnumLabel91 = 91,
+ [pbr::OriginalName("ENUM_LABEL_92")] EnumLabel92 = 92,
+ [pbr::OriginalName("ENUM_LABEL_93")] EnumLabel93 = 93,
+ [pbr::OriginalName("ENUM_LABEL_94")] EnumLabel94 = 94,
+ [pbr::OriginalName("ENUM_LABEL_95")] EnumLabel95 = 95,
+ [pbr::OriginalName("ENUM_LABEL_96")] EnumLabel96 = 96,
+ [pbr::OriginalName("ENUM_LABEL_97")] EnumLabel97 = 97,
+ [pbr::OriginalName("ENUM_LABEL_98")] EnumLabel98 = 98,
+ [pbr::OriginalName("ENUM_LABEL_99")] EnumLabel99 = 99,
+ [pbr::OriginalName("ENUM_LABEL_100")] EnumLabel100 = 100,
+ }
+
+ #endregion
+
+ #region Messages
+ /// <summary>
+ /// This proto includes every type of field in both singular and repeated
+ /// forms.
+ /// </summary>
+ public sealed partial class TestAllTypes : pb::IMessage<TestAllTypes> {
+ private static readonly pb::MessageParser<TestAllTypes> _parser = new pb::MessageParser<TestAllTypes>(() => new TestAllTypes());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ private int _hasBits1;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestAllTypes> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestAllTypes() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestAllTypes(TestAllTypes other) : this() {
+ _hasBits0 = other._hasBits0;
+ _hasBits1 = other._hasBits1;
+ optionalInt32_ = other.optionalInt32_;
+ optionalInt64_ = other.optionalInt64_;
+ optionalUint32_ = other.optionalUint32_;
+ optionalUint64_ = other.optionalUint64_;
+ optionalSint32_ = other.optionalSint32_;
+ optionalSint64_ = other.optionalSint64_;
+ optionalFixed32_ = other.optionalFixed32_;
+ optionalFixed64_ = other.optionalFixed64_;
+ optionalSfixed32_ = other.optionalSfixed32_;
+ optionalSfixed64_ = other.optionalSfixed64_;
+ optionalFloat_ = other.optionalFloat_;
+ optionalDouble_ = other.optionalDouble_;
+ optionalBool_ = other.optionalBool_;
+ optionalString_ = other.optionalString_;
+ optionalBytes_ = other.optionalBytes_;
+ optionalGroup_ = other.HasOptionalGroup ? other.optionalGroup_.Clone() : null;
+ optionalNestedMessage_ = other.HasOptionalNestedMessage ? other.optionalNestedMessage_.Clone() : null;
+ optionalForeignMessage_ = other.HasOptionalForeignMessage ? other.optionalForeignMessage_.Clone() : null;
+ optionalImportMessage_ = other.HasOptionalImportMessage ? other.optionalImportMessage_.Clone() : null;
+ optionalNestedEnum_ = other.optionalNestedEnum_;
+ optionalForeignEnum_ = other.optionalForeignEnum_;
+ optionalImportEnum_ = other.optionalImportEnum_;
+ optionalStringPiece_ = other.optionalStringPiece_;
+ optionalCord_ = other.optionalCord_;
+ optionalPublicImportMessage_ = other.HasOptionalPublicImportMessage ? other.optionalPublicImportMessage_.Clone() : null;
+ optionalLazyMessage_ = other.HasOptionalLazyMessage ? other.optionalLazyMessage_.Clone() : null;
+ repeatedInt32_ = other.repeatedInt32_.Clone();
+ repeatedInt64_ = other.repeatedInt64_.Clone();
+ repeatedUint32_ = other.repeatedUint32_.Clone();
+ repeatedUint64_ = other.repeatedUint64_.Clone();
+ repeatedSint32_ = other.repeatedSint32_.Clone();
+ repeatedSint64_ = other.repeatedSint64_.Clone();
+ repeatedFixed32_ = other.repeatedFixed32_.Clone();
+ repeatedFixed64_ = other.repeatedFixed64_.Clone();
+ repeatedSfixed32_ = other.repeatedSfixed32_.Clone();
+ repeatedSfixed64_ = other.repeatedSfixed64_.Clone();
+ repeatedFloat_ = other.repeatedFloat_.Clone();
+ repeatedDouble_ = other.repeatedDouble_.Clone();
+ repeatedBool_ = other.repeatedBool_.Clone();
+ repeatedString_ = other.repeatedString_.Clone();
+ repeatedBytes_ = other.repeatedBytes_.Clone();
+ repeatedGroup_ = other.repeatedGroup_.Clone();
+ repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone();
+ repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone();
+ repeatedImportMessage_ = other.repeatedImportMessage_.Clone();
+ repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone();
+ repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone();
+ repeatedImportEnum_ = other.repeatedImportEnum_.Clone();
+ repeatedStringPiece_ = other.repeatedStringPiece_.Clone();
+ repeatedCord_ = other.repeatedCord_.Clone();
+ repeatedLazyMessage_ = other.repeatedLazyMessage_.Clone();
+ defaultInt32_ = other.defaultInt32_;
+ defaultInt64_ = other.defaultInt64_;
+ defaultUint32_ = other.defaultUint32_;
+ defaultUint64_ = other.defaultUint64_;
+ defaultSint32_ = other.defaultSint32_;
+ defaultSint64_ = other.defaultSint64_;
+ defaultFixed32_ = other.defaultFixed32_;
+ defaultFixed64_ = other.defaultFixed64_;
+ defaultSfixed32_ = other.defaultSfixed32_;
+ defaultSfixed64_ = other.defaultSfixed64_;
+ defaultFloat_ = other.defaultFloat_;
+ defaultDouble_ = other.defaultDouble_;
+ defaultBool_ = other.defaultBool_;
+ defaultString_ = other.defaultString_;
+ defaultBytes_ = other.defaultBytes_;
+ defaultNestedEnum_ = other.defaultNestedEnum_;
+ defaultForeignEnum_ = other.defaultForeignEnum_;
+ defaultImportEnum_ = other.defaultImportEnum_;
+ defaultStringPiece_ = other.defaultStringPiece_;
+ defaultCord_ = other.defaultCord_;
+ switch (other.OneofFieldCase) {
+ case OneofFieldOneofCase.OneofUint32:
+ OneofUint32 = other.OneofUint32;
+ break;
+ case OneofFieldOneofCase.OneofNestedMessage:
+ OneofNestedMessage = other.OneofNestedMessage.Clone();
+ break;
+ case OneofFieldOneofCase.OneofString:
+ OneofString = other.OneofString;
+ break;
+ case OneofFieldOneofCase.OneofBytes:
+ OneofBytes = other.OneofBytes;
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestAllTypes Clone() {
+ return new TestAllTypes(this);
+ }
+
+ /// <summary>Field number for the "optional_int32" field.</summary>
+ public const int OptionalInt32FieldNumber = 1;
+ private readonly static int OptionalInt32DefaultValue = 0;
+
+ private int optionalInt32_;
+ /// <summary>
+ /// Singular
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OptionalInt32 {
+ get { if ((_hasBits0 & 1) != 0) { return optionalInt32_; } else { return OptionalInt32DefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ optionalInt32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_int32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalInt32 {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_int32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalInt32() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "optional_int64" field.</summary>
+ public const int OptionalInt64FieldNumber = 2;
+ private readonly static long OptionalInt64DefaultValue = 0L;
+
+ private long optionalInt64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long OptionalInt64 {
+ get { if ((_hasBits0 & 2) != 0) { return optionalInt64_; } else { return OptionalInt64DefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ optionalInt64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_int64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalInt64 {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_int64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalInt64() {
+ _hasBits0 &= ~2;
+ }
+
+ /// <summary>Field number for the "optional_uint32" field.</summary>
+ public const int OptionalUint32FieldNumber = 3;
+ private readonly static uint OptionalUint32DefaultValue = 0;
+
+ private uint optionalUint32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint OptionalUint32 {
+ get { if ((_hasBits0 & 4) != 0) { return optionalUint32_; } else { return OptionalUint32DefaultValue; } }
+ set {
+ _hasBits0 |= 4;
+ optionalUint32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_uint32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalUint32 {
+ get { return (_hasBits0 & 4) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_uint32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalUint32() {
+ _hasBits0 &= ~4;
+ }
+
+ /// <summary>Field number for the "optional_uint64" field.</summary>
+ public const int OptionalUint64FieldNumber = 4;
+ private readonly static ulong OptionalUint64DefaultValue = 0UL;
+
+ private ulong optionalUint64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ulong OptionalUint64 {
+ get { if ((_hasBits0 & 8) != 0) { return optionalUint64_; } else { return OptionalUint64DefaultValue; } }
+ set {
+ _hasBits0 |= 8;
+ optionalUint64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_uint64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalUint64 {
+ get { return (_hasBits0 & 8) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_uint64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalUint64() {
+ _hasBits0 &= ~8;
+ }
+
+ /// <summary>Field number for the "optional_sint32" field.</summary>
+ public const int OptionalSint32FieldNumber = 5;
+ private readonly static int OptionalSint32DefaultValue = 0;
+
+ private int optionalSint32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OptionalSint32 {
+ get { if ((_hasBits0 & 16) != 0) { return optionalSint32_; } else { return OptionalSint32DefaultValue; } }
+ set {
+ _hasBits0 |= 16;
+ optionalSint32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_sint32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalSint32 {
+ get { return (_hasBits0 & 16) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_sint32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalSint32() {
+ _hasBits0 &= ~16;
+ }
+
+ /// <summary>Field number for the "optional_sint64" field.</summary>
+ public const int OptionalSint64FieldNumber = 6;
+ private readonly static long OptionalSint64DefaultValue = 0L;
+
+ private long optionalSint64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long OptionalSint64 {
+ get { if ((_hasBits0 & 32) != 0) { return optionalSint64_; } else { return OptionalSint64DefaultValue; } }
+ set {
+ _hasBits0 |= 32;
+ optionalSint64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_sint64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalSint64 {
+ get { return (_hasBits0 & 32) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_sint64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalSint64() {
+ _hasBits0 &= ~32;
+ }
+
+ /// <summary>Field number for the "optional_fixed32" field.</summary>
+ public const int OptionalFixed32FieldNumber = 7;
+ private readonly static uint OptionalFixed32DefaultValue = 0;
+
+ private uint optionalFixed32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint OptionalFixed32 {
+ get { if ((_hasBits0 & 64) != 0) { return optionalFixed32_; } else { return OptionalFixed32DefaultValue; } }
+ set {
+ _hasBits0 |= 64;
+ optionalFixed32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_fixed32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalFixed32 {
+ get { return (_hasBits0 & 64) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_fixed32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalFixed32() {
+ _hasBits0 &= ~64;
+ }
+
+ /// <summary>Field number for the "optional_fixed64" field.</summary>
+ public const int OptionalFixed64FieldNumber = 8;
+ private readonly static ulong OptionalFixed64DefaultValue = 0UL;
+
+ private ulong optionalFixed64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ulong OptionalFixed64 {
+ get { if ((_hasBits0 & 128) != 0) { return optionalFixed64_; } else { return OptionalFixed64DefaultValue; } }
+ set {
+ _hasBits0 |= 128;
+ optionalFixed64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_fixed64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalFixed64 {
+ get { return (_hasBits0 & 128) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_fixed64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalFixed64() {
+ _hasBits0 &= ~128;
+ }
+
+ /// <summary>Field number for the "optional_sfixed32" field.</summary>
+ public const int OptionalSfixed32FieldNumber = 9;
+ private readonly static int OptionalSfixed32DefaultValue = 0;
+
+ private int optionalSfixed32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OptionalSfixed32 {
+ get { if ((_hasBits0 & 256) != 0) { return optionalSfixed32_; } else { return OptionalSfixed32DefaultValue; } }
+ set {
+ _hasBits0 |= 256;
+ optionalSfixed32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_sfixed32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalSfixed32 {
+ get { return (_hasBits0 & 256) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_sfixed32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalSfixed32() {
+ _hasBits0 &= ~256;
+ }
+
+ /// <summary>Field number for the "optional_sfixed64" field.</summary>
+ public const int OptionalSfixed64FieldNumber = 10;
+ private readonly static long OptionalSfixed64DefaultValue = 0L;
+
+ private long optionalSfixed64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long OptionalSfixed64 {
+ get { if ((_hasBits0 & 512) != 0) { return optionalSfixed64_; } else { return OptionalSfixed64DefaultValue; } }
+ set {
+ _hasBits0 |= 512;
+ optionalSfixed64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_sfixed64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalSfixed64 {
+ get { return (_hasBits0 & 512) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_sfixed64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalSfixed64() {
+ _hasBits0 &= ~512;
+ }
+
+ /// <summary>Field number for the "optional_float" field.</summary>
+ public const int OptionalFloatFieldNumber = 11;
+ private readonly static float OptionalFloatDefaultValue = 0F;
+
+ private float optionalFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float OptionalFloat {
+ get { if ((_hasBits0 & 1024) != 0) { return optionalFloat_; } else { return OptionalFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 1024;
+ optionalFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalFloat {
+ get { return (_hasBits0 & 1024) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalFloat() {
+ _hasBits0 &= ~1024;
+ }
+
+ /// <summary>Field number for the "optional_double" field.</summary>
+ public const int OptionalDoubleFieldNumber = 12;
+ private readonly static double OptionalDoubleDefaultValue = 0D;
+
+ private double optionalDouble_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double OptionalDouble {
+ get { if ((_hasBits0 & 2048) != 0) { return optionalDouble_; } else { return OptionalDoubleDefaultValue; } }
+ set {
+ _hasBits0 |= 2048;
+ optionalDouble_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_double" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalDouble {
+ get { return (_hasBits0 & 2048) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_double" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalDouble() {
+ _hasBits0 &= ~2048;
+ }
+
+ /// <summary>Field number for the "optional_bool" field.</summary>
+ public const int OptionalBoolFieldNumber = 13;
+ private readonly static bool OptionalBoolDefaultValue = false;
+
+ private bool optionalBool_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool OptionalBool {
+ get { if ((_hasBits0 & 4096) != 0) { return optionalBool_; } else { return OptionalBoolDefaultValue; } }
+ set {
+ _hasBits0 |= 4096;
+ optionalBool_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_bool" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalBool {
+ get { return (_hasBits0 & 4096) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_bool" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalBool() {
+ _hasBits0 &= ~4096;
+ }
+
+ /// <summary>Field number for the "optional_string" field.</summary>
+ public const int OptionalStringFieldNumber = 14;
+ private readonly static string OptionalStringDefaultValue = "";
+
+ private string optionalString_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string OptionalString {
+ get { return optionalString_ ?? OptionalStringDefaultValue; }
+ set {
+ optionalString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "optional_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalString {
+ get { return optionalString_ != null; }
+ }
+ /// <summary>Clears the value of the "optional_string" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalString() {
+ optionalString_ = null;
+ }
+
+ /// <summary>Field number for the "optional_bytes" field.</summary>
+ public const int OptionalBytesFieldNumber = 15;
+ private readonly static pb::ByteString OptionalBytesDefaultValue = pb::ByteString.Empty;
+
+ private pb::ByteString optionalBytes_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString OptionalBytes {
+ get { return optionalBytes_ ?? OptionalBytesDefaultValue; }
+ set {
+ optionalBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "optional_bytes" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalBytes {
+ get { return optionalBytes_ != null; }
+ }
+ /// <summary>Clears the value of the "optional_bytes" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalBytes() {
+ optionalBytes_ = null;
+ }
+
+ /// <summary>Field number for the "optionalgroup" field.</summary>
+ public const int OptionalGroupFieldNumber = 16;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.OptionalGroup optionalGroup_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.OptionalGroup OptionalGroup {
+ get { return optionalGroup_; }
+ set {
+ optionalGroup_ = value;
+ }
+ }
+ /// <summary>Gets whether the optionalgroup field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalGroup {
+ get { return optionalGroup_ != null; }
+ }
+ /// <summary>Clears the value of the optionalgroup field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalGroup() {
+ optionalGroup_ = null;
+ }
+
+ /// <summary>Field number for the "optional_nested_message" field.</summary>
+ public const int OptionalNestedMessageFieldNumber = 18;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage optionalNestedMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage OptionalNestedMessage {
+ get { return optionalNestedMessage_; }
+ set {
+ optionalNestedMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_nested_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalNestedMessage {
+ get { return optionalNestedMessage_ != null; }
+ }
+ /// <summary>Clears the value of the optional_nested_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalNestedMessage() {
+ optionalNestedMessage_ = null;
+ }
+
+ /// <summary>Field number for the "optional_foreign_message" field.</summary>
+ public const int OptionalForeignMessageFieldNumber = 19;
+ private global::Google.Protobuf.TestProtos.Proto2.ForeignMessage optionalForeignMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ForeignMessage OptionalForeignMessage {
+ get { return optionalForeignMessage_; }
+ set {
+ optionalForeignMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_foreign_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalForeignMessage {
+ get { return optionalForeignMessage_ != null; }
+ }
+ /// <summary>Clears the value of the optional_foreign_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalForeignMessage() {
+ optionalForeignMessage_ = null;
+ }
+
+ /// <summary>Field number for the "optional_import_message" field.</summary>
+ public const int OptionalImportMessageFieldNumber = 20;
+ private global::Google.Protobuf.TestProtos.Proto2.ImportMessage optionalImportMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ImportMessage OptionalImportMessage {
+ get { return optionalImportMessage_; }
+ set {
+ optionalImportMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_import_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalImportMessage {
+ get { return optionalImportMessage_ != null; }
+ }
+ /// <summary>Clears the value of the optional_import_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalImportMessage() {
+ optionalImportMessage_ = null;
+ }
+
+ /// <summary>Field number for the "optional_nested_enum" field.</summary>
+ public const int OptionalNestedEnumFieldNumber = 21;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum OptionalNestedEnumDefaultValue = global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum.Foo;
+
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum optionalNestedEnum_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum OptionalNestedEnum {
+ get { if ((_hasBits0 & 8192) != 0) { return optionalNestedEnum_; } else { return OptionalNestedEnumDefaultValue; } }
+ set {
+ _hasBits0 |= 8192;
+ optionalNestedEnum_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_nested_enum" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalNestedEnum {
+ get { return (_hasBits0 & 8192) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_nested_enum" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalNestedEnum() {
+ _hasBits0 &= ~8192;
+ }
+
+ /// <summary>Field number for the "optional_foreign_enum" field.</summary>
+ public const int OptionalForeignEnumFieldNumber = 22;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.ForeignEnum OptionalForeignEnumDefaultValue = global::Google.Protobuf.TestProtos.Proto2.ForeignEnum.ForeignFoo;
+
+ private global::Google.Protobuf.TestProtos.Proto2.ForeignEnum optionalForeignEnum_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ForeignEnum OptionalForeignEnum {
+ get { if ((_hasBits0 & 16384) != 0) { return optionalForeignEnum_; } else { return OptionalForeignEnumDefaultValue; } }
+ set {
+ _hasBits0 |= 16384;
+ optionalForeignEnum_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_foreign_enum" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalForeignEnum {
+ get { return (_hasBits0 & 16384) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_foreign_enum" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalForeignEnum() {
+ _hasBits0 &= ~16384;
+ }
+
+ /// <summary>Field number for the "optional_import_enum" field.</summary>
+ public const int OptionalImportEnumFieldNumber = 23;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.ImportEnum OptionalImportEnumDefaultValue = global::Google.Protobuf.TestProtos.Proto2.ImportEnum.ImportFoo;
+
+ private global::Google.Protobuf.TestProtos.Proto2.ImportEnum optionalImportEnum_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ImportEnum OptionalImportEnum {
+ get { if ((_hasBits0 & 32768) != 0) { return optionalImportEnum_; } else { return OptionalImportEnumDefaultValue; } }
+ set {
+ _hasBits0 |= 32768;
+ optionalImportEnum_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_import_enum" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalImportEnum {
+ get { return (_hasBits0 & 32768) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_import_enum" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalImportEnum() {
+ _hasBits0 &= ~32768;
+ }
+
+ /// <summary>Field number for the "optional_string_piece" field.</summary>
+ public const int OptionalStringPieceFieldNumber = 24;
+ private readonly static string OptionalStringPieceDefaultValue = "";
+
+ private string optionalStringPiece_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string OptionalStringPiece {
+ get { return optionalStringPiece_ ?? OptionalStringPieceDefaultValue; }
+ set {
+ optionalStringPiece_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "optional_string_piece" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalStringPiece {
+ get { return optionalStringPiece_ != null; }
+ }
+ /// <summary>Clears the value of the "optional_string_piece" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalStringPiece() {
+ optionalStringPiece_ = null;
+ }
+
+ /// <summary>Field number for the "optional_cord" field.</summary>
+ public const int OptionalCordFieldNumber = 25;
+ private readonly static string OptionalCordDefaultValue = "";
+
+ private string optionalCord_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string OptionalCord {
+ get { return optionalCord_ ?? OptionalCordDefaultValue; }
+ set {
+ optionalCord_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "optional_cord" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalCord {
+ get { return optionalCord_ != null; }
+ }
+ /// <summary>Clears the value of the "optional_cord" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalCord() {
+ optionalCord_ = null;
+ }
+
+ /// <summary>Field number for the "optional_public_import_message" field.</summary>
+ public const int OptionalPublicImportMessageFieldNumber = 26;
+ private global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage optionalPublicImportMessage_;
+ /// <summary>
+ /// Defined in unittest_import_public.proto
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage OptionalPublicImportMessage {
+ get { return optionalPublicImportMessage_; }
+ set {
+ optionalPublicImportMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_public_import_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalPublicImportMessage {
+ get { return optionalPublicImportMessage_ != null; }
+ }
+ /// <summary>Clears the value of the optional_public_import_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalPublicImportMessage() {
+ optionalPublicImportMessage_ = null;
+ }
+
+ /// <summary>Field number for the "optional_lazy_message" field.</summary>
+ public const int OptionalLazyMessageFieldNumber = 27;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage optionalLazyMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage OptionalLazyMessage {
+ get { return optionalLazyMessage_; }
+ set {
+ optionalLazyMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_lazy_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalLazyMessage {
+ get { return optionalLazyMessage_ != null; }
+ }
+ /// <summary>Clears the value of the optional_lazy_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalLazyMessage() {
+ optionalLazyMessage_ = null;
+ }
+
+ /// <summary>Field number for the "repeated_int32" field.</summary>
+ public const int RepeatedInt32FieldNumber = 31;
+ private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
+ = pb::FieldCodec.ForInt32(248);
+ private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
+ /// <summary>
+ /// Repeated
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> RepeatedInt32 {
+ get { return repeatedInt32_; }
+ }
+
+ /// <summary>Field number for the "repeated_int64" field.</summary>
+ public const int RepeatedInt64FieldNumber = 32;
+ private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
+ = pb::FieldCodec.ForInt64(256);
+ private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> RepeatedInt64 {
+ get { return repeatedInt64_; }
+ }
+
+ /// <summary>Field number for the "repeated_uint32" field.</summary>
+ public const int RepeatedUint32FieldNumber = 33;
+ private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
+ = pb::FieldCodec.ForUInt32(264);
+ private readonly pbc::RepeatedField<uint> repeatedUint32_ = new pbc::RepeatedField<uint>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<uint> RepeatedUint32 {
+ get { return repeatedUint32_; }
+ }
+
+ /// <summary>Field number for the "repeated_uint64" field.</summary>
+ public const int RepeatedUint64FieldNumber = 34;
+ private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
+ = pb::FieldCodec.ForUInt64(272);
+ private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<ulong> RepeatedUint64 {
+ get { return repeatedUint64_; }
+ }
+
+ /// <summary>Field number for the "repeated_sint32" field.</summary>
+ public const int RepeatedSint32FieldNumber = 35;
+ private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec
+ = pb::FieldCodec.ForSInt32(280);
+ private readonly pbc::RepeatedField<int> repeatedSint32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> RepeatedSint32 {
+ get { return repeatedSint32_; }
+ }
+
+ /// <summary>Field number for the "repeated_sint64" field.</summary>
+ public const int RepeatedSint64FieldNumber = 36;
+ private static readonly pb::FieldCodec<long> _repeated_repeatedSint64_codec
+ = pb::FieldCodec.ForSInt64(288);
+ private readonly pbc::RepeatedField<long> repeatedSint64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> RepeatedSint64 {
+ get { return repeatedSint64_; }
+ }
+
+ /// <summary>Field number for the "repeated_fixed32" field.</summary>
+ public const int RepeatedFixed32FieldNumber = 37;
+ private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec
+ = pb::FieldCodec.ForFixed32(301);
+ private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<uint> RepeatedFixed32 {
+ get { return repeatedFixed32_; }
+ }
+
+ /// <summary>Field number for the "repeated_fixed64" field.</summary>
+ public const int RepeatedFixed64FieldNumber = 38;
+ private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec
+ = pb::FieldCodec.ForFixed64(305);
+ private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<ulong> RepeatedFixed64 {
+ get { return repeatedFixed64_; }
+ }
+
+ /// <summary>Field number for the "repeated_sfixed32" field.</summary>
+ public const int RepeatedSfixed32FieldNumber = 39;
+ private static readonly pb::FieldCodec<int> _repeated_repeatedSfixed32_codec
+ = pb::FieldCodec.ForSFixed32(317);
+ private readonly pbc::RepeatedField<int> repeatedSfixed32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> RepeatedSfixed32 {
+ get { return repeatedSfixed32_; }
+ }
+
+ /// <summary>Field number for the "repeated_sfixed64" field.</summary>
+ public const int RepeatedSfixed64FieldNumber = 40;
+ private static readonly pb::FieldCodec<long> _repeated_repeatedSfixed64_codec
+ = pb::FieldCodec.ForSFixed64(321);
+ private readonly pbc::RepeatedField<long> repeatedSfixed64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> RepeatedSfixed64 {
+ get { return repeatedSfixed64_; }
+ }
+
+ /// <summary>Field number for the "repeated_float" field.</summary>
+ public const int RepeatedFloatFieldNumber = 41;
+ private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec
+ = pb::FieldCodec.ForFloat(333);
+ private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<float> RepeatedFloat {
+ get { return repeatedFloat_; }
+ }
+
+ /// <summary>Field number for the "repeated_double" field.</summary>
+ public const int RepeatedDoubleFieldNumber = 42;
+ private static readonly pb::FieldCodec<double> _repeated_repeatedDouble_codec
+ = pb::FieldCodec.ForDouble(337);
+ private readonly pbc::RepeatedField<double> repeatedDouble_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> RepeatedDouble {
+ get { return repeatedDouble_; }
+ }
+
+ /// <summary>Field number for the "repeated_bool" field.</summary>
+ public const int RepeatedBoolFieldNumber = 43;
+ private static readonly pb::FieldCodec<bool> _repeated_repeatedBool_codec
+ = pb::FieldCodec.ForBool(344);
+ private readonly pbc::RepeatedField<bool> repeatedBool_ = new pbc::RepeatedField<bool>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<bool> RepeatedBool {
+ get { return repeatedBool_; }
+ }
+
+ /// <summary>Field number for the "repeated_string" field.</summary>
+ public const int RepeatedStringFieldNumber = 44;
+ private static readonly pb::FieldCodec<string> _repeated_repeatedString_codec
+ = pb::FieldCodec.ForString(354);
+ private readonly pbc::RepeatedField<string> repeatedString_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> RepeatedString {
+ get { return repeatedString_; }
+ }
+
+ /// <summary>Field number for the "repeated_bytes" field.</summary>
+ public const int RepeatedBytesFieldNumber = 45;
+ private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytes_codec
+ = pb::FieldCodec.ForBytes(362);
+ private readonly pbc::RepeatedField<pb::ByteString> repeatedBytes_ = new pbc::RepeatedField<pb::ByteString>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<pb::ByteString> RepeatedBytes {
+ get { return repeatedBytes_; }
+ }
+
+ /// <summary>Field number for the "repeatedgroup" field.</summary>
+ public const int RepeatedGroupFieldNumber = 46;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.RepeatedGroup> _repeated_repeatedGroup_codec
+ = pb::FieldCodec.ForGroup(371, 372, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.RepeatedGroup.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.RepeatedGroup> repeatedGroup_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.RepeatedGroup>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.RepeatedGroup> RepeatedGroup {
+ get { return repeatedGroup_; }
+ }
+
+ /// <summary>Field number for the "repeated_nested_message" field.</summary>
+ public const int RepeatedNestedMessageFieldNumber = 48;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage> _repeated_repeatedNestedMessage_codec
+ = pb::FieldCodec.ForMessage(386, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage> RepeatedNestedMessage {
+ get { return repeatedNestedMessage_; }
+ }
+
+ /// <summary>Field number for the "repeated_foreign_message" field.</summary>
+ public const int RepeatedForeignMessageFieldNumber = 49;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage> _repeated_repeatedForeignMessage_codec
+ = pb::FieldCodec.ForMessage(394, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage> repeatedForeignMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage> RepeatedForeignMessage {
+ get { return repeatedForeignMessage_; }
+ }
+
+ /// <summary>Field number for the "repeated_import_message" field.</summary>
+ public const int RepeatedImportMessageFieldNumber = 50;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.ImportMessage> _repeated_repeatedImportMessage_codec
+ = pb::FieldCodec.ForMessage(402, global::Google.Protobuf.TestProtos.Proto2.ImportMessage.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ImportMessage> repeatedImportMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ImportMessage>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ImportMessage> RepeatedImportMessage {
+ get { return repeatedImportMessage_; }
+ }
+
+ /// <summary>Field number for the "repeated_nested_enum" field.</summary>
+ public const int RepeatedNestedEnumFieldNumber = 51;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum> _repeated_repeatedNestedEnum_codec
+ = pb::FieldCodec.ForEnum(408, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum) x);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum> RepeatedNestedEnum {
+ get { return repeatedNestedEnum_; }
+ }
+
+ /// <summary>Field number for the "repeated_foreign_enum" field.</summary>
+ public const int RepeatedForeignEnumFieldNumber = 52;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> _repeated_repeatedForeignEnum_codec
+ = pb::FieldCodec.ForEnum(416, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> repeatedForeignEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> RepeatedForeignEnum {
+ get { return repeatedForeignEnum_; }
+ }
+
+ /// <summary>Field number for the "repeated_import_enum" field.</summary>
+ public const int RepeatedImportEnumFieldNumber = 53;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.ImportEnum> _repeated_repeatedImportEnum_codec
+ = pb::FieldCodec.ForEnum(424, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ImportEnum) x);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ImportEnum> repeatedImportEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ImportEnum>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ImportEnum> RepeatedImportEnum {
+ get { return repeatedImportEnum_; }
+ }
+
+ /// <summary>Field number for the "repeated_string_piece" field.</summary>
+ public const int RepeatedStringPieceFieldNumber = 54;
+ private static readonly pb::FieldCodec<string> _repeated_repeatedStringPiece_codec
+ = pb::FieldCodec.ForString(434);
+ private readonly pbc::RepeatedField<string> repeatedStringPiece_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> RepeatedStringPiece {
+ get { return repeatedStringPiece_; }
+ }
+
+ /// <summary>Field number for the "repeated_cord" field.</summary>
+ public const int RepeatedCordFieldNumber = 55;
+ private static readonly pb::FieldCodec<string> _repeated_repeatedCord_codec
+ = pb::FieldCodec.ForString(442);
+ private readonly pbc::RepeatedField<string> repeatedCord_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> RepeatedCord {
+ get { return repeatedCord_; }
+ }
+
+ /// <summary>Field number for the "repeated_lazy_message" field.</summary>
+ public const int RepeatedLazyMessageFieldNumber = 57;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage> _repeated_repeatedLazyMessage_codec
+ = pb::FieldCodec.ForMessage(458, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage> repeatedLazyMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage> RepeatedLazyMessage {
+ get { return repeatedLazyMessage_; }
+ }
+
+ /// <summary>Field number for the "default_int32" field.</summary>
+ public const int DefaultInt32FieldNumber = 61;
+ private readonly static int DefaultInt32DefaultValue = 41;
+
+ private int defaultInt32_;
+ /// <summary>
+ /// Singular with defaults
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int DefaultInt32 {
+ get { if ((_hasBits0 & 65536) != 0) { return defaultInt32_; } else { return DefaultInt32DefaultValue; } }
+ set {
+ _hasBits0 |= 65536;
+ defaultInt32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_int32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultInt32 {
+ get { return (_hasBits0 & 65536) != 0; }
+ }
+ /// <summary>Clears the value of the "default_int32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultInt32() {
+ _hasBits0 &= ~65536;
+ }
+
+ /// <summary>Field number for the "default_int64" field.</summary>
+ public const int DefaultInt64FieldNumber = 62;
+ private readonly static long DefaultInt64DefaultValue = 42L;
+
+ private long defaultInt64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long DefaultInt64 {
+ get { if ((_hasBits0 & 131072) != 0) { return defaultInt64_; } else { return DefaultInt64DefaultValue; } }
+ set {
+ _hasBits0 |= 131072;
+ defaultInt64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_int64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultInt64 {
+ get { return (_hasBits0 & 131072) != 0; }
+ }
+ /// <summary>Clears the value of the "default_int64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultInt64() {
+ _hasBits0 &= ~131072;
+ }
+
+ /// <summary>Field number for the "default_uint32" field.</summary>
+ public const int DefaultUint32FieldNumber = 63;
+ private readonly static uint DefaultUint32DefaultValue = 43;
+
+ private uint defaultUint32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint DefaultUint32 {
+ get { if ((_hasBits0 & 262144) != 0) { return defaultUint32_; } else { return DefaultUint32DefaultValue; } }
+ set {
+ _hasBits0 |= 262144;
+ defaultUint32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_uint32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultUint32 {
+ get { return (_hasBits0 & 262144) != 0; }
+ }
+ /// <summary>Clears the value of the "default_uint32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultUint32() {
+ _hasBits0 &= ~262144;
+ }
+
+ /// <summary>Field number for the "default_uint64" field.</summary>
+ public const int DefaultUint64FieldNumber = 64;
+ private readonly static ulong DefaultUint64DefaultValue = 44UL;
+
+ private ulong defaultUint64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ulong DefaultUint64 {
+ get { if ((_hasBits0 & 524288) != 0) { return defaultUint64_; } else { return DefaultUint64DefaultValue; } }
+ set {
+ _hasBits0 |= 524288;
+ defaultUint64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_uint64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultUint64 {
+ get { return (_hasBits0 & 524288) != 0; }
+ }
+ /// <summary>Clears the value of the "default_uint64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultUint64() {
+ _hasBits0 &= ~524288;
+ }
+
+ /// <summary>Field number for the "default_sint32" field.</summary>
+ public const int DefaultSint32FieldNumber = 65;
+ private readonly static int DefaultSint32DefaultValue = -45;
+
+ private int defaultSint32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int DefaultSint32 {
+ get { if ((_hasBits0 & 1048576) != 0) { return defaultSint32_; } else { return DefaultSint32DefaultValue; } }
+ set {
+ _hasBits0 |= 1048576;
+ defaultSint32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_sint32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultSint32 {
+ get { return (_hasBits0 & 1048576) != 0; }
+ }
+ /// <summary>Clears the value of the "default_sint32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultSint32() {
+ _hasBits0 &= ~1048576;
+ }
+
+ /// <summary>Field number for the "default_sint64" field.</summary>
+ public const int DefaultSint64FieldNumber = 66;
+ private readonly static long DefaultSint64DefaultValue = 46L;
+
+ private long defaultSint64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long DefaultSint64 {
+ get { if ((_hasBits0 & 2097152) != 0) { return defaultSint64_; } else { return DefaultSint64DefaultValue; } }
+ set {
+ _hasBits0 |= 2097152;
+ defaultSint64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_sint64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultSint64 {
+ get { return (_hasBits0 & 2097152) != 0; }
+ }
+ /// <summary>Clears the value of the "default_sint64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultSint64() {
+ _hasBits0 &= ~2097152;
+ }
+
+ /// <summary>Field number for the "default_fixed32" field.</summary>
+ public const int DefaultFixed32FieldNumber = 67;
+ private readonly static uint DefaultFixed32DefaultValue = 47;
+
+ private uint defaultFixed32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint DefaultFixed32 {
+ get { if ((_hasBits0 & 4194304) != 0) { return defaultFixed32_; } else { return DefaultFixed32DefaultValue; } }
+ set {
+ _hasBits0 |= 4194304;
+ defaultFixed32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_fixed32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultFixed32 {
+ get { return (_hasBits0 & 4194304) != 0; }
+ }
+ /// <summary>Clears the value of the "default_fixed32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultFixed32() {
+ _hasBits0 &= ~4194304;
+ }
+
+ /// <summary>Field number for the "default_fixed64" field.</summary>
+ public const int DefaultFixed64FieldNumber = 68;
+ private readonly static ulong DefaultFixed64DefaultValue = 48UL;
+
+ private ulong defaultFixed64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ulong DefaultFixed64 {
+ get { if ((_hasBits0 & 8388608) != 0) { return defaultFixed64_; } else { return DefaultFixed64DefaultValue; } }
+ set {
+ _hasBits0 |= 8388608;
+ defaultFixed64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_fixed64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultFixed64 {
+ get { return (_hasBits0 & 8388608) != 0; }
+ }
+ /// <summary>Clears the value of the "default_fixed64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultFixed64() {
+ _hasBits0 &= ~8388608;
+ }
+
+ /// <summary>Field number for the "default_sfixed32" field.</summary>
+ public const int DefaultSfixed32FieldNumber = 69;
+ private readonly static int DefaultSfixed32DefaultValue = 49;
+
+ private int defaultSfixed32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int DefaultSfixed32 {
+ get { if ((_hasBits0 & 16777216) != 0) { return defaultSfixed32_; } else { return DefaultSfixed32DefaultValue; } }
+ set {
+ _hasBits0 |= 16777216;
+ defaultSfixed32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_sfixed32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultSfixed32 {
+ get { return (_hasBits0 & 16777216) != 0; }
+ }
+ /// <summary>Clears the value of the "default_sfixed32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultSfixed32() {
+ _hasBits0 &= ~16777216;
+ }
+
+ /// <summary>Field number for the "default_sfixed64" field.</summary>
+ public const int DefaultSfixed64FieldNumber = 70;
+ private readonly static long DefaultSfixed64DefaultValue = -50L;
+
+ private long defaultSfixed64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long DefaultSfixed64 {
+ get { if ((_hasBits0 & 33554432) != 0) { return defaultSfixed64_; } else { return DefaultSfixed64DefaultValue; } }
+ set {
+ _hasBits0 |= 33554432;
+ defaultSfixed64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_sfixed64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultSfixed64 {
+ get { return (_hasBits0 & 33554432) != 0; }
+ }
+ /// <summary>Clears the value of the "default_sfixed64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultSfixed64() {
+ _hasBits0 &= ~33554432;
+ }
+
+ /// <summary>Field number for the "default_float" field.</summary>
+ public const int DefaultFloatFieldNumber = 71;
+ private readonly static float DefaultFloatDefaultValue = 51.5F;
+
+ private float defaultFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float DefaultFloat {
+ get { if ((_hasBits0 & 67108864) != 0) { return defaultFloat_; } else { return DefaultFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 67108864;
+ defaultFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultFloat {
+ get { return (_hasBits0 & 67108864) != 0; }
+ }
+ /// <summary>Clears the value of the "default_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultFloat() {
+ _hasBits0 &= ~67108864;
+ }
+
+ /// <summary>Field number for the "default_double" field.</summary>
+ public const int DefaultDoubleFieldNumber = 72;
+ private readonly static double DefaultDoubleDefaultValue = 52000D;
+
+ private double defaultDouble_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double DefaultDouble {
+ get { if ((_hasBits0 & 134217728) != 0) { return defaultDouble_; } else { return DefaultDoubleDefaultValue; } }
+ set {
+ _hasBits0 |= 134217728;
+ defaultDouble_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_double" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultDouble {
+ get { return (_hasBits0 & 134217728) != 0; }
+ }
+ /// <summary>Clears the value of the "default_double" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultDouble() {
+ _hasBits0 &= ~134217728;
+ }
+
+ /// <summary>Field number for the "default_bool" field.</summary>
+ public const int DefaultBoolFieldNumber = 73;
+ private readonly static bool DefaultBoolDefaultValue = true;
+
+ private bool defaultBool_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool DefaultBool {
+ get { if ((_hasBits0 & 268435456) != 0) { return defaultBool_; } else { return DefaultBoolDefaultValue; } }
+ set {
+ _hasBits0 |= 268435456;
+ defaultBool_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_bool" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultBool {
+ get { return (_hasBits0 & 268435456) != 0; }
+ }
+ /// <summary>Clears the value of the "default_bool" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultBool() {
+ _hasBits0 &= ~268435456;
+ }
+
+ /// <summary>Field number for the "default_string" field.</summary>
+ public const int DefaultStringFieldNumber = 74;
+ private readonly static string DefaultStringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +aGVsbG8= +"));
+
+ private string defaultString_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string DefaultString {
+ get { return defaultString_ ?? DefaultStringDefaultValue; }
+ set {
+ defaultString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "default_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultString {
+ get { return defaultString_ != null; }
+ }
+ /// <summary>Clears the value of the "default_string" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultString() {
+ defaultString_ = null;
+ }
+
+ /// <summary>Field number for the "default_bytes" field.</summary>
+ public const int DefaultBytesFieldNumber = 75;
+ private readonly static pb::ByteString DefaultBytesDefaultValue = pb::ByteString.FromBase64("d29ybGQ=");
+
+ private pb::ByteString defaultBytes_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString DefaultBytes {
+ get { return defaultBytes_ ?? DefaultBytesDefaultValue; }
+ set {
+ defaultBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "default_bytes" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultBytes {
+ get { return defaultBytes_ != null; }
+ }
+ /// <summary>Clears the value of the "default_bytes" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultBytes() {
+ defaultBytes_ = null;
+ }
+
+ /// <summary>Field number for the "default_nested_enum" field.</summary>
+ public const int DefaultNestedEnumFieldNumber = 81;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum DefaultNestedEnumDefaultValue = global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum.Bar;
+
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum defaultNestedEnum_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum DefaultNestedEnum {
+ get { if ((_hasBits0 & 536870912) != 0) { return defaultNestedEnum_; } else { return DefaultNestedEnumDefaultValue; } }
+ set {
+ _hasBits0 |= 536870912;
+ defaultNestedEnum_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_nested_enum" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultNestedEnum {
+ get { return (_hasBits0 & 536870912) != 0; }
+ }
+ /// <summary>Clears the value of the "default_nested_enum" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultNestedEnum() {
+ _hasBits0 &= ~536870912;
+ }
+
+ /// <summary>Field number for the "default_foreign_enum" field.</summary>
+ public const int DefaultForeignEnumFieldNumber = 82;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.ForeignEnum DefaultForeignEnumDefaultValue = global::Google.Protobuf.TestProtos.Proto2.ForeignEnum.ForeignBar;
+
+ private global::Google.Protobuf.TestProtos.Proto2.ForeignEnum defaultForeignEnum_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ForeignEnum DefaultForeignEnum {
+ get { if ((_hasBits0 & 1073741824) != 0) { return defaultForeignEnum_; } else { return DefaultForeignEnumDefaultValue; } }
+ set {
+ _hasBits0 |= 1073741824;
+ defaultForeignEnum_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_foreign_enum" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultForeignEnum {
+ get { return (_hasBits0 & 1073741824) != 0; }
+ }
+ /// <summary>Clears the value of the "default_foreign_enum" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultForeignEnum() {
+ _hasBits0 &= ~1073741824;
+ }
+
+ /// <summary>Field number for the "default_import_enum" field.</summary>
+ public const int DefaultImportEnumFieldNumber = 83;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.ImportEnum DefaultImportEnumDefaultValue = global::Google.Protobuf.TestProtos.Proto2.ImportEnum.ImportBar;
+
+ private global::Google.Protobuf.TestProtos.Proto2.ImportEnum defaultImportEnum_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ImportEnum DefaultImportEnum {
+ get { if ((_hasBits0 & -2147483648) != 0) { return defaultImportEnum_; } else { return DefaultImportEnumDefaultValue; } }
+ set {
+ _hasBits0 |= -2147483648;
+ defaultImportEnum_ = value;
+ }
+ }
+ /// <summary>Gets whether the "default_import_enum" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultImportEnum {
+ get { return (_hasBits0 & -2147483648) != 0; }
+ }
+ /// <summary>Clears the value of the "default_import_enum" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultImportEnum() {
+ _hasBits0 &= ~-2147483648;
+ }
+
+ /// <summary>Field number for the "default_string_piece" field.</summary>
+ public const int DefaultStringPieceFieldNumber = 84;
+ private readonly static string DefaultStringPieceDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +YWJj +"));
+
+ private string defaultStringPiece_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string DefaultStringPiece {
+ get { return defaultStringPiece_ ?? DefaultStringPieceDefaultValue; }
+ set {
+ defaultStringPiece_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "default_string_piece" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultStringPiece {
+ get { return defaultStringPiece_ != null; }
+ }
+ /// <summary>Clears the value of the "default_string_piece" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultStringPiece() {
+ defaultStringPiece_ = null;
+ }
+
+ /// <summary>Field number for the "default_cord" field.</summary>
+ public const int DefaultCordFieldNumber = 85;
+ private readonly static string DefaultCordDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +MTIz +"));
+
+ private string defaultCord_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string DefaultCord {
+ get { return defaultCord_ ?? DefaultCordDefaultValue; }
+ set {
+ defaultCord_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "default_cord" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDefaultCord {
+ get { return defaultCord_ != null; }
+ }
+ /// <summary>Clears the value of the "default_cord" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDefaultCord() {
+ defaultCord_ = null;
+ }
+
+ /// <summary>Field number for the "oneof_uint32" field.</summary>
+ public const int OneofUint32FieldNumber = 111;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint OneofUint32 {
+ get { return HasOneofUint32 ? (uint) oneofField_ : 0; }
+ set {
+ oneofField_ = value;
+ oneofFieldCase_ = OneofFieldOneofCase.OneofUint32;
+ }
+ }
+ /// <summary>Gets whether the "oneof_uint32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOneofUint32 {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "oneof_uint32" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofUint32() {
+ if (HasOneofUint32) {
+ ClearOneofField();
+ }
+ }
+
+ /// <summary>Field number for the "oneof_nested_message" field.</summary>
+ public const int OneofNestedMessageFieldNumber = 112;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage OneofNestedMessage {
+ get { return HasOneofNestedMessage ? (global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage) oneofField_ : null; }
+ set {
+ oneofField_ = value;
+ oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage;
+ }
+ }
+ /// <summary>Gets whether the "oneof_nested_message" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOneofNestedMessage {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "oneof_nested_message" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofNestedMessage() {
+ if (HasOneofNestedMessage) {
+ ClearOneofField();
+ }
+ }
+
+ /// <summary>Field number for the "oneof_string" field.</summary>
+ public const int OneofStringFieldNumber = 113;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string OneofString {
+ get { return HasOneofString ? (string) oneofField_ : ""; }
+ set {
+ oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ oneofFieldCase_ = OneofFieldOneofCase.OneofString;
+ }
+ }
+ /// <summary>Gets whether the "oneof_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOneofString {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "oneof_string" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofString() {
+ if (HasOneofString) {
+ ClearOneofField();
+ }
+ }
+
+ /// <summary>Field number for the "oneof_bytes" field.</summary>
+ public const int OneofBytesFieldNumber = 114;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString OneofBytes {
+ get { return HasOneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; }
+ set {
+ oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ oneofFieldCase_ = OneofFieldOneofCase.OneofBytes;
+ }
+ }
+ /// <summary>Gets whether the "oneof_bytes" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOneofBytes {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "oneof_bytes" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofBytes() {
+ if (HasOneofBytes) {
+ ClearOneofField();
+ }
+ }
+
+ private object oneofField_;
+ /// <summary>Enum of possible cases for the "oneof_field" oneof.</summary>
+ public enum OneofFieldOneofCase {
+ None = 0,
+ OneofUint32 = 111,
+ OneofNestedMessage = 112,
+ OneofString = 113,
+ OneofBytes = 114,
+ }
+ private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OneofFieldOneofCase OneofFieldCase {
+ get { return oneofFieldCase_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofField() {
+ oneofFieldCase_ = OneofFieldOneofCase.None;
+ oneofField_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestAllTypes);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestAllTypes other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (OptionalInt32 != other.OptionalInt32) return false;
+ if (OptionalInt64 != other.OptionalInt64) return false;
+ if (OptionalUint32 != other.OptionalUint32) return false;
+ if (OptionalUint64 != other.OptionalUint64) return false;
+ if (OptionalSint32 != other.OptionalSint32) return false;
+ if (OptionalSint64 != other.OptionalSint64) return false;
+ if (OptionalFixed32 != other.OptionalFixed32) return false;
+ if (OptionalFixed64 != other.OptionalFixed64) return false;
+ if (OptionalSfixed32 != other.OptionalSfixed32) return false;
+ if (OptionalSfixed64 != other.OptionalSfixed64) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OptionalFloat, other.OptionalFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(OptionalDouble, other.OptionalDouble)) return false;
+ if (OptionalBool != other.OptionalBool) return false;
+ if (OptionalString != other.OptionalString) return false;
+ if (OptionalBytes != other.OptionalBytes) return false;
+ if (!object.Equals(OptionalGroup, other.OptionalGroup)) return false;
+ if (!object.Equals(OptionalNestedMessage, other.OptionalNestedMessage)) return false;
+ if (!object.Equals(OptionalForeignMessage, other.OptionalForeignMessage)) return false;
+ if (!object.Equals(OptionalImportMessage, other.OptionalImportMessage)) return false;
+ if (OptionalNestedEnum != other.OptionalNestedEnum) return false;
+ if (OptionalForeignEnum != other.OptionalForeignEnum) return false;
+ if (OptionalImportEnum != other.OptionalImportEnum) return false;
+ if (OptionalStringPiece != other.OptionalStringPiece) return false;
+ if (OptionalCord != other.OptionalCord) return false;
+ if (!object.Equals(OptionalPublicImportMessage, other.OptionalPublicImportMessage)) return false;
+ if (!object.Equals(OptionalLazyMessage, other.OptionalLazyMessage)) return false;
+ if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
+ if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
+ if(!repeatedUint32_.Equals(other.repeatedUint32_)) return false;
+ if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
+ if(!repeatedSint32_.Equals(other.repeatedSint32_)) return false;
+ if(!repeatedSint64_.Equals(other.repeatedSint64_)) return false;
+ if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
+ if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
+ if(!repeatedSfixed32_.Equals(other.repeatedSfixed32_)) return false;
+ if(!repeatedSfixed64_.Equals(other.repeatedSfixed64_)) return false;
+ if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
+ if(!repeatedDouble_.Equals(other.repeatedDouble_)) return false;
+ if(!repeatedBool_.Equals(other.repeatedBool_)) return false;
+ if(!repeatedString_.Equals(other.repeatedString_)) return false;
+ if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false;
+ if(!repeatedGroup_.Equals(other.repeatedGroup_)) return false;
+ if(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return false;
+ if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false;
+ if(!repeatedImportMessage_.Equals(other.repeatedImportMessage_)) return false;
+ if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false;
+ if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false;
+ if(!repeatedImportEnum_.Equals(other.repeatedImportEnum_)) return false;
+ if(!repeatedStringPiece_.Equals(other.repeatedStringPiece_)) return false;
+ if(!repeatedCord_.Equals(other.repeatedCord_)) return false;
+ if(!repeatedLazyMessage_.Equals(other.repeatedLazyMessage_)) return false;
+ if (DefaultInt32 != other.DefaultInt32) return false;
+ if (DefaultInt64 != other.DefaultInt64) return false;
+ if (DefaultUint32 != other.DefaultUint32) return false;
+ if (DefaultUint64 != other.DefaultUint64) return false;
+ if (DefaultSint32 != other.DefaultSint32) return false;
+ if (DefaultSint64 != other.DefaultSint64) return false;
+ if (DefaultFixed32 != other.DefaultFixed32) return false;
+ if (DefaultFixed64 != other.DefaultFixed64) return false;
+ if (DefaultSfixed32 != other.DefaultSfixed32) return false;
+ if (DefaultSfixed64 != other.DefaultSfixed64) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DefaultFloat, other.DefaultFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(DefaultDouble, other.DefaultDouble)) return false;
+ if (DefaultBool != other.DefaultBool) return false;
+ if (DefaultString != other.DefaultString) return false;
+ if (DefaultBytes != other.DefaultBytes) return false;
+ if (DefaultNestedEnum != other.DefaultNestedEnum) return false;
+ if (DefaultForeignEnum != other.DefaultForeignEnum) return false;
+ if (DefaultImportEnum != other.DefaultImportEnum) return false;
+ if (DefaultStringPiece != other.DefaultStringPiece) return false;
+ if (DefaultCord != other.DefaultCord) return false;
+ if (OneofUint32 != other.OneofUint32) return false;
+ if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return false;
+ if (OneofString != other.OneofString) return false;
+ if (OneofBytes != other.OneofBytes) return false;
+ if (OneofFieldCase != other.OneofFieldCase) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasOptionalInt32) hash ^= OptionalInt32.GetHashCode();
+ if (HasOptionalInt64) hash ^= OptionalInt64.GetHashCode();
+ if (HasOptionalUint32) hash ^= OptionalUint32.GetHashCode();
+ if (HasOptionalUint64) hash ^= OptionalUint64.GetHashCode();
+ if (HasOptionalSint32) hash ^= OptionalSint32.GetHashCode();
+ if (HasOptionalSint64) hash ^= OptionalSint64.GetHashCode();
+ if (HasOptionalFixed32) hash ^= OptionalFixed32.GetHashCode();
+ if (HasOptionalFixed64) hash ^= OptionalFixed64.GetHashCode();
+ if (HasOptionalSfixed32) hash ^= OptionalSfixed32.GetHashCode();
+ if (HasOptionalSfixed64) hash ^= OptionalSfixed64.GetHashCode();
+ if (HasOptionalFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OptionalFloat);
+ if (HasOptionalDouble) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(OptionalDouble);
+ if (HasOptionalBool) hash ^= OptionalBool.GetHashCode();
+ if (HasOptionalString) hash ^= OptionalString.GetHashCode();
+ if (HasOptionalBytes) hash ^= OptionalBytes.GetHashCode();
+ if (HasOptionalGroup) hash ^= OptionalGroup.GetHashCode();
+ if (HasOptionalNestedMessage) hash ^= OptionalNestedMessage.GetHashCode();
+ if (HasOptionalForeignMessage) hash ^= OptionalForeignMessage.GetHashCode();
+ if (HasOptionalImportMessage) hash ^= OptionalImportMessage.GetHashCode();
+ if (HasOptionalNestedEnum) hash ^= OptionalNestedEnum.GetHashCode();
+ if (HasOptionalForeignEnum) hash ^= OptionalForeignEnum.GetHashCode();
+ if (HasOptionalImportEnum) hash ^= OptionalImportEnum.GetHashCode();
+ if (HasOptionalStringPiece) hash ^= OptionalStringPiece.GetHashCode();
+ if (HasOptionalCord) hash ^= OptionalCord.GetHashCode();
+ if (HasOptionalPublicImportMessage) hash ^= OptionalPublicImportMessage.GetHashCode();
+ if (HasOptionalLazyMessage) hash ^= OptionalLazyMessage.GetHashCode();
+ hash ^= repeatedInt32_.GetHashCode();
+ hash ^= repeatedInt64_.GetHashCode();
+ hash ^= repeatedUint32_.GetHashCode();
+ hash ^= repeatedUint64_.GetHashCode();
+ hash ^= repeatedSint32_.GetHashCode();
+ hash ^= repeatedSint64_.GetHashCode();
+ hash ^= repeatedFixed32_.GetHashCode();
+ hash ^= repeatedFixed64_.GetHashCode();
+ hash ^= repeatedSfixed32_.GetHashCode();
+ hash ^= repeatedSfixed64_.GetHashCode();
+ hash ^= repeatedFloat_.GetHashCode();
+ hash ^= repeatedDouble_.GetHashCode();
+ hash ^= repeatedBool_.GetHashCode();
+ hash ^= repeatedString_.GetHashCode();
+ hash ^= repeatedBytes_.GetHashCode();
+ hash ^= repeatedGroup_.GetHashCode();
+ hash ^= repeatedNestedMessage_.GetHashCode();
+ hash ^= repeatedForeignMessage_.GetHashCode();
+ hash ^= repeatedImportMessage_.GetHashCode();
+ hash ^= repeatedNestedEnum_.GetHashCode();
+ hash ^= repeatedForeignEnum_.GetHashCode();
+ hash ^= repeatedImportEnum_.GetHashCode();
+ hash ^= repeatedStringPiece_.GetHashCode();
+ hash ^= repeatedCord_.GetHashCode();
+ hash ^= repeatedLazyMessage_.GetHashCode();
+ if (HasDefaultInt32) hash ^= DefaultInt32.GetHashCode();
+ if (HasDefaultInt64) hash ^= DefaultInt64.GetHashCode();
+ if (HasDefaultUint32) hash ^= DefaultUint32.GetHashCode();
+ if (HasDefaultUint64) hash ^= DefaultUint64.GetHashCode();
+ if (HasDefaultSint32) hash ^= DefaultSint32.GetHashCode();
+ if (HasDefaultSint64) hash ^= DefaultSint64.GetHashCode();
+ if (HasDefaultFixed32) hash ^= DefaultFixed32.GetHashCode();
+ if (HasDefaultFixed64) hash ^= DefaultFixed64.GetHashCode();
+ if (HasDefaultSfixed32) hash ^= DefaultSfixed32.GetHashCode();
+ if (HasDefaultSfixed64) hash ^= DefaultSfixed64.GetHashCode();
+ if (HasDefaultFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DefaultFloat);
+ if (HasDefaultDouble) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DefaultDouble);
+ if (HasDefaultBool) hash ^= DefaultBool.GetHashCode();
+ if (HasDefaultString) hash ^= DefaultString.GetHashCode();
+ if (HasDefaultBytes) hash ^= DefaultBytes.GetHashCode();
+ if (HasDefaultNestedEnum) hash ^= DefaultNestedEnum.GetHashCode();
+ if (HasDefaultForeignEnum) hash ^= DefaultForeignEnum.GetHashCode();
+ if (HasDefaultImportEnum) hash ^= DefaultImportEnum.GetHashCode();
+ if (HasDefaultStringPiece) hash ^= DefaultStringPiece.GetHashCode();
+ if (HasDefaultCord) hash ^= DefaultCord.GetHashCode();
+ if (HasOneofUint32) hash ^= OneofUint32.GetHashCode();
+ if (HasOneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode();
+ if (HasOneofString) hash ^= OneofString.GetHashCode();
+ if (HasOneofBytes) hash ^= OneofBytes.GetHashCode();
+ hash ^= (int) oneofFieldCase_;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasOptionalInt32) {
+ output.WriteRawTag(8);
+ output.WriteInt32(OptionalInt32);
+ }
+ if (HasOptionalInt64) {
+ output.WriteRawTag(16);
+ output.WriteInt64(OptionalInt64);
+ }
+ if (HasOptionalUint32) {
+ output.WriteRawTag(24);
+ output.WriteUInt32(OptionalUint32);
+ }
+ if (HasOptionalUint64) {
+ output.WriteRawTag(32);
+ output.WriteUInt64(OptionalUint64);
+ }
+ if (HasOptionalSint32) {
+ output.WriteRawTag(40);
+ output.WriteSInt32(OptionalSint32);
+ }
+ if (HasOptionalSint64) {
+ output.WriteRawTag(48);
+ output.WriteSInt64(OptionalSint64);
+ }
+ if (HasOptionalFixed32) {
+ output.WriteRawTag(61);
+ output.WriteFixed32(OptionalFixed32);
+ }
+ if (HasOptionalFixed64) {
+ output.WriteRawTag(65);
+ output.WriteFixed64(OptionalFixed64);
+ }
+ if (HasOptionalSfixed32) {
+ output.WriteRawTag(77);
+ output.WriteSFixed32(OptionalSfixed32);
+ }
+ if (HasOptionalSfixed64) {
+ output.WriteRawTag(81);
+ output.WriteSFixed64(OptionalSfixed64);
+ }
+ if (HasOptionalFloat) {
+ output.WriteRawTag(93);
+ output.WriteFloat(OptionalFloat);
+ }
+ if (HasOptionalDouble) {
+ output.WriteRawTag(97);
+ output.WriteDouble(OptionalDouble);
+ }
+ if (HasOptionalBool) {
+ output.WriteRawTag(104);
+ output.WriteBool(OptionalBool);
+ }
+ if (HasOptionalString) {
+ output.WriteRawTag(114);
+ output.WriteString(OptionalString);
+ }
+ if (HasOptionalBytes) {
+ output.WriteRawTag(122);
+ output.WriteBytes(OptionalBytes);
+ }
+ if (HasOptionalGroup) {
+ output.WriteRawTag(131, 1);
+ output.WriteGroup(OptionalGroup);
+ output.WriteRawTag(132, 1);
+ }
+ if (HasOptionalNestedMessage) {
+ output.WriteRawTag(146, 1);
+ output.WriteMessage(OptionalNestedMessage);
+ }
+ if (HasOptionalForeignMessage) {
+ output.WriteRawTag(154, 1);
+ output.WriteMessage(OptionalForeignMessage);
+ }
+ if (HasOptionalImportMessage) {
+ output.WriteRawTag(162, 1);
+ output.WriteMessage(OptionalImportMessage);
+ }
+ if (HasOptionalNestedEnum) {
+ output.WriteRawTag(168, 1);
+ output.WriteEnum((int) OptionalNestedEnum);
+ }
+ if (HasOptionalForeignEnum) {
+ output.WriteRawTag(176, 1);
+ output.WriteEnum((int) OptionalForeignEnum);
+ }
+ if (HasOptionalImportEnum) {
+ output.WriteRawTag(184, 1);
+ output.WriteEnum((int) OptionalImportEnum);
+ }
+ if (HasOptionalStringPiece) {
+ output.WriteRawTag(194, 1);
+ output.WriteString(OptionalStringPiece);
+ }
+ if (HasOptionalCord) {
+ output.WriteRawTag(202, 1);
+ output.WriteString(OptionalCord);
+ }
+ if (HasOptionalPublicImportMessage) {
+ output.WriteRawTag(210, 1);
+ output.WriteMessage(OptionalPublicImportMessage);
+ }
+ if (HasOptionalLazyMessage) {
+ output.WriteRawTag(218, 1);
+ output.WriteMessage(OptionalLazyMessage);
+ }
+ repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
+ repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
+ repeatedUint32_.WriteTo(output, _repeated_repeatedUint32_codec);
+ repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
+ repeatedSint32_.WriteTo(output, _repeated_repeatedSint32_codec);
+ repeatedSint64_.WriteTo(output, _repeated_repeatedSint64_codec);
+ repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
+ repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
+ repeatedSfixed32_.WriteTo(output, _repeated_repeatedSfixed32_codec);
+ repeatedSfixed64_.WriteTo(output, _repeated_repeatedSfixed64_codec);
+ repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
+ repeatedDouble_.WriteTo(output, _repeated_repeatedDouble_codec);
+ repeatedBool_.WriteTo(output, _repeated_repeatedBool_codec);
+ repeatedString_.WriteTo(output, _repeated_repeatedString_codec);
+ repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec);
+ repeatedGroup_.WriteTo(output, _repeated_repeatedGroup_codec);
+ repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_codec);
+ repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec);
+ repeatedImportMessage_.WriteTo(output, _repeated_repeatedImportMessage_codec);
+ repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec);
+ repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec);
+ repeatedImportEnum_.WriteTo(output, _repeated_repeatedImportEnum_codec);
+ repeatedStringPiece_.WriteTo(output, _repeated_repeatedStringPiece_codec);
+ repeatedCord_.WriteTo(output, _repeated_repeatedCord_codec);
+ repeatedLazyMessage_.WriteTo(output, _repeated_repeatedLazyMessage_codec);
+ if (HasDefaultInt32) {
+ output.WriteRawTag(232, 3);
+ output.WriteInt32(DefaultInt32);
+ }
+ if (HasDefaultInt64) {
+ output.WriteRawTag(240, 3);
+ output.WriteInt64(DefaultInt64);
+ }
+ if (HasDefaultUint32) {
+ output.WriteRawTag(248, 3);
+ output.WriteUInt32(DefaultUint32);
+ }
+ if (HasDefaultUint64) {
+ output.WriteRawTag(128, 4);
+ output.WriteUInt64(DefaultUint64);
+ }
+ if (HasDefaultSint32) {
+ output.WriteRawTag(136, 4);
+ output.WriteSInt32(DefaultSint32);
+ }
+ if (HasDefaultSint64) {
+ output.WriteRawTag(144, 4);
+ output.WriteSInt64(DefaultSint64);
+ }
+ if (HasDefaultFixed32) {
+ output.WriteRawTag(157, 4);
+ output.WriteFixed32(DefaultFixed32);
+ }
+ if (HasDefaultFixed64) {
+ output.WriteRawTag(161, 4);
+ output.WriteFixed64(DefaultFixed64);
+ }
+ if (HasDefaultSfixed32) {
+ output.WriteRawTag(173, 4);
+ output.WriteSFixed32(DefaultSfixed32);
+ }
+ if (HasDefaultSfixed64) {
+ output.WriteRawTag(177, 4);
+ output.WriteSFixed64(DefaultSfixed64);
+ }
+ if (HasDefaultFloat) {
+ output.WriteRawTag(189, 4);
+ output.WriteFloat(DefaultFloat);
+ }
+ if (HasDefaultDouble) {
+ output.WriteRawTag(193, 4);
+ output.WriteDouble(DefaultDouble);
+ }
+ if (HasDefaultBool) {
+ output.WriteRawTag(200, 4);
+ output.WriteBool(DefaultBool);
+ }
+ if (HasDefaultString) {
+ output.WriteRawTag(210, 4);
+ output.WriteString(DefaultString);
+ }
+ if (HasDefaultBytes) {
+ output.WriteRawTag(218, 4);
+ output.WriteBytes(DefaultBytes);
+ }
+ if (HasDefaultNestedEnum) {
+ output.WriteRawTag(136, 5);
+ output.WriteEnum((int) DefaultNestedEnum);
+ }
+ if (HasDefaultForeignEnum) {
+ output.WriteRawTag(144, 5);
+ output.WriteEnum((int) DefaultForeignEnum);
+ }
+ if (HasDefaultImportEnum) {
+ output.WriteRawTag(152, 5);
+ output.WriteEnum((int) DefaultImportEnum);
+ }
+ if (HasDefaultStringPiece) {
+ output.WriteRawTag(162, 5);
+ output.WriteString(DefaultStringPiece);
+ }
+ if (HasDefaultCord) {
+ output.WriteRawTag(170, 5);
+ output.WriteString(DefaultCord);
+ }
+ if (HasOneofUint32) {
+ output.WriteRawTag(248, 6);
+ output.WriteUInt32(OneofUint32);
+ }
+ if (HasOneofNestedMessage) {
+ output.WriteRawTag(130, 7);
+ output.WriteMessage(OneofNestedMessage);
+ }
+ if (HasOneofString) {
+ output.WriteRawTag(138, 7);
+ output.WriteString(OneofString);
+ }
+ if (HasOneofBytes) {
+ output.WriteRawTag(146, 7);
+ output.WriteBytes(OneofBytes);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasOptionalInt32) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32);
+ }
+ if (HasOptionalInt64) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(OptionalInt64);
+ }
+ if (HasOptionalUint32) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(OptionalUint32);
+ }
+ if (HasOptionalUint64) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt64Size(OptionalUint64);
+ }
+ if (HasOptionalSint32) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt32Size(OptionalSint32);
+ }
+ if (HasOptionalSint64) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt64Size(OptionalSint64);
+ }
+ if (HasOptionalFixed32) {
+ size += 1 + 4;
+ }
+ if (HasOptionalFixed64) {
+ size += 1 + 8;
+ }
+ if (HasOptionalSfixed32) {
+ size += 1 + 4;
+ }
+ if (HasOptionalSfixed64) {
+ size += 1 + 8;
+ }
+ if (HasOptionalFloat) {
+ size += 1 + 4;
+ }
+ if (HasOptionalDouble) {
+ size += 1 + 8;
+ }
+ if (HasOptionalBool) {
+ size += 1 + 1;
+ }
+ if (HasOptionalString) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(OptionalString);
+ }
+ if (HasOptionalBytes) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(OptionalBytes);
+ }
+ if (HasOptionalGroup) {
+ size += 4 + pb::CodedOutputStream.ComputeGroupSize(OptionalGroup);
+ }
+ if (HasOptionalNestedMessage) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage);
+ }
+ if (HasOptionalForeignMessage) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalForeignMessage);
+ }
+ if (HasOptionalImportMessage) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalImportMessage);
+ }
+ if (HasOptionalNestedEnum) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalNestedEnum);
+ }
+ if (HasOptionalForeignEnum) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalForeignEnum);
+ }
+ if (HasOptionalImportEnum) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalImportEnum);
+ }
+ if (HasOptionalStringPiece) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalStringPiece);
+ }
+ if (HasOptionalCord) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalCord);
+ }
+ if (HasOptionalPublicImportMessage) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalPublicImportMessage);
+ }
+ if (HasOptionalLazyMessage) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalLazyMessage);
+ }
+ size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
+ size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
+ size += repeatedUint32_.CalculateSize(_repeated_repeatedUint32_codec);
+ size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
+ size += repeatedSint32_.CalculateSize(_repeated_repeatedSint32_codec);
+ size += repeatedSint64_.CalculateSize(_repeated_repeatedSint64_codec);
+ size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
+ size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
+ size += repeatedSfixed32_.CalculateSize(_repeated_repeatedSfixed32_codec);
+ size += repeatedSfixed64_.CalculateSize(_repeated_repeatedSfixed64_codec);
+ size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
+ size += repeatedDouble_.CalculateSize(_repeated_repeatedDouble_codec);
+ size += repeatedBool_.CalculateSize(_repeated_repeatedBool_codec);
+ size += repeatedString_.CalculateSize(_repeated_repeatedString_codec);
+ size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec);
+ size += repeatedGroup_.CalculateSize(_repeated_repeatedGroup_codec);
+ size += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessage_codec);
+ size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec);
+ size += repeatedImportMessage_.CalculateSize(_repeated_repeatedImportMessage_codec);
+ size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_codec);
+ size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec);
+ size += repeatedImportEnum_.CalculateSize(_repeated_repeatedImportEnum_codec);
+ size += repeatedStringPiece_.CalculateSize(_repeated_repeatedStringPiece_codec);
+ size += repeatedCord_.CalculateSize(_repeated_repeatedCord_codec);
+ size += repeatedLazyMessage_.CalculateSize(_repeated_repeatedLazyMessage_codec);
+ if (HasDefaultInt32) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(DefaultInt32);
+ }
+ if (HasDefaultInt64) {
+ size += 2 + pb::CodedOutputStream.ComputeInt64Size(DefaultInt64);
+ }
+ if (HasDefaultUint32) {
+ size += 2 + pb::CodedOutputStream.ComputeUInt32Size(DefaultUint32);
+ }
+ if (HasDefaultUint64) {
+ size += 2 + pb::CodedOutputStream.ComputeUInt64Size(DefaultUint64);
+ }
+ if (HasDefaultSint32) {
+ size += 2 + pb::CodedOutputStream.ComputeSInt32Size(DefaultSint32);
+ }
+ if (HasDefaultSint64) {
+ size += 2 + pb::CodedOutputStream.ComputeSInt64Size(DefaultSint64);
+ }
+ if (HasDefaultFixed32) {
+ size += 2 + 4;
+ }
+ if (HasDefaultFixed64) {
+ size += 2 + 8;
+ }
+ if (HasDefaultSfixed32) {
+ size += 2 + 4;
+ }
+ if (HasDefaultSfixed64) {
+ size += 2 + 8;
+ }
+ if (HasDefaultFloat) {
+ size += 2 + 4;
+ }
+ if (HasDefaultDouble) {
+ size += 2 + 8;
+ }
+ if (HasDefaultBool) {
+ size += 2 + 1;
+ }
+ if (HasDefaultString) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(DefaultString);
+ }
+ if (HasDefaultBytes) {
+ size += 2 + pb::CodedOutputStream.ComputeBytesSize(DefaultBytes);
+ }
+ if (HasDefaultNestedEnum) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) DefaultNestedEnum);
+ }
+ if (HasDefaultForeignEnum) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) DefaultForeignEnum);
+ }
+ if (HasDefaultImportEnum) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) DefaultImportEnum);
+ }
+ if (HasDefaultStringPiece) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(DefaultStringPiece);
+ }
+ if (HasDefaultCord) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(DefaultCord);
+ }
+ if (HasOneofUint32) {
+ size += 2 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32);
+ }
+ if (HasOneofNestedMessage) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OneofNestedMessage);
+ }
+ if (HasOneofString) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(OneofString);
+ }
+ if (HasOneofBytes) {
+ size += 2 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestAllTypes other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasOptionalInt32) {
+ OptionalInt32 = other.OptionalInt32;
+ }
+ if (other.HasOptionalInt64) {
+ OptionalInt64 = other.OptionalInt64;
+ }
+ if (other.HasOptionalUint32) {
+ OptionalUint32 = other.OptionalUint32;
+ }
+ if (other.HasOptionalUint64) {
+ OptionalUint64 = other.OptionalUint64;
+ }
+ if (other.HasOptionalSint32) {
+ OptionalSint32 = other.OptionalSint32;
+ }
+ if (other.HasOptionalSint64) {
+ OptionalSint64 = other.OptionalSint64;
+ }
+ if (other.HasOptionalFixed32) {
+ OptionalFixed32 = other.OptionalFixed32;
+ }
+ if (other.HasOptionalFixed64) {
+ OptionalFixed64 = other.OptionalFixed64;
+ }
+ if (other.HasOptionalSfixed32) {
+ OptionalSfixed32 = other.OptionalSfixed32;
+ }
+ if (other.HasOptionalSfixed64) {
+ OptionalSfixed64 = other.OptionalSfixed64;
+ }
+ if (other.HasOptionalFloat) {
+ OptionalFloat = other.OptionalFloat;
+ }
+ if (other.HasOptionalDouble) {
+ OptionalDouble = other.OptionalDouble;
+ }
+ if (other.HasOptionalBool) {
+ OptionalBool = other.OptionalBool;
+ }
+ if (other.HasOptionalString) {
+ OptionalString = other.OptionalString;
+ }
+ if (other.HasOptionalBytes) {
+ OptionalBytes = other.OptionalBytes;
+ }
+ if (other.HasOptionalGroup) {
+ if (!HasOptionalGroup) {
+ OptionalGroup = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.OptionalGroup();
+ }
+ OptionalGroup.MergeFrom(other.OptionalGroup);
+ }
+ if (other.HasOptionalNestedMessage) {
+ if (!HasOptionalNestedMessage) {
+ OptionalNestedMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage();
+ }
+ OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage);
+ }
+ if (other.HasOptionalForeignMessage) {
+ if (!HasOptionalForeignMessage) {
+ OptionalForeignMessage = new global::Google.Protobuf.TestProtos.Proto2.ForeignMessage();
+ }
+ OptionalForeignMessage.MergeFrom(other.OptionalForeignMessage);
+ }
+ if (other.HasOptionalImportMessage) {
+ if (!HasOptionalImportMessage) {
+ OptionalImportMessage = new global::Google.Protobuf.TestProtos.Proto2.ImportMessage();
+ }
+ OptionalImportMessage.MergeFrom(other.OptionalImportMessage);
+ }
+ if (other.HasOptionalNestedEnum) {
+ OptionalNestedEnum = other.OptionalNestedEnum;
+ }
+ if (other.HasOptionalForeignEnum) {
+ OptionalForeignEnum = other.OptionalForeignEnum;
+ }
+ if (other.HasOptionalImportEnum) {
+ OptionalImportEnum = other.OptionalImportEnum;
+ }
+ if (other.HasOptionalStringPiece) {
+ OptionalStringPiece = other.OptionalStringPiece;
+ }
+ if (other.HasOptionalCord) {
+ OptionalCord = other.OptionalCord;
+ }
+ if (other.HasOptionalPublicImportMessage) {
+ if (!HasOptionalPublicImportMessage) {
+ OptionalPublicImportMessage = new global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage();
+ }
+ OptionalPublicImportMessage.MergeFrom(other.OptionalPublicImportMessage);
+ }
+ if (other.HasOptionalLazyMessage) {
+ if (!HasOptionalLazyMessage) {
+ OptionalLazyMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage();
+ }
+ OptionalLazyMessage.MergeFrom(other.OptionalLazyMessage);
+ }
+ repeatedInt32_.Add(other.repeatedInt32_);
+ repeatedInt64_.Add(other.repeatedInt64_);
+ repeatedUint32_.Add(other.repeatedUint32_);
+ repeatedUint64_.Add(other.repeatedUint64_);
+ repeatedSint32_.Add(other.repeatedSint32_);
+ repeatedSint64_.Add(other.repeatedSint64_);
+ repeatedFixed32_.Add(other.repeatedFixed32_);
+ repeatedFixed64_.Add(other.repeatedFixed64_);
+ repeatedSfixed32_.Add(other.repeatedSfixed32_);
+ repeatedSfixed64_.Add(other.repeatedSfixed64_);
+ repeatedFloat_.Add(other.repeatedFloat_);
+ repeatedDouble_.Add(other.repeatedDouble_);
+ repeatedBool_.Add(other.repeatedBool_);
+ repeatedString_.Add(other.repeatedString_);
+ repeatedBytes_.Add(other.repeatedBytes_);
+ repeatedGroup_.Add(other.repeatedGroup_);
+ repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
+ repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
+ repeatedImportMessage_.Add(other.repeatedImportMessage_);
+ repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
+ repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
+ repeatedImportEnum_.Add(other.repeatedImportEnum_);
+ repeatedStringPiece_.Add(other.repeatedStringPiece_);
+ repeatedCord_.Add(other.repeatedCord_);
+ repeatedLazyMessage_.Add(other.repeatedLazyMessage_);
+ if (other.HasDefaultInt32) {
+ DefaultInt32 = other.DefaultInt32;
+ }
+ if (other.HasDefaultInt64) {
+ DefaultInt64 = other.DefaultInt64;
+ }
+ if (other.HasDefaultUint32) {
+ DefaultUint32 = other.DefaultUint32;
+ }
+ if (other.HasDefaultUint64) {
+ DefaultUint64 = other.DefaultUint64;
+ }
+ if (other.HasDefaultSint32) {
+ DefaultSint32 = other.DefaultSint32;
+ }
+ if (other.HasDefaultSint64) {
+ DefaultSint64 = other.DefaultSint64;
+ }
+ if (other.HasDefaultFixed32) {
+ DefaultFixed32 = other.DefaultFixed32;
+ }
+ if (other.HasDefaultFixed64) {
+ DefaultFixed64 = other.DefaultFixed64;
+ }
+ if (other.HasDefaultSfixed32) {
+ DefaultSfixed32 = other.DefaultSfixed32;
+ }
+ if (other.HasDefaultSfixed64) {
+ DefaultSfixed64 = other.DefaultSfixed64;
+ }
+ if (other.HasDefaultFloat) {
+ DefaultFloat = other.DefaultFloat;
+ }
+ if (other.HasDefaultDouble) {
+ DefaultDouble = other.DefaultDouble;
+ }
+ if (other.HasDefaultBool) {
+ DefaultBool = other.DefaultBool;
+ }
+ if (other.HasDefaultString) {
+ DefaultString = other.DefaultString;
+ }
+ if (other.HasDefaultBytes) {
+ DefaultBytes = other.DefaultBytes;
+ }
+ if (other.HasDefaultNestedEnum) {
+ DefaultNestedEnum = other.DefaultNestedEnum;
+ }
+ if (other.HasDefaultForeignEnum) {
+ DefaultForeignEnum = other.DefaultForeignEnum;
+ }
+ if (other.HasDefaultImportEnum) {
+ DefaultImportEnum = other.DefaultImportEnum;
+ }
+ if (other.HasDefaultStringPiece) {
+ DefaultStringPiece = other.DefaultStringPiece;
+ }
+ if (other.HasDefaultCord) {
+ DefaultCord = other.DefaultCord;
+ }
+ switch (other.OneofFieldCase) {
+ case OneofFieldOneofCase.OneofUint32:
+ OneofUint32 = other.OneofUint32;
+ break;
+ case OneofFieldOneofCase.OneofNestedMessage:
+ if (OneofNestedMessage == null) {
+ OneofNestedMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage();
+ }
+ OneofNestedMessage.MergeFrom(other.OneofNestedMessage);
+ break;
+ case OneofFieldOneofCase.OneofString:
+ OneofString = other.OneofString;
+ break;
+ case OneofFieldOneofCase.OneofBytes:
+ OneofBytes = other.OneofBytes;
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ OptionalInt32 = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ OptionalInt64 = input.ReadInt64();
+ break;
+ }
+ case 24: {
+ OptionalUint32 = input.ReadUInt32();
+ break;
+ }
+ case 32: {
+ OptionalUint64 = input.ReadUInt64();
+ break;
+ }
+ case 40: {
+ OptionalSint32 = input.ReadSInt32();
+ break;
+ }
+ case 48: {
+ OptionalSint64 = input.ReadSInt64();
+ break;
+ }
+ case 61: {
+ OptionalFixed32 = input.ReadFixed32();
+ break;
+ }
+ case 65: {
+ OptionalFixed64 = input.ReadFixed64();
+ break;
+ }
+ case 77: {
+ OptionalSfixed32 = input.ReadSFixed32();
+ break;
+ }
+ case 81: {
+ OptionalSfixed64 = input.ReadSFixed64();
+ break;
+ }
+ case 93: {
+ OptionalFloat = input.ReadFloat();
+ break;
+ }
+ case 97: {
+ OptionalDouble = input.ReadDouble();
+ break;
+ }
+ case 104: {
+ OptionalBool = input.ReadBool();
+ break;
+ }
+ case 114: {
+ OptionalString = input.ReadString();
+ break;
+ }
+ case 122: {
+ OptionalBytes = input.ReadBytes();
+ break;
+ }
+ case 131: {
+ if (!HasOptionalGroup) {
+ OptionalGroup = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.OptionalGroup();
+ }
+ input.ReadGroup(OptionalGroup);
+ break;
+ }
+ case 146: {
+ if (!HasOptionalNestedMessage) {
+ OptionalNestedMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage();
+ }
+ input.ReadMessage(OptionalNestedMessage);
+ break;
+ }
+ case 154: {
+ if (!HasOptionalForeignMessage) {
+ OptionalForeignMessage = new global::Google.Protobuf.TestProtos.Proto2.ForeignMessage();
+ }
+ input.ReadMessage(OptionalForeignMessage);
+ break;
+ }
+ case 162: {
+ if (!HasOptionalImportMessage) {
+ OptionalImportMessage = new global::Google.Protobuf.TestProtos.Proto2.ImportMessage();
+ }
+ input.ReadMessage(OptionalImportMessage);
+ break;
+ }
+ case 168: {
+ OptionalNestedEnum = (global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum) input.ReadEnum();
+ break;
+ }
+ case 176: {
+ OptionalForeignEnum = (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) input.ReadEnum();
+ break;
+ }
+ case 184: {
+ OptionalImportEnum = (global::Google.Protobuf.TestProtos.Proto2.ImportEnum) input.ReadEnum();
+ break;
+ }
+ case 194: {
+ OptionalStringPiece = input.ReadString();
+ break;
+ }
+ case 202: {
+ OptionalCord = input.ReadString();
+ break;
+ }
+ case 210: {
+ if (!HasOptionalPublicImportMessage) {
+ OptionalPublicImportMessage = new global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage();
+ }
+ input.ReadMessage(OptionalPublicImportMessage);
+ break;
+ }
+ case 218: {
+ if (!HasOptionalLazyMessage) {
+ OptionalLazyMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage();
+ }
+ input.ReadMessage(OptionalLazyMessage);
+ break;
+ }
+ case 250:
+ case 248: {
+ repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
+ break;
+ }
+ case 258:
+ case 256: {
+ repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
+ break;
+ }
+ case 266:
+ case 264: {
+ repeatedUint32_.AddEntriesFrom(input, _repeated_repeatedUint32_codec);
+ break;
+ }
+ case 274:
+ case 272: {
+ repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
+ break;
+ }
+ case 282:
+ case 280: {
+ repeatedSint32_.AddEntriesFrom(input, _repeated_repeatedSint32_codec);
+ break;
+ }
+ case 290:
+ case 288: {
+ repeatedSint64_.AddEntriesFrom(input, _repeated_repeatedSint64_codec);
+ break;
+ }
+ case 298:
+ case 301: {
+ repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
+ break;
+ }
+ case 306:
+ case 305: {
+ repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
+ break;
+ }
+ case 314:
+ case 317: {
+ repeatedSfixed32_.AddEntriesFrom(input, _repeated_repeatedSfixed32_codec);
+ break;
+ }
+ case 322:
+ case 321: {
+ repeatedSfixed64_.AddEntriesFrom(input, _repeated_repeatedSfixed64_codec);
+ break;
+ }
+ case 330:
+ case 333: {
+ repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
+ break;
+ }
+ case 338:
+ case 337: {
+ repeatedDouble_.AddEntriesFrom(input, _repeated_repeatedDouble_codec);
+ break;
+ }
+ case 346:
+ case 344: {
+ repeatedBool_.AddEntriesFrom(input, _repeated_repeatedBool_codec);
+ break;
+ }
+ case 354: {
+ repeatedString_.AddEntriesFrom(input, _repeated_repeatedString_codec);
+ break;
+ }
+ case 362: {
+ repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec);
+ break;
+ }
+ case 371: {
+ repeatedGroup_.AddEntriesFrom(input, _repeated_repeatedGroup_codec);
+ break;
+ }
+ case 386: {
+ repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNestedMessage_codec);
+ break;
+ }
+ case 394: {
+ repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_codec);
+ break;
+ }
+ case 402: {
+ repeatedImportMessage_.AddEntriesFrom(input, _repeated_repeatedImportMessage_codec);
+ break;
+ }
+ case 410:
+ case 408: {
+ repeatedNestedEnum_.AddEntriesFrom(input, _repeated_repeatedNestedEnum_codec);
+ break;
+ }
+ case 418:
+ case 416: {
+ repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeignEnum_codec);
+ break;
+ }
+ case 426:
+ case 424: {
+ repeatedImportEnum_.AddEntriesFrom(input, _repeated_repeatedImportEnum_codec);
+ break;
+ }
+ case 434: {
+ repeatedStringPiece_.AddEntriesFrom(input, _repeated_repeatedStringPiece_codec);
+ break;
+ }
+ case 442: {
+ repeatedCord_.AddEntriesFrom(input, _repeated_repeatedCord_codec);
+ break;
+ }
+ case 458: {
+ repeatedLazyMessage_.AddEntriesFrom(input, _repeated_repeatedLazyMessage_codec);
+ break;
+ }
+ case 488: {
+ DefaultInt32 = input.ReadInt32();
+ break;
+ }
+ case 496: {
+ DefaultInt64 = input.ReadInt64();
+ break;
+ }
+ case 504: {
+ DefaultUint32 = input.ReadUInt32();
+ break;
+ }
+ case 512: {
+ DefaultUint64 = input.ReadUInt64();
+ break;
+ }
+ case 520: {
+ DefaultSint32 = input.ReadSInt32();
+ break;
+ }
+ case 528: {
+ DefaultSint64 = input.ReadSInt64();
+ break;
+ }
+ case 541: {
+ DefaultFixed32 = input.ReadFixed32();
+ break;
+ }
+ case 545: {
+ DefaultFixed64 = input.ReadFixed64();
+ break;
+ }
+ case 557: {
+ DefaultSfixed32 = input.ReadSFixed32();
+ break;
+ }
+ case 561: {
+ DefaultSfixed64 = input.ReadSFixed64();
+ break;
+ }
+ case 573: {
+ DefaultFloat = input.ReadFloat();
+ break;
+ }
+ case 577: {
+ DefaultDouble = input.ReadDouble();
+ break;
+ }
+ case 584: {
+ DefaultBool = input.ReadBool();
+ break;
+ }
+ case 594: {
+ DefaultString = input.ReadString();
+ break;
+ }
+ case 602: {
+ DefaultBytes = input.ReadBytes();
+ break;
+ }
+ case 648: {
+ DefaultNestedEnum = (global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum) input.ReadEnum();
+ break;
+ }
+ case 656: {
+ DefaultForeignEnum = (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) input.ReadEnum();
+ break;
+ }
+ case 664: {
+ DefaultImportEnum = (global::Google.Protobuf.TestProtos.Proto2.ImportEnum) input.ReadEnum();
+ break;
+ }
+ case 674: {
+ DefaultStringPiece = input.ReadString();
+ break;
+ }
+ case 682: {
+ DefaultCord = input.ReadString();
+ break;
+ }
+ case 888: {
+ OneofUint32 = input.ReadUInt32();
+ break;
+ }
+ case 898: {
+ global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage subBuilder = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage();
+ if (HasOneofNestedMessage) {
+ subBuilder.MergeFrom(OneofNestedMessage);
+ }
+ input.ReadMessage(subBuilder);
+ OneofNestedMessage = subBuilder;
+ break;
+ }
+ case 906: {
+ OneofString = input.ReadString();
+ break;
+ }
+ case 914: {
+ OneofBytes = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestAllTypes message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public enum NestedEnum {
+ [pbr::OriginalName("FOO")] Foo = 1,
+ [pbr::OriginalName("BAR")] Bar = 2,
+ [pbr::OriginalName("BAZ")] Baz = 3,
+ /// <summary>
+ /// Intentionally negative.
+ /// </summary>
+ [pbr::OriginalName("NEG")] Neg = -1,
+ }
+
+ public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
+ private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage(NestedMessage other) : this() {
+ _hasBits0 = other._hasBits0;
+ bb_ = other.bb_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage Clone() {
+ return new NestedMessage(this);
+ }
+
+ /// <summary>Field number for the "bb" field.</summary>
+ public const int BbFieldNumber = 1;
+ private readonly static int BbDefaultValue = 0;
+
+ private int bb_;
+ /// <summary>
+ /// The field name "b" fails to compile in proto1 because it conflicts with
+ /// a local variable named "b" in one of the generated methods. Doh.
+ /// This file needs to compile in proto1 to test backwards-compatibility.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Bb {
+ get { if ((_hasBits0 & 1) != 0) { return bb_; } else { return BbDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ bb_ = value;
+ }
+ }
+ /// <summary>Gets whether the "bb" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBb {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "bb" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBb() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as NestedMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(NestedMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Bb != other.Bb) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasBb) hash ^= Bb.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasBb) {
+ output.WriteRawTag(8);
+ output.WriteInt32(Bb);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasBb) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(NestedMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasBb) {
+ Bb = other.Bb;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ Bb = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class OptionalGroup : pb::IMessage<OptionalGroup> {
+ private static readonly pb::MessageParser<OptionalGroup> _parser = new pb::MessageParser<OptionalGroup>(() => new OptionalGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<OptionalGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Descriptor.NestedTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup(OptionalGroup other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup Clone() {
+ return new OptionalGroup(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 17;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as OptionalGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(OptionalGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(136, 1);
+ output.WriteInt32(A);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(OptionalGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 132:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 136: {
+ A = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class RepeatedGroup : pb::IMessage<RepeatedGroup> {
+ private static readonly pb::MessageParser<RepeatedGroup> _parser = new pb::MessageParser<RepeatedGroup>(() => new RepeatedGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<RepeatedGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Descriptor.NestedTypes[2]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedGroup(RepeatedGroup other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedGroup Clone() {
+ return new RepeatedGroup(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 47;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as RepeatedGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(RepeatedGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(248, 2);
+ output.WriteInt32(A);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(RepeatedGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 372:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 376: {
+ A = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ /// <summary>
+ /// This proto includes a recusively nested message.
+ /// </summary>
+ public sealed partial class NestedTestAllTypes : pb::IMessage<NestedTestAllTypes> {
+ private static readonly pb::MessageParser<NestedTestAllTypes> _parser = new pb::MessageParser<NestedTestAllTypes>(() => new NestedTestAllTypes());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<NestedTestAllTypes> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedTestAllTypes() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedTestAllTypes(NestedTestAllTypes other) : this() {
+ child_ = other.HasChild ? other.child_.Clone() : null;
+ payload_ = other.HasPayload ? other.payload_.Clone() : null;
+ repeatedChild_ = other.repeatedChild_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedTestAllTypes Clone() {
+ return new NestedTestAllTypes(this);
+ }
+
+ /// <summary>Field number for the "child" field.</summary>
+ public const int ChildFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes child_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes Child {
+ get { return child_; }
+ set {
+ child_ = value;
+ }
+ }
+ /// <summary>Gets whether the child field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasChild {
+ get { return child_ != null; }
+ }
+ /// <summary>Clears the value of the child field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearChild() {
+ child_ = null;
+ }
+
+ /// <summary>Field number for the "payload" field.</summary>
+ public const int PayloadFieldNumber = 2;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes payload_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes Payload {
+ get { return payload_; }
+ set {
+ payload_ = value;
+ }
+ }
+ /// <summary>Gets whether the payload field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasPayload {
+ get { return payload_ != null; }
+ }
+ /// <summary>Clears the value of the payload field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearPayload() {
+ payload_ = null;
+ }
+
+ /// <summary>Field number for the "repeated_child" field.</summary>
+ public const int RepeatedChildFieldNumber = 3;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes> _repeated_repeatedChild_codec
+ = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes> repeatedChild_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes> RepeatedChild {
+ get { return repeatedChild_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as NestedTestAllTypes);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(NestedTestAllTypes other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(Child, other.Child)) return false;
+ if (!object.Equals(Payload, other.Payload)) return false;
+ if(!repeatedChild_.Equals(other.repeatedChild_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasChild) hash ^= Child.GetHashCode();
+ if (HasPayload) hash ^= Payload.GetHashCode();
+ hash ^= repeatedChild_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasChild) {
+ output.WriteRawTag(10);
+ output.WriteMessage(Child);
+ }
+ if (HasPayload) {
+ output.WriteRawTag(18);
+ output.WriteMessage(Payload);
+ }
+ repeatedChild_.WriteTo(output, _repeated_repeatedChild_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasChild) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Child);
+ }
+ if (HasPayload) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload);
+ }
+ size += repeatedChild_.CalculateSize(_repeated_repeatedChild_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(NestedTestAllTypes other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasChild) {
+ if (!HasChild) {
+ Child = new global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes();
+ }
+ Child.MergeFrom(other.Child);
+ }
+ if (other.HasPayload) {
+ if (!HasPayload) {
+ Payload = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ Payload.MergeFrom(other.Payload);
+ }
+ repeatedChild_.Add(other.repeatedChild_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasChild) {
+ Child = new global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes();
+ }
+ input.ReadMessage(Child);
+ break;
+ }
+ case 18: {
+ if (!HasPayload) {
+ Payload = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ input.ReadMessage(Payload);
+ break;
+ }
+ case 26: {
+ repeatedChild_.AddEntriesFrom(input, _repeated_repeatedChild_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class TestDeprecatedFields : pb::IMessage<TestDeprecatedFields> {
+ private static readonly pb::MessageParser<TestDeprecatedFields> _parser = new pb::MessageParser<TestDeprecatedFields>(() => new TestDeprecatedFields());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestDeprecatedFields> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[2]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDeprecatedFields() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDeprecatedFields(TestDeprecatedFields other) : this() {
+ _hasBits0 = other._hasBits0;
+ deprecatedInt32_ = other.deprecatedInt32_;
+ switch (other.OneofFieldsCase) {
+ case OneofFieldsOneofCase.DeprecatedInt32InOneof:
+ DeprecatedInt32InOneof = other.DeprecatedInt32InOneof;
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDeprecatedFields Clone() {
+ return new TestDeprecatedFields(this);
+ }
+
+ /// <summary>Field number for the "deprecated_int32" field.</summary>
+ public const int DeprecatedInt32FieldNumber = 1;
+ private readonly static int DeprecatedInt32DefaultValue = 0;
+
+ private int deprecatedInt32_;
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int DeprecatedInt32 {
+ get { if ((_hasBits0 & 1) != 0) { return deprecatedInt32_; } else { return DeprecatedInt32DefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ deprecatedInt32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "deprecated_int32" field is set</summary>
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDeprecatedInt32 {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "deprecated_int32" field</summary>
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDeprecatedInt32() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "deprecated_int32_in_oneof" field.</summary>
+ public const int DeprecatedInt32InOneofFieldNumber = 2;
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int DeprecatedInt32InOneof {
+ get { return HasDeprecatedInt32InOneof ? (int) oneofFields_ : 0; }
+ set {
+ oneofFields_ = value;
+ oneofFieldsCase_ = OneofFieldsOneofCase.DeprecatedInt32InOneof;
+ }
+ }
+ /// <summary>Gets whether the "deprecated_int32_in_oneof" field is set</summary>
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDeprecatedInt32InOneof {
+ get { return oneofFieldsCase_ == OneofFieldsOneofCase.DeprecatedInt32InOneof; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "deprecated_int32_in_oneof" </summary>
+ [global::System.ObsoleteAttribute]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDeprecatedInt32InOneof() {
+ if (HasDeprecatedInt32InOneof) {
+ ClearOneofFields();
+ }
+ }
+
+ private object oneofFields_;
+ /// <summary>Enum of possible cases for the "oneof_fields" oneof.</summary>
+ public enum OneofFieldsOneofCase {
+ None = 0,
+ DeprecatedInt32InOneof = 2,
+ }
+ private OneofFieldsOneofCase oneofFieldsCase_ = OneofFieldsOneofCase.None;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OneofFieldsOneofCase OneofFieldsCase {
+ get { return oneofFieldsCase_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofFields() {
+ oneofFieldsCase_ = OneofFieldsOneofCase.None;
+ oneofFields_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestDeprecatedFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestDeprecatedFields other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (DeprecatedInt32 != other.DeprecatedInt32) return false;
+ if (DeprecatedInt32InOneof != other.DeprecatedInt32InOneof) return false;
+ if (OneofFieldsCase != other.OneofFieldsCase) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasDeprecatedInt32) hash ^= DeprecatedInt32.GetHashCode();
+ if (HasDeprecatedInt32InOneof) hash ^= DeprecatedInt32InOneof.GetHashCode();
+ hash ^= (int) oneofFieldsCase_;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasDeprecatedInt32) {
+ output.WriteRawTag(8);
+ output.WriteInt32(DeprecatedInt32);
+ }
+ if (HasDeprecatedInt32InOneof) {
+ output.WriteRawTag(16);
+ output.WriteInt32(DeprecatedInt32InOneof);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasDeprecatedInt32) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeprecatedInt32);
+ }
+ if (HasDeprecatedInt32InOneof) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeprecatedInt32InOneof);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestDeprecatedFields other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasDeprecatedInt32) {
+ DeprecatedInt32 = other.DeprecatedInt32;
+ }
+ switch (other.OneofFieldsCase) {
+ case OneofFieldsOneofCase.DeprecatedInt32InOneof:
+ DeprecatedInt32InOneof = other.DeprecatedInt32InOneof;
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ DeprecatedInt32 = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ DeprecatedInt32InOneof = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ [global::System.ObsoleteAttribute]
+ public sealed partial class TestDeprecatedMessage : pb::IMessage<TestDeprecatedMessage> {
+ private static readonly pb::MessageParser<TestDeprecatedMessage> _parser = new pb::MessageParser<TestDeprecatedMessage>(() => new TestDeprecatedMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestDeprecatedMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[3]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDeprecatedMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDeprecatedMessage(TestDeprecatedMessage other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDeprecatedMessage Clone() {
+ return new TestDeprecatedMessage(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestDeprecatedMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestDeprecatedMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestDeprecatedMessage other) {
+ if (other == null) {
+ return;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Define these after TestAllTypes to make sure the compiler can handle
+ /// that.
+ /// </summary>
+ public sealed partial class ForeignMessage : pb::IMessage<ForeignMessage> {
+ private static readonly pb::MessageParser<ForeignMessage> _parser = new pb::MessageParser<ForeignMessage>(() => new ForeignMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<ForeignMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[4]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ForeignMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ForeignMessage(ForeignMessage other) : this() {
+ _hasBits0 = other._hasBits0;
+ c_ = other.c_;
+ d_ = other.d_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ForeignMessage Clone() {
+ return new ForeignMessage(this);
+ }
+
+ /// <summary>Field number for the "c" field.</summary>
+ public const int CFieldNumber = 1;
+ private readonly static int CDefaultValue = 0;
+
+ private int c_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int C {
+ get { if ((_hasBits0 & 1) != 0) { return c_; } else { return CDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ c_ = value;
+ }
+ }
+ /// <summary>Gets whether the "c" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasC {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "c" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearC() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "d" field.</summary>
+ public const int DFieldNumber = 2;
+ private readonly static int DDefaultValue = 0;
+
+ private int d_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int D {
+ get { if ((_hasBits0 & 2) != 0) { return d_; } else { return DDefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ d_ = value;
+ }
+ }
+ /// <summary>Gets whether the "d" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasD {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "d" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearD() {
+ _hasBits0 &= ~2;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ForeignMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ForeignMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (C != other.C) return false;
+ if (D != other.D) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasC) hash ^= C.GetHashCode();
+ if (HasD) hash ^= D.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasC) {
+ output.WriteRawTag(8);
+ output.WriteInt32(C);
+ }
+ if (HasD) {
+ output.WriteRawTag(16);
+ output.WriteInt32(D);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasC) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(C);
+ }
+ if (HasD) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(D);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ForeignMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasC) {
+ C = other.C;
+ }
+ if (other.HasD) {
+ D = other.D;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ C = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ D = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class TestReservedFields : pb::IMessage<TestReservedFields> {
+ private static readonly pb::MessageParser<TestReservedFields> _parser = new pb::MessageParser<TestReservedFields>(() => new TestReservedFields());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestReservedFields> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[5]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestReservedFields() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestReservedFields(TestReservedFields other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestReservedFields Clone() {
+ return new TestReservedFields(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestReservedFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestReservedFields other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestReservedFields other) {
+ if (other == null) {
+ return;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class TestAllExtensions : pb::IExtensionMessage<TestAllExtensions> {
+ private static readonly pb::MessageParser<TestAllExtensions> _parser = new pb::MessageParser<TestAllExtensions>(() => new TestAllExtensions());
+ private pb::UnknownFieldSet _unknownFields;
+ private pb::ExtensionSet<TestAllExtensions> _extensions;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestAllExtensions> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[6]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestAllExtensions() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestAllExtensions(TestAllExtensions other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ _extensions = pb::ExtensionSet.Clone(other._extensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestAllExtensions Clone() {
+ return new TestAllExtensions(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestAllExtensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestAllExtensions other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!Equals(_extensions, other._extensions)) {
+ return false;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_extensions != null) {
+ hash ^= _extensions.GetHashCode();
+ }
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_extensions != null) {
+ _extensions.WriteTo(output);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_extensions != null) {
+ size += _extensions.CalculateSize();
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestAllExtensions other) {
+ if (other == null) {
+ return;
+ }
+ pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ }
+ break;
+ }
+ }
+ }
+
+ public void RegisterExtension(pb::Extension extension) {
+ pb::ExtensionSet.Register(ref _extensions, extension);
+ }
+ public TValue GetExtension<TValue>(pb::Extension<TestAllExtensions, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TestAllExtensions, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public void SetExtension<TValue>(pb::Extension<TestAllExtensions, TValue> extension, TValue value) {
+ pb::ExtensionSet.Set(ref _extensions, extension, value);
+ }
+ public bool HasExtension<TValue>(pb::Extension<TestAllExtensions, TValue> extension) {
+ return pb::ExtensionSet.Has(ref _extensions, extension);
+ }
+ public void ClearExtension<TValue>(pb::Extension<TestAllExtensions, TValue> extension) {
+ pb::ExtensionSet.Clear(ref _extensions, extension);
+ }
+
+ }
+
+ public sealed partial class OptionalGroup_extension : pb::IMessage<OptionalGroup_extension> {
+ private static readonly pb::MessageParser<OptionalGroup_extension> _parser = new pb::MessageParser<OptionalGroup_extension>(() => new OptionalGroup_extension());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<OptionalGroup_extension> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[7]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup_extension() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup_extension(OptionalGroup_extension other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup_extension Clone() {
+ return new OptionalGroup_extension(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 17;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as OptionalGroup_extension);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(OptionalGroup_extension other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(136, 1);
+ output.WriteInt32(A);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(OptionalGroup_extension other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 136: {
+ A = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class RepeatedGroup_extension : pb::IMessage<RepeatedGroup_extension> {
+ private static readonly pb::MessageParser<RepeatedGroup_extension> _parser = new pb::MessageParser<RepeatedGroup_extension>(() => new RepeatedGroup_extension());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<RepeatedGroup_extension> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[8]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedGroup_extension() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedGroup_extension(RepeatedGroup_extension other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedGroup_extension Clone() {
+ return new RepeatedGroup_extension(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 47;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as RepeatedGroup_extension);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(RepeatedGroup_extension other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(248, 2);
+ output.WriteInt32(A);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(RepeatedGroup_extension other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 376: {
+ A = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class TestGroup : pb::IMessage<TestGroup> {
+ private static readonly pb::MessageParser<TestGroup> _parser = new pb::MessageParser<TestGroup>(() => new TestGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[9]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestGroup(TestGroup other) : this() {
+ _hasBits0 = other._hasBits0;
+ optionalGroup_ = other.HasOptionalGroup ? other.optionalGroup_.Clone() : null;
+ optionalForeignEnum_ = other.optionalForeignEnum_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestGroup Clone() {
+ return new TestGroup(this);
+ }
+
+ /// <summary>Field number for the "optionalgroup" field.</summary>
+ public const int OptionalGroupFieldNumber = 16;
+ private global::Google.Protobuf.TestProtos.Proto2.TestGroup.Types.OptionalGroup optionalGroup_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestGroup.Types.OptionalGroup OptionalGroup {
+ get { return optionalGroup_; }
+ set {
+ optionalGroup_ = value;
+ }
+ }
+ /// <summary>Gets whether the optionalgroup field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalGroup {
+ get { return optionalGroup_ != null; }
+ }
+ /// <summary>Clears the value of the optionalgroup field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalGroup() {
+ optionalGroup_ = null;
+ }
+
+ /// <summary>Field number for the "optional_foreign_enum" field.</summary>
+ public const int OptionalForeignEnumFieldNumber = 22;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.ForeignEnum OptionalForeignEnumDefaultValue = global::Google.Protobuf.TestProtos.Proto2.ForeignEnum.ForeignFoo;
+
+ private global::Google.Protobuf.TestProtos.Proto2.ForeignEnum optionalForeignEnum_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ForeignEnum OptionalForeignEnum {
+ get { if ((_hasBits0 & 1) != 0) { return optionalForeignEnum_; } else { return OptionalForeignEnumDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ optionalForeignEnum_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_foreign_enum" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalForeignEnum {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_foreign_enum" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalForeignEnum() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(OptionalGroup, other.OptionalGroup)) return false;
+ if (OptionalForeignEnum != other.OptionalForeignEnum) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasOptionalGroup) hash ^= OptionalGroup.GetHashCode();
+ if (HasOptionalForeignEnum) hash ^= OptionalForeignEnum.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasOptionalGroup) {
+ output.WriteRawTag(131, 1);
+ output.WriteGroup(OptionalGroup);
+ output.WriteRawTag(132, 1);
+ }
+ if (HasOptionalForeignEnum) {
+ output.WriteRawTag(176, 1);
+ output.WriteEnum((int) OptionalForeignEnum);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasOptionalGroup) {
+ size += 4 + pb::CodedOutputStream.ComputeGroupSize(OptionalGroup);
+ }
+ if (HasOptionalForeignEnum) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalForeignEnum);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasOptionalGroup) {
+ if (!HasOptionalGroup) {
+ OptionalGroup = new global::Google.Protobuf.TestProtos.Proto2.TestGroup.Types.OptionalGroup();
+ }
+ OptionalGroup.MergeFrom(other.OptionalGroup);
+ }
+ if (other.HasOptionalForeignEnum) {
+ OptionalForeignEnum = other.OptionalForeignEnum;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 131: {
+ if (!HasOptionalGroup) {
+ OptionalGroup = new global::Google.Protobuf.TestProtos.Proto2.TestGroup.Types.OptionalGroup();
+ }
+ input.ReadGroup(OptionalGroup);
+ break;
+ }
+ case 176: {
+ OptionalForeignEnum = (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) input.ReadEnum();
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestGroup message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class OptionalGroup : pb::IMessage<OptionalGroup> {
+ private static readonly pb::MessageParser<OptionalGroup> _parser = new pb::MessageParser<OptionalGroup>(() => new OptionalGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<OptionalGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestGroup.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup(OptionalGroup other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup Clone() {
+ return new OptionalGroup(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 17;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as OptionalGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(OptionalGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(136, 1);
+ output.WriteInt32(A);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(OptionalGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 132:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 136: {
+ A = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestGroupExtension : pb::IExtensionMessage<TestGroupExtension> {
+ private static readonly pb::MessageParser<TestGroupExtension> _parser = new pb::MessageParser<TestGroupExtension>(() => new TestGroupExtension());
+ private pb::UnknownFieldSet _unknownFields;
+ private pb::ExtensionSet<TestGroupExtension> _extensions;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestGroupExtension> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[10]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestGroupExtension() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestGroupExtension(TestGroupExtension other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ _extensions = pb::ExtensionSet.Clone(other._extensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestGroupExtension Clone() {
+ return new TestGroupExtension(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestGroupExtension);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestGroupExtension other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!Equals(_extensions, other._extensions)) {
+ return false;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_extensions != null) {
+ hash ^= _extensions.GetHashCode();
+ }
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_extensions != null) {
+ _extensions.WriteTo(output);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_extensions != null) {
+ size += _extensions.CalculateSize();
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestGroupExtension other) {
+ if (other == null) {
+ return;
+ }
+ pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ }
+ break;
+ }
+ }
+ }
+
+ public void RegisterExtension(pb::Extension extension) {
+ pb::ExtensionSet.Register(ref _extensions, extension);
+ }
+ public TValue GetExtension<TValue>(pb::Extension<TestGroupExtension, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TestGroupExtension, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public void SetExtension<TValue>(pb::Extension<TestGroupExtension, TValue> extension, TValue value) {
+ pb::ExtensionSet.Set(ref _extensions, extension, value);
+ }
+ public bool HasExtension<TValue>(pb::Extension<TestGroupExtension, TValue> extension) {
+ return pb::ExtensionSet.Has(ref _extensions, extension);
+ }
+ public void ClearExtension<TValue>(pb::Extension<TestGroupExtension, TValue> extension) {
+ pb::ExtensionSet.Clear(ref _extensions, extension);
+ }
+
+ }
+
+ public sealed partial class TestNestedExtension : pb::IMessage<TestNestedExtension> {
+ private static readonly pb::MessageParser<TestNestedExtension> _parser = new pb::MessageParser<TestNestedExtension>(() => new TestNestedExtension());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestNestedExtension> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[11]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestNestedExtension() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestNestedExtension(TestNestedExtension other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestNestedExtension Clone() {
+ return new TestNestedExtension(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestNestedExtension);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestNestedExtension other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestNestedExtension other) {
+ if (other == null) {
+ return;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestNestedExtension message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class OptionalGroup_extension : pb::IMessage<OptionalGroup_extension> {
+ private static readonly pb::MessageParser<OptionalGroup_extension> _parser = new pb::MessageParser<OptionalGroup_extension>(() => new OptionalGroup_extension());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<OptionalGroup_extension> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup_extension() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup_extension(OptionalGroup_extension other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup_extension Clone() {
+ return new OptionalGroup_extension(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 17;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as OptionalGroup_extension);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(OptionalGroup_extension other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(136, 1);
+ output.WriteInt32(A);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(OptionalGroup_extension other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 136: {
+ A = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ #region Extensions
+ /// <summary>Container for extensions for other messages declared in the TestNestedExtension message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Extensions {
+ /// <summary>
+ /// Check for bug where string extensions declared in tested scope did not
+ /// compile.
+ /// </summary>
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> Test =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(1002, pb::FieldCodec.ForString(8018, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +dGVzdA== +"))));
+ /// <summary>
+ /// Used to test if generated extension name is correct when there are
+ /// underscores.
+ /// </summary>
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string> NestedStringExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, string>(1003, pb::FieldCodec.ForString(8026, ""));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestGroupExtension, global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Types.OptionalGroup_extension> OptionalGroupExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestGroupExtension, global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Types.OptionalGroup_extension>(16, pb::FieldCodec.ForGroup(131, 132, global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Types.OptionalGroup_extension.Parser));
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestGroupExtension, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> OptionalForeignEnumExtension =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestGroupExtension, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum>(22, pb::FieldCodec.ForEnum(176, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum.ForeignFoo));
+ }
+ #endregion
+
+ }
+
+ /// <summary>
+ /// We have separate messages for testing required fields because it's
+ /// annoying to have to fill in required fields in TestProto in order to
+ /// do anything with it. Note that we don't need to test every type of
+ /// required filed because the code output is basically identical to
+ /// optional fields for all types.
+ /// </summary>
+ public sealed partial class TestRequired : pb::IMessage<TestRequired> {
+ private static readonly pb::MessageParser<TestRequired> _parser = new pb::MessageParser<TestRequired>(() => new TestRequired());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ private int _hasBits1;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestRequired> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[12]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequired() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequired(TestRequired other) : this() {
+ _hasBits0 = other._hasBits0;
+ _hasBits1 = other._hasBits1;
+ a_ = other.a_;
+ dummy2_ = other.dummy2_;
+ b_ = other.b_;
+ dummy4_ = other.dummy4_;
+ dummy5_ = other.dummy5_;
+ dummy6_ = other.dummy6_;
+ dummy7_ = other.dummy7_;
+ dummy8_ = other.dummy8_;
+ dummy9_ = other.dummy9_;
+ dummy10_ = other.dummy10_;
+ dummy11_ = other.dummy11_;
+ dummy12_ = other.dummy12_;
+ dummy13_ = other.dummy13_;
+ dummy14_ = other.dummy14_;
+ dummy15_ = other.dummy15_;
+ dummy16_ = other.dummy16_;
+ dummy17_ = other.dummy17_;
+ dummy18_ = other.dummy18_;
+ dummy19_ = other.dummy19_;
+ dummy20_ = other.dummy20_;
+ dummy21_ = other.dummy21_;
+ dummy22_ = other.dummy22_;
+ dummy23_ = other.dummy23_;
+ dummy24_ = other.dummy24_;
+ dummy25_ = other.dummy25_;
+ dummy26_ = other.dummy26_;
+ dummy27_ = other.dummy27_;
+ dummy28_ = other.dummy28_;
+ dummy29_ = other.dummy29_;
+ dummy30_ = other.dummy30_;
+ dummy31_ = other.dummy31_;
+ dummy32_ = other.dummy32_;
+ c_ = other.c_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequired Clone() {
+ return new TestRequired(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 1;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "dummy2" field.</summary>
+ public const int Dummy2FieldNumber = 2;
+ private readonly static int Dummy2DefaultValue = 0;
+
+ private int dummy2_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy2 {
+ get { if ((_hasBits0 & 2) != 0) { return dummy2_; } else { return Dummy2DefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ dummy2_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy2" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy2 {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy2" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy2() {
+ _hasBits0 &= ~2;
+ }
+
+ /// <summary>Field number for the "b" field.</summary>
+ public const int BFieldNumber = 3;
+ private readonly static int BDefaultValue = 0;
+
+ private int b_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int B {
+ get { if ((_hasBits0 & 4) != 0) { return b_; } else { return BDefaultValue; } }
+ set {
+ _hasBits0 |= 4;
+ b_ = value;
+ }
+ }
+ /// <summary>Gets whether the "b" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasB {
+ get { return (_hasBits0 & 4) != 0; }
+ }
+ /// <summary>Clears the value of the "b" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearB() {
+ _hasBits0 &= ~4;
+ }
+
+ /// <summary>Field number for the "dummy4" field.</summary>
+ public const int Dummy4FieldNumber = 4;
+ private readonly static int Dummy4DefaultValue = 0;
+
+ private int dummy4_;
+ /// <summary>
+ /// Pad the field count to 32 so that we can test that IsInitialized()
+ /// properly checks multiple elements of has_bits_.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy4 {
+ get { if ((_hasBits0 & 8) != 0) { return dummy4_; } else { return Dummy4DefaultValue; } }
+ set {
+ _hasBits0 |= 8;
+ dummy4_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy4" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy4 {
+ get { return (_hasBits0 & 8) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy4" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy4() {
+ _hasBits0 &= ~8;
+ }
+
+ /// <summary>Field number for the "dummy5" field.</summary>
+ public const int Dummy5FieldNumber = 5;
+ private readonly static int Dummy5DefaultValue = 0;
+
+ private int dummy5_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy5 {
+ get { if ((_hasBits0 & 16) != 0) { return dummy5_; } else { return Dummy5DefaultValue; } }
+ set {
+ _hasBits0 |= 16;
+ dummy5_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy5" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy5 {
+ get { return (_hasBits0 & 16) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy5" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy5() {
+ _hasBits0 &= ~16;
+ }
+
+ /// <summary>Field number for the "dummy6" field.</summary>
+ public const int Dummy6FieldNumber = 6;
+ private readonly static int Dummy6DefaultValue = 0;
+
+ private int dummy6_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy6 {
+ get { if ((_hasBits0 & 32) != 0) { return dummy6_; } else { return Dummy6DefaultValue; } }
+ set {
+ _hasBits0 |= 32;
+ dummy6_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy6" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy6 {
+ get { return (_hasBits0 & 32) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy6" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy6() {
+ _hasBits0 &= ~32;
+ }
+
+ /// <summary>Field number for the "dummy7" field.</summary>
+ public const int Dummy7FieldNumber = 7;
+ private readonly static int Dummy7DefaultValue = 0;
+
+ private int dummy7_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy7 {
+ get { if ((_hasBits0 & 64) != 0) { return dummy7_; } else { return Dummy7DefaultValue; } }
+ set {
+ _hasBits0 |= 64;
+ dummy7_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy7" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy7 {
+ get { return (_hasBits0 & 64) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy7" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy7() {
+ _hasBits0 &= ~64;
+ }
+
+ /// <summary>Field number for the "dummy8" field.</summary>
+ public const int Dummy8FieldNumber = 8;
+ private readonly static int Dummy8DefaultValue = 0;
+
+ private int dummy8_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy8 {
+ get { if ((_hasBits0 & 128) != 0) { return dummy8_; } else { return Dummy8DefaultValue; } }
+ set {
+ _hasBits0 |= 128;
+ dummy8_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy8" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy8 {
+ get { return (_hasBits0 & 128) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy8" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy8() {
+ _hasBits0 &= ~128;
+ }
+
+ /// <summary>Field number for the "dummy9" field.</summary>
+ public const int Dummy9FieldNumber = 9;
+ private readonly static int Dummy9DefaultValue = 0;
+
+ private int dummy9_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy9 {
+ get { if ((_hasBits0 & 256) != 0) { return dummy9_; } else { return Dummy9DefaultValue; } }
+ set {
+ _hasBits0 |= 256;
+ dummy9_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy9" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy9 {
+ get { return (_hasBits0 & 256) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy9" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy9() {
+ _hasBits0 &= ~256;
+ }
+
+ /// <summary>Field number for the "dummy10" field.</summary>
+ public const int Dummy10FieldNumber = 10;
+ private readonly static int Dummy10DefaultValue = 0;
+
+ private int dummy10_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy10 {
+ get { if ((_hasBits0 & 512) != 0) { return dummy10_; } else { return Dummy10DefaultValue; } }
+ set {
+ _hasBits0 |= 512;
+ dummy10_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy10" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy10 {
+ get { return (_hasBits0 & 512) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy10" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy10() {
+ _hasBits0 &= ~512;
+ }
+
+ /// <summary>Field number for the "dummy11" field.</summary>
+ public const int Dummy11FieldNumber = 11;
+ private readonly static int Dummy11DefaultValue = 0;
+
+ private int dummy11_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy11 {
+ get { if ((_hasBits0 & 1024) != 0) { return dummy11_; } else { return Dummy11DefaultValue; } }
+ set {
+ _hasBits0 |= 1024;
+ dummy11_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy11" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy11 {
+ get { return (_hasBits0 & 1024) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy11" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy11() {
+ _hasBits0 &= ~1024;
+ }
+
+ /// <summary>Field number for the "dummy12" field.</summary>
+ public const int Dummy12FieldNumber = 12;
+ private readonly static int Dummy12DefaultValue = 0;
+
+ private int dummy12_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy12 {
+ get { if ((_hasBits0 & 2048) != 0) { return dummy12_; } else { return Dummy12DefaultValue; } }
+ set {
+ _hasBits0 |= 2048;
+ dummy12_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy12" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy12 {
+ get { return (_hasBits0 & 2048) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy12" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy12() {
+ _hasBits0 &= ~2048;
+ }
+
+ /// <summary>Field number for the "dummy13" field.</summary>
+ public const int Dummy13FieldNumber = 13;
+ private readonly static int Dummy13DefaultValue = 0;
+
+ private int dummy13_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy13 {
+ get { if ((_hasBits0 & 4096) != 0) { return dummy13_; } else { return Dummy13DefaultValue; } }
+ set {
+ _hasBits0 |= 4096;
+ dummy13_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy13" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy13 {
+ get { return (_hasBits0 & 4096) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy13" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy13() {
+ _hasBits0 &= ~4096;
+ }
+
+ /// <summary>Field number for the "dummy14" field.</summary>
+ public const int Dummy14FieldNumber = 14;
+ private readonly static int Dummy14DefaultValue = 0;
+
+ private int dummy14_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy14 {
+ get { if ((_hasBits0 & 8192) != 0) { return dummy14_; } else { return Dummy14DefaultValue; } }
+ set {
+ _hasBits0 |= 8192;
+ dummy14_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy14" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy14 {
+ get { return (_hasBits0 & 8192) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy14" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy14() {
+ _hasBits0 &= ~8192;
+ }
+
+ /// <summary>Field number for the "dummy15" field.</summary>
+ public const int Dummy15FieldNumber = 15;
+ private readonly static int Dummy15DefaultValue = 0;
+
+ private int dummy15_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy15 {
+ get { if ((_hasBits0 & 16384) != 0) { return dummy15_; } else { return Dummy15DefaultValue; } }
+ set {
+ _hasBits0 |= 16384;
+ dummy15_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy15" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy15 {
+ get { return (_hasBits0 & 16384) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy15" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy15() {
+ _hasBits0 &= ~16384;
+ }
+
+ /// <summary>Field number for the "dummy16" field.</summary>
+ public const int Dummy16FieldNumber = 16;
+ private readonly static int Dummy16DefaultValue = 0;
+
+ private int dummy16_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy16 {
+ get { if ((_hasBits0 & 32768) != 0) { return dummy16_; } else { return Dummy16DefaultValue; } }
+ set {
+ _hasBits0 |= 32768;
+ dummy16_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy16" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy16 {
+ get { return (_hasBits0 & 32768) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy16" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy16() {
+ _hasBits0 &= ~32768;
+ }
+
+ /// <summary>Field number for the "dummy17" field.</summary>
+ public const int Dummy17FieldNumber = 17;
+ private readonly static int Dummy17DefaultValue = 0;
+
+ private int dummy17_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy17 {
+ get { if ((_hasBits0 & 65536) != 0) { return dummy17_; } else { return Dummy17DefaultValue; } }
+ set {
+ _hasBits0 |= 65536;
+ dummy17_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy17" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy17 {
+ get { return (_hasBits0 & 65536) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy17" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy17() {
+ _hasBits0 &= ~65536;
+ }
+
+ /// <summary>Field number for the "dummy18" field.</summary>
+ public const int Dummy18FieldNumber = 18;
+ private readonly static int Dummy18DefaultValue = 0;
+
+ private int dummy18_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy18 {
+ get { if ((_hasBits0 & 131072) != 0) { return dummy18_; } else { return Dummy18DefaultValue; } }
+ set {
+ _hasBits0 |= 131072;
+ dummy18_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy18" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy18 {
+ get { return (_hasBits0 & 131072) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy18" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy18() {
+ _hasBits0 &= ~131072;
+ }
+
+ /// <summary>Field number for the "dummy19" field.</summary>
+ public const int Dummy19FieldNumber = 19;
+ private readonly static int Dummy19DefaultValue = 0;
+
+ private int dummy19_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy19 {
+ get { if ((_hasBits0 & 262144) != 0) { return dummy19_; } else { return Dummy19DefaultValue; } }
+ set {
+ _hasBits0 |= 262144;
+ dummy19_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy19" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy19 {
+ get { return (_hasBits0 & 262144) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy19" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy19() {
+ _hasBits0 &= ~262144;
+ }
+
+ /// <summary>Field number for the "dummy20" field.</summary>
+ public const int Dummy20FieldNumber = 20;
+ private readonly static int Dummy20DefaultValue = 0;
+
+ private int dummy20_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy20 {
+ get { if ((_hasBits0 & 524288) != 0) { return dummy20_; } else { return Dummy20DefaultValue; } }
+ set {
+ _hasBits0 |= 524288;
+ dummy20_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy20" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy20 {
+ get { return (_hasBits0 & 524288) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy20" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy20() {
+ _hasBits0 &= ~524288;
+ }
+
+ /// <summary>Field number for the "dummy21" field.</summary>
+ public const int Dummy21FieldNumber = 21;
+ private readonly static int Dummy21DefaultValue = 0;
+
+ private int dummy21_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy21 {
+ get { if ((_hasBits0 & 1048576) != 0) { return dummy21_; } else { return Dummy21DefaultValue; } }
+ set {
+ _hasBits0 |= 1048576;
+ dummy21_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy21" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy21 {
+ get { return (_hasBits0 & 1048576) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy21" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy21() {
+ _hasBits0 &= ~1048576;
+ }
+
+ /// <summary>Field number for the "dummy22" field.</summary>
+ public const int Dummy22FieldNumber = 22;
+ private readonly static int Dummy22DefaultValue = 0;
+
+ private int dummy22_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy22 {
+ get { if ((_hasBits0 & 2097152) != 0) { return dummy22_; } else { return Dummy22DefaultValue; } }
+ set {
+ _hasBits0 |= 2097152;
+ dummy22_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy22" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy22 {
+ get { return (_hasBits0 & 2097152) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy22" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy22() {
+ _hasBits0 &= ~2097152;
+ }
+
+ /// <summary>Field number for the "dummy23" field.</summary>
+ public const int Dummy23FieldNumber = 23;
+ private readonly static int Dummy23DefaultValue = 0;
+
+ private int dummy23_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy23 {
+ get { if ((_hasBits0 & 4194304) != 0) { return dummy23_; } else { return Dummy23DefaultValue; } }
+ set {
+ _hasBits0 |= 4194304;
+ dummy23_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy23" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy23 {
+ get { return (_hasBits0 & 4194304) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy23" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy23() {
+ _hasBits0 &= ~4194304;
+ }
+
+ /// <summary>Field number for the "dummy24" field.</summary>
+ public const int Dummy24FieldNumber = 24;
+ private readonly static int Dummy24DefaultValue = 0;
+
+ private int dummy24_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy24 {
+ get { if ((_hasBits0 & 8388608) != 0) { return dummy24_; } else { return Dummy24DefaultValue; } }
+ set {
+ _hasBits0 |= 8388608;
+ dummy24_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy24" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy24 {
+ get { return (_hasBits0 & 8388608) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy24" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy24() {
+ _hasBits0 &= ~8388608;
+ }
+
+ /// <summary>Field number for the "dummy25" field.</summary>
+ public const int Dummy25FieldNumber = 25;
+ private readonly static int Dummy25DefaultValue = 0;
+
+ private int dummy25_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy25 {
+ get { if ((_hasBits0 & 16777216) != 0) { return dummy25_; } else { return Dummy25DefaultValue; } }
+ set {
+ _hasBits0 |= 16777216;
+ dummy25_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy25" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy25 {
+ get { return (_hasBits0 & 16777216) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy25" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy25() {
+ _hasBits0 &= ~16777216;
+ }
+
+ /// <summary>Field number for the "dummy26" field.</summary>
+ public const int Dummy26FieldNumber = 26;
+ private readonly static int Dummy26DefaultValue = 0;
+
+ private int dummy26_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy26 {
+ get { if ((_hasBits0 & 33554432) != 0) { return dummy26_; } else { return Dummy26DefaultValue; } }
+ set {
+ _hasBits0 |= 33554432;
+ dummy26_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy26" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy26 {
+ get { return (_hasBits0 & 33554432) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy26" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy26() {
+ _hasBits0 &= ~33554432;
+ }
+
+ /// <summary>Field number for the "dummy27" field.</summary>
+ public const int Dummy27FieldNumber = 27;
+ private readonly static int Dummy27DefaultValue = 0;
+
+ private int dummy27_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy27 {
+ get { if ((_hasBits0 & 67108864) != 0) { return dummy27_; } else { return Dummy27DefaultValue; } }
+ set {
+ _hasBits0 |= 67108864;
+ dummy27_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy27" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy27 {
+ get { return (_hasBits0 & 67108864) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy27" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy27() {
+ _hasBits0 &= ~67108864;
+ }
+
+ /// <summary>Field number for the "dummy28" field.</summary>
+ public const int Dummy28FieldNumber = 28;
+ private readonly static int Dummy28DefaultValue = 0;
+
+ private int dummy28_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy28 {
+ get { if ((_hasBits0 & 134217728) != 0) { return dummy28_; } else { return Dummy28DefaultValue; } }
+ set {
+ _hasBits0 |= 134217728;
+ dummy28_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy28" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy28 {
+ get { return (_hasBits0 & 134217728) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy28" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy28() {
+ _hasBits0 &= ~134217728;
+ }
+
+ /// <summary>Field number for the "dummy29" field.</summary>
+ public const int Dummy29FieldNumber = 29;
+ private readonly static int Dummy29DefaultValue = 0;
+
+ private int dummy29_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy29 {
+ get { if ((_hasBits0 & 268435456) != 0) { return dummy29_; } else { return Dummy29DefaultValue; } }
+ set {
+ _hasBits0 |= 268435456;
+ dummy29_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy29" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy29 {
+ get { return (_hasBits0 & 268435456) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy29" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy29() {
+ _hasBits0 &= ~268435456;
+ }
+
+ /// <summary>Field number for the "dummy30" field.</summary>
+ public const int Dummy30FieldNumber = 30;
+ private readonly static int Dummy30DefaultValue = 0;
+
+ private int dummy30_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy30 {
+ get { if ((_hasBits0 & 536870912) != 0) { return dummy30_; } else { return Dummy30DefaultValue; } }
+ set {
+ _hasBits0 |= 536870912;
+ dummy30_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy30" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy30 {
+ get { return (_hasBits0 & 536870912) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy30" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy30() {
+ _hasBits0 &= ~536870912;
+ }
+
+ /// <summary>Field number for the "dummy31" field.</summary>
+ public const int Dummy31FieldNumber = 31;
+ private readonly static int Dummy31DefaultValue = 0;
+
+ private int dummy31_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy31 {
+ get { if ((_hasBits0 & 1073741824) != 0) { return dummy31_; } else { return Dummy31DefaultValue; } }
+ set {
+ _hasBits0 |= 1073741824;
+ dummy31_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy31" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy31 {
+ get { return (_hasBits0 & 1073741824) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy31" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy31() {
+ _hasBits0 &= ~1073741824;
+ }
+
+ /// <summary>Field number for the "dummy32" field.</summary>
+ public const int Dummy32FieldNumber = 32;
+ private readonly static int Dummy32DefaultValue = 0;
+
+ private int dummy32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy32 {
+ get { if ((_hasBits0 & -2147483648) != 0) { return dummy32_; } else { return Dummy32DefaultValue; } }
+ set {
+ _hasBits0 |= -2147483648;
+ dummy32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy32 {
+ get { return (_hasBits0 & -2147483648) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy32() {
+ _hasBits0 &= ~-2147483648;
+ }
+
+ /// <summary>Field number for the "c" field.</summary>
+ public const int CFieldNumber = 33;
+ private readonly static int CDefaultValue = 0;
+
+ private int c_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int C {
+ get { if ((_hasBits1 & 1) != 0) { return c_; } else { return CDefaultValue; } }
+ set {
+ _hasBits1 |= 1;
+ c_ = value;
+ }
+ }
+ /// <summary>Gets whether the "c" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasC {
+ get { return (_hasBits1 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "c" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearC() {
+ _hasBits1 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestRequired);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestRequired other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ if (Dummy2 != other.Dummy2) return false;
+ if (B != other.B) return false;
+ if (Dummy4 != other.Dummy4) return false;
+ if (Dummy5 != other.Dummy5) return false;
+ if (Dummy6 != other.Dummy6) return false;
+ if (Dummy7 != other.Dummy7) return false;
+ if (Dummy8 != other.Dummy8) return false;
+ if (Dummy9 != other.Dummy9) return false;
+ if (Dummy10 != other.Dummy10) return false;
+ if (Dummy11 != other.Dummy11) return false;
+ if (Dummy12 != other.Dummy12) return false;
+ if (Dummy13 != other.Dummy13) return false;
+ if (Dummy14 != other.Dummy14) return false;
+ if (Dummy15 != other.Dummy15) return false;
+ if (Dummy16 != other.Dummy16) return false;
+ if (Dummy17 != other.Dummy17) return false;
+ if (Dummy18 != other.Dummy18) return false;
+ if (Dummy19 != other.Dummy19) return false;
+ if (Dummy20 != other.Dummy20) return false;
+ if (Dummy21 != other.Dummy21) return false;
+ if (Dummy22 != other.Dummy22) return false;
+ if (Dummy23 != other.Dummy23) return false;
+ if (Dummy24 != other.Dummy24) return false;
+ if (Dummy25 != other.Dummy25) return false;
+ if (Dummy26 != other.Dummy26) return false;
+ if (Dummy27 != other.Dummy27) return false;
+ if (Dummy28 != other.Dummy28) return false;
+ if (Dummy29 != other.Dummy29) return false;
+ if (Dummy30 != other.Dummy30) return false;
+ if (Dummy31 != other.Dummy31) return false;
+ if (Dummy32 != other.Dummy32) return false;
+ if (C != other.C) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (HasDummy2) hash ^= Dummy2.GetHashCode();
+ if (HasB) hash ^= B.GetHashCode();
+ if (HasDummy4) hash ^= Dummy4.GetHashCode();
+ if (HasDummy5) hash ^= Dummy5.GetHashCode();
+ if (HasDummy6) hash ^= Dummy6.GetHashCode();
+ if (HasDummy7) hash ^= Dummy7.GetHashCode();
+ if (HasDummy8) hash ^= Dummy8.GetHashCode();
+ if (HasDummy9) hash ^= Dummy9.GetHashCode();
+ if (HasDummy10) hash ^= Dummy10.GetHashCode();
+ if (HasDummy11) hash ^= Dummy11.GetHashCode();
+ if (HasDummy12) hash ^= Dummy12.GetHashCode();
+ if (HasDummy13) hash ^= Dummy13.GetHashCode();
+ if (HasDummy14) hash ^= Dummy14.GetHashCode();
+ if (HasDummy15) hash ^= Dummy15.GetHashCode();
+ if (HasDummy16) hash ^= Dummy16.GetHashCode();
+ if (HasDummy17) hash ^= Dummy17.GetHashCode();
+ if (HasDummy18) hash ^= Dummy18.GetHashCode();
+ if (HasDummy19) hash ^= Dummy19.GetHashCode();
+ if (HasDummy20) hash ^= Dummy20.GetHashCode();
+ if (HasDummy21) hash ^= Dummy21.GetHashCode();
+ if (HasDummy22) hash ^= Dummy22.GetHashCode();
+ if (HasDummy23) hash ^= Dummy23.GetHashCode();
+ if (HasDummy24) hash ^= Dummy24.GetHashCode();
+ if (HasDummy25) hash ^= Dummy25.GetHashCode();
+ if (HasDummy26) hash ^= Dummy26.GetHashCode();
+ if (HasDummy27) hash ^= Dummy27.GetHashCode();
+ if (HasDummy28) hash ^= Dummy28.GetHashCode();
+ if (HasDummy29) hash ^= Dummy29.GetHashCode();
+ if (HasDummy30) hash ^= Dummy30.GetHashCode();
+ if (HasDummy31) hash ^= Dummy31.GetHashCode();
+ if (HasDummy32) hash ^= Dummy32.GetHashCode();
+ if (HasC) hash ^= C.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(8);
+ output.WriteInt32(A);
+ }
+ if (HasDummy2) {
+ output.WriteRawTag(16);
+ output.WriteInt32(Dummy2);
+ }
+ if (HasB) {
+ output.WriteRawTag(24);
+ output.WriteInt32(B);
+ }
+ if (HasDummy4) {
+ output.WriteRawTag(32);
+ output.WriteInt32(Dummy4);
+ }
+ if (HasDummy5) {
+ output.WriteRawTag(40);
+ output.WriteInt32(Dummy5);
+ }
+ if (HasDummy6) {
+ output.WriteRawTag(48);
+ output.WriteInt32(Dummy6);
+ }
+ if (HasDummy7) {
+ output.WriteRawTag(56);
+ output.WriteInt32(Dummy7);
+ }
+ if (HasDummy8) {
+ output.WriteRawTag(64);
+ output.WriteInt32(Dummy8);
+ }
+ if (HasDummy9) {
+ output.WriteRawTag(72);
+ output.WriteInt32(Dummy9);
+ }
+ if (HasDummy10) {
+ output.WriteRawTag(80);
+ output.WriteInt32(Dummy10);
+ }
+ if (HasDummy11) {
+ output.WriteRawTag(88);
+ output.WriteInt32(Dummy11);
+ }
+ if (HasDummy12) {
+ output.WriteRawTag(96);
+ output.WriteInt32(Dummy12);
+ }
+ if (HasDummy13) {
+ output.WriteRawTag(104);
+ output.WriteInt32(Dummy13);
+ }
+ if (HasDummy14) {
+ output.WriteRawTag(112);
+ output.WriteInt32(Dummy14);
+ }
+ if (HasDummy15) {
+ output.WriteRawTag(120);
+ output.WriteInt32(Dummy15);
+ }
+ if (HasDummy16) {
+ output.WriteRawTag(128, 1);
+ output.WriteInt32(Dummy16);
+ }
+ if (HasDummy17) {
+ output.WriteRawTag(136, 1);
+ output.WriteInt32(Dummy17);
+ }
+ if (HasDummy18) {
+ output.WriteRawTag(144, 1);
+ output.WriteInt32(Dummy18);
+ }
+ if (HasDummy19) {
+ output.WriteRawTag(152, 1);
+ output.WriteInt32(Dummy19);
+ }
+ if (HasDummy20) {
+ output.WriteRawTag(160, 1);
+ output.WriteInt32(Dummy20);
+ }
+ if (HasDummy21) {
+ output.WriteRawTag(168, 1);
+ output.WriteInt32(Dummy21);
+ }
+ if (HasDummy22) {
+ output.WriteRawTag(176, 1);
+ output.WriteInt32(Dummy22);
+ }
+ if (HasDummy23) {
+ output.WriteRawTag(184, 1);
+ output.WriteInt32(Dummy23);
+ }
+ if (HasDummy24) {
+ output.WriteRawTag(192, 1);
+ output.WriteInt32(Dummy24);
+ }
+ if (HasDummy25) {
+ output.WriteRawTag(200, 1);
+ output.WriteInt32(Dummy25);
+ }
+ if (HasDummy26) {
+ output.WriteRawTag(208, 1);
+ output.WriteInt32(Dummy26);
+ }
+ if (HasDummy27) {
+ output.WriteRawTag(216, 1);
+ output.WriteInt32(Dummy27);
+ }
+ if (HasDummy28) {
+ output.WriteRawTag(224, 1);
+ output.WriteInt32(Dummy28);
+ }
+ if (HasDummy29) {
+ output.WriteRawTag(232, 1);
+ output.WriteInt32(Dummy29);
+ }
+ if (HasDummy30) {
+ output.WriteRawTag(240, 1);
+ output.WriteInt32(Dummy30);
+ }
+ if (HasDummy31) {
+ output.WriteRawTag(248, 1);
+ output.WriteInt32(Dummy31);
+ }
+ if (HasDummy32) {
+ output.WriteRawTag(128, 2);
+ output.WriteInt32(Dummy32);
+ }
+ if (HasC) {
+ output.WriteRawTag(136, 2);
+ output.WriteInt32(C);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (HasDummy2) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy2);
+ }
+ if (HasB) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(B);
+ }
+ if (HasDummy4) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy4);
+ }
+ if (HasDummy5) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy5);
+ }
+ if (HasDummy6) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy6);
+ }
+ if (HasDummy7) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy7);
+ }
+ if (HasDummy8) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy8);
+ }
+ if (HasDummy9) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy9);
+ }
+ if (HasDummy10) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy10);
+ }
+ if (HasDummy11) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy11);
+ }
+ if (HasDummy12) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy12);
+ }
+ if (HasDummy13) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy13);
+ }
+ if (HasDummy14) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy14);
+ }
+ if (HasDummy15) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy15);
+ }
+ if (HasDummy16) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy16);
+ }
+ if (HasDummy17) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy17);
+ }
+ if (HasDummy18) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy18);
+ }
+ if (HasDummy19) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy19);
+ }
+ if (HasDummy20) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy20);
+ }
+ if (HasDummy21) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy21);
+ }
+ if (HasDummy22) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy22);
+ }
+ if (HasDummy23) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy23);
+ }
+ if (HasDummy24) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy24);
+ }
+ if (HasDummy25) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy25);
+ }
+ if (HasDummy26) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy26);
+ }
+ if (HasDummy27) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy27);
+ }
+ if (HasDummy28) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy28);
+ }
+ if (HasDummy29) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy29);
+ }
+ if (HasDummy30) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy30);
+ }
+ if (HasDummy31) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy31);
+ }
+ if (HasDummy32) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Dummy32);
+ }
+ if (HasC) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(C);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestRequired other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasDummy2) {
+ Dummy2 = other.Dummy2;
+ }
+ if (other.HasB) {
+ B = other.B;
+ }
+ if (other.HasDummy4) {
+ Dummy4 = other.Dummy4;
+ }
+ if (other.HasDummy5) {
+ Dummy5 = other.Dummy5;
+ }
+ if (other.HasDummy6) {
+ Dummy6 = other.Dummy6;
+ }
+ if (other.HasDummy7) {
+ Dummy7 = other.Dummy7;
+ }
+ if (other.HasDummy8) {
+ Dummy8 = other.Dummy8;
+ }
+ if (other.HasDummy9) {
+ Dummy9 = other.Dummy9;
+ }
+ if (other.HasDummy10) {
+ Dummy10 = other.Dummy10;
+ }
+ if (other.HasDummy11) {
+ Dummy11 = other.Dummy11;
+ }
+ if (other.HasDummy12) {
+ Dummy12 = other.Dummy12;
+ }
+ if (other.HasDummy13) {
+ Dummy13 = other.Dummy13;
+ }
+ if (other.HasDummy14) {
+ Dummy14 = other.Dummy14;
+ }
+ if (other.HasDummy15) {
+ Dummy15 = other.Dummy15;
+ }
+ if (other.HasDummy16) {
+ Dummy16 = other.Dummy16;
+ }
+ if (other.HasDummy17) {
+ Dummy17 = other.Dummy17;
+ }
+ if (other.HasDummy18) {
+ Dummy18 = other.Dummy18;
+ }
+ if (other.HasDummy19) {
+ Dummy19 = other.Dummy19;
+ }
+ if (other.HasDummy20) {
+ Dummy20 = other.Dummy20;
+ }
+ if (other.HasDummy21) {
+ Dummy21 = other.Dummy21;
+ }
+ if (other.HasDummy22) {
+ Dummy22 = other.Dummy22;
+ }
+ if (other.HasDummy23) {
+ Dummy23 = other.Dummy23;
+ }
+ if (other.HasDummy24) {
+ Dummy24 = other.Dummy24;
+ }
+ if (other.HasDummy25) {
+ Dummy25 = other.Dummy25;
+ }
+ if (other.HasDummy26) {
+ Dummy26 = other.Dummy26;
+ }
+ if (other.HasDummy27) {
+ Dummy27 = other.Dummy27;
+ }
+ if (other.HasDummy28) {
+ Dummy28 = other.Dummy28;
+ }
+ if (other.HasDummy29) {
+ Dummy29 = other.Dummy29;
+ }
+ if (other.HasDummy30) {
+ Dummy30 = other.Dummy30;
+ }
+ if (other.HasDummy31) {
+ Dummy31 = other.Dummy31;
+ }
+ if (other.HasDummy32) {
+ Dummy32 = other.Dummy32;
+ }
+ if (other.HasC) {
+ C = other.C;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ A = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ Dummy2 = input.ReadInt32();
+ break;
+ }
+ case 24: {
+ B = input.ReadInt32();
+ break;
+ }
+ case 32: {
+ Dummy4 = input.ReadInt32();
+ break;
+ }
+ case 40: {
+ Dummy5 = input.ReadInt32();
+ break;
+ }
+ case 48: {
+ Dummy6 = input.ReadInt32();
+ break;
+ }
+ case 56: {
+ Dummy7 = input.ReadInt32();
+ break;
+ }
+ case 64: {
+ Dummy8 = input.ReadInt32();
+ break;
+ }
+ case 72: {
+ Dummy9 = input.ReadInt32();
+ break;
+ }
+ case 80: {
+ Dummy10 = input.ReadInt32();
+ break;
+ }
+ case 88: {
+ Dummy11 = input.ReadInt32();
+ break;
+ }
+ case 96: {
+ Dummy12 = input.ReadInt32();
+ break;
+ }
+ case 104: {
+ Dummy13 = input.ReadInt32();
+ break;
+ }
+ case 112: {
+ Dummy14 = input.ReadInt32();
+ break;
+ }
+ case 120: {
+ Dummy15 = input.ReadInt32();
+ break;
+ }
+ case 128: {
+ Dummy16 = input.ReadInt32();
+ break;
+ }
+ case 136: {
+ Dummy17 = input.ReadInt32();
+ break;
+ }
+ case 144: {
+ Dummy18 = input.ReadInt32();
+ break;
+ }
+ case 152: {
+ Dummy19 = input.ReadInt32();
+ break;
+ }
+ case 160: {
+ Dummy20 = input.ReadInt32();
+ break;
+ }
+ case 168: {
+ Dummy21 = input.ReadInt32();
+ break;
+ }
+ case 176: {
+ Dummy22 = input.ReadInt32();
+ break;
+ }
+ case 184: {
+ Dummy23 = input.ReadInt32();
+ break;
+ }
+ case 192: {
+ Dummy24 = input.ReadInt32();
+ break;
+ }
+ case 200: {
+ Dummy25 = input.ReadInt32();
+ break;
+ }
+ case 208: {
+ Dummy26 = input.ReadInt32();
+ break;
+ }
+ case 216: {
+ Dummy27 = input.ReadInt32();
+ break;
+ }
+ case 224: {
+ Dummy28 = input.ReadInt32();
+ break;
+ }
+ case 232: {
+ Dummy29 = input.ReadInt32();
+ break;
+ }
+ case 240: {
+ Dummy30 = input.ReadInt32();
+ break;
+ }
+ case 248: {
+ Dummy31 = input.ReadInt32();
+ break;
+ }
+ case 256: {
+ Dummy32 = input.ReadInt32();
+ break;
+ }
+ case 264: {
+ C = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ #region Extensions
+ /// <summary>Container for extensions for other messages declared in the TestRequired message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Extensions {
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestRequired> Single =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestRequired>(1000, pb::FieldCodec.ForMessage(8002, global::Google.Protobuf.TestProtos.Proto2.TestRequired.Parser));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestRequired> Multi =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, global::Google.Protobuf.TestProtos.Proto2.TestRequired>(1001, pb::FieldCodec.ForMessage(8010, global::Google.Protobuf.TestProtos.Proto2.TestRequired.Parser));
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestRequiredForeign : pb::IMessage<TestRequiredForeign> {
+ private static readonly pb::MessageParser<TestRequiredForeign> _parser = new pb::MessageParser<TestRequiredForeign>(() => new TestRequiredForeign());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestRequiredForeign> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[13]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequiredForeign() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequiredForeign(TestRequiredForeign other) : this() {
+ _hasBits0 = other._hasBits0;
+ optionalMessage_ = other.HasOptionalMessage ? other.optionalMessage_.Clone() : null;
+ repeatedMessage_ = other.repeatedMessage_.Clone();
+ dummy_ = other.dummy_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequiredForeign Clone() {
+ return new TestRequiredForeign(this);
+ }
+
+ /// <summary>Field number for the "optional_message" field.</summary>
+ public const int OptionalMessageFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestRequired optionalMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestRequired OptionalMessage {
+ get { return optionalMessage_; }
+ set {
+ optionalMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalMessage {
+ get { return optionalMessage_ != null; }
+ }
+ /// <summary>Clears the value of the optional_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalMessage() {
+ optionalMessage_ = null;
+ }
+
+ /// <summary>Field number for the "repeated_message" field.</summary>
+ public const int RepeatedMessageFieldNumber = 2;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestRequired> _repeated_repeatedMessage_codec
+ = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.Proto2.TestRequired.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestRequired> repeatedMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestRequired>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestRequired> RepeatedMessage {
+ get { return repeatedMessage_; }
+ }
+
+ /// <summary>Field number for the "dummy" field.</summary>
+ public const int DummyFieldNumber = 3;
+ private readonly static int DummyDefaultValue = 0;
+
+ private int dummy_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Dummy {
+ get { if ((_hasBits0 & 1) != 0) { return dummy_; } else { return DummyDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ dummy_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dummy" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDummy {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "dummy" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDummy() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestRequiredForeign);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestRequiredForeign other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(OptionalMessage, other.OptionalMessage)) return false;
+ if(!repeatedMessage_.Equals(other.repeatedMessage_)) return false;
+ if (Dummy != other.Dummy) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasOptionalMessage) hash ^= OptionalMessage.GetHashCode();
+ hash ^= repeatedMessage_.GetHashCode();
+ if (HasDummy) hash ^= Dummy.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasOptionalMessage) {
+ output.WriteRawTag(10);
+ output.WriteMessage(OptionalMessage);
+ }
+ repeatedMessage_.WriteTo(output, _repeated_repeatedMessage_codec);
+ if (HasDummy) {
+ output.WriteRawTag(24);
+ output.WriteInt32(Dummy);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasOptionalMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(OptionalMessage);
+ }
+ size += repeatedMessage_.CalculateSize(_repeated_repeatedMessage_codec);
+ if (HasDummy) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Dummy);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestRequiredForeign other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasOptionalMessage) {
+ if (!HasOptionalMessage) {
+ OptionalMessage = new global::Google.Protobuf.TestProtos.Proto2.TestRequired();
+ }
+ OptionalMessage.MergeFrom(other.OptionalMessage);
+ }
+ repeatedMessage_.Add(other.repeatedMessage_);
+ if (other.HasDummy) {
+ Dummy = other.Dummy;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasOptionalMessage) {
+ OptionalMessage = new global::Google.Protobuf.TestProtos.Proto2.TestRequired();
+ }
+ input.ReadMessage(OptionalMessage);
+ break;
+ }
+ case 18: {
+ repeatedMessage_.AddEntriesFrom(input, _repeated_repeatedMessage_codec);
+ break;
+ }
+ case 24: {
+ Dummy = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class TestRequiredMessage : pb::IMessage<TestRequiredMessage> {
+ private static readonly pb::MessageParser<TestRequiredMessage> _parser = new pb::MessageParser<TestRequiredMessage>(() => new TestRequiredMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestRequiredMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[14]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequiredMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequiredMessage(TestRequiredMessage other) : this() {
+ optionalMessage_ = other.HasOptionalMessage ? other.optionalMessage_.Clone() : null;
+ repeatedMessage_ = other.repeatedMessage_.Clone();
+ requiredMessage_ = other.HasRequiredMessage ? other.requiredMessage_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequiredMessage Clone() {
+ return new TestRequiredMessage(this);
+ }
+
+ /// <summary>Field number for the "optional_message" field.</summary>
+ public const int OptionalMessageFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestRequired optionalMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestRequired OptionalMessage {
+ get { return optionalMessage_; }
+ set {
+ optionalMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalMessage {
+ get { return optionalMessage_ != null; }
+ }
+ /// <summary>Clears the value of the optional_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalMessage() {
+ optionalMessage_ = null;
+ }
+
+ /// <summary>Field number for the "repeated_message" field.</summary>
+ public const int RepeatedMessageFieldNumber = 2;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestRequired> _repeated_repeatedMessage_codec
+ = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.Proto2.TestRequired.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestRequired> repeatedMessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestRequired>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestRequired> RepeatedMessage {
+ get { return repeatedMessage_; }
+ }
+
+ /// <summary>Field number for the "required_message" field.</summary>
+ public const int RequiredMessageFieldNumber = 3;
+ private global::Google.Protobuf.TestProtos.Proto2.TestRequired requiredMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestRequired RequiredMessage {
+ get { return requiredMessage_; }
+ set {
+ requiredMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the required_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasRequiredMessage {
+ get { return requiredMessage_ != null; }
+ }
+ /// <summary>Clears the value of the required_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearRequiredMessage() {
+ requiredMessage_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestRequiredMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestRequiredMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(OptionalMessage, other.OptionalMessage)) return false;
+ if(!repeatedMessage_.Equals(other.repeatedMessage_)) return false;
+ if (!object.Equals(RequiredMessage, other.RequiredMessage)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasOptionalMessage) hash ^= OptionalMessage.GetHashCode();
+ hash ^= repeatedMessage_.GetHashCode();
+ if (HasRequiredMessage) hash ^= RequiredMessage.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasOptionalMessage) {
+ output.WriteRawTag(10);
+ output.WriteMessage(OptionalMessage);
+ }
+ repeatedMessage_.WriteTo(output, _repeated_repeatedMessage_codec);
+ if (HasRequiredMessage) {
+ output.WriteRawTag(26);
+ output.WriteMessage(RequiredMessage);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasOptionalMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(OptionalMessage);
+ }
+ size += repeatedMessage_.CalculateSize(_repeated_repeatedMessage_codec);
+ if (HasRequiredMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(RequiredMessage);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestRequiredMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasOptionalMessage) {
+ if (!HasOptionalMessage) {
+ OptionalMessage = new global::Google.Protobuf.TestProtos.Proto2.TestRequired();
+ }
+ OptionalMessage.MergeFrom(other.OptionalMessage);
+ }
+ repeatedMessage_.Add(other.repeatedMessage_);
+ if (other.HasRequiredMessage) {
+ if (!HasRequiredMessage) {
+ RequiredMessage = new global::Google.Protobuf.TestProtos.Proto2.TestRequired();
+ }
+ RequiredMessage.MergeFrom(other.RequiredMessage);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasOptionalMessage) {
+ OptionalMessage = new global::Google.Protobuf.TestProtos.Proto2.TestRequired();
+ }
+ input.ReadMessage(OptionalMessage);
+ break;
+ }
+ case 18: {
+ repeatedMessage_.AddEntriesFrom(input, _repeated_repeatedMessage_codec);
+ break;
+ }
+ case 26: {
+ if (!HasRequiredMessage) {
+ RequiredMessage = new global::Google.Protobuf.TestProtos.Proto2.TestRequired();
+ }
+ input.ReadMessage(RequiredMessage);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Test that we can use NestedMessage from outside TestAllTypes.
+ /// </summary>
+ public sealed partial class TestForeignNested : pb::IMessage<TestForeignNested> {
+ private static readonly pb::MessageParser<TestForeignNested> _parser = new pb::MessageParser<TestForeignNested>(() => new TestForeignNested());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestForeignNested> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[15]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestForeignNested() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestForeignNested(TestForeignNested other) : this() {
+ foreignNested_ = other.HasForeignNested ? other.foreignNested_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestForeignNested Clone() {
+ return new TestForeignNested(this);
+ }
+
+ /// <summary>Field number for the "foreign_nested" field.</summary>
+ public const int ForeignNestedFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage foreignNested_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage ForeignNested {
+ get { return foreignNested_; }
+ set {
+ foreignNested_ = value;
+ }
+ }
+ /// <summary>Gets whether the foreign_nested field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasForeignNested {
+ get { return foreignNested_ != null; }
+ }
+ /// <summary>Clears the value of the foreign_nested field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearForeignNested() {
+ foreignNested_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestForeignNested);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestForeignNested other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(ForeignNested, other.ForeignNested)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasForeignNested) hash ^= ForeignNested.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasForeignNested) {
+ output.WriteRawTag(10);
+ output.WriteMessage(ForeignNested);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasForeignNested) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(ForeignNested);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestForeignNested other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasForeignNested) {
+ if (!HasForeignNested) {
+ ForeignNested = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage();
+ }
+ ForeignNested.MergeFrom(other.ForeignNested);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasForeignNested) {
+ ForeignNested = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage();
+ }
+ input.ReadMessage(ForeignNested);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// TestEmptyMessage is used to test unknown field support.
+ /// </summary>
+ public sealed partial class TestEmptyMessage : pb::IMessage<TestEmptyMessage> {
+ private static readonly pb::MessageParser<TestEmptyMessage> _parser = new pb::MessageParser<TestEmptyMessage>(() => new TestEmptyMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestEmptyMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[16]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestEmptyMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestEmptyMessage(TestEmptyMessage other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestEmptyMessage Clone() {
+ return new TestEmptyMessage(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestEmptyMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestEmptyMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestEmptyMessage other) {
+ if (other == null) {
+ return;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Like above, but declare all field numbers as potential extensions. No
+ /// actual extensions should ever be defined for this type.
+ /// </summary>
+ public sealed partial class TestEmptyMessageWithExtensions : pb::IExtensionMessage<TestEmptyMessageWithExtensions> {
+ private static readonly pb::MessageParser<TestEmptyMessageWithExtensions> _parser = new pb::MessageParser<TestEmptyMessageWithExtensions>(() => new TestEmptyMessageWithExtensions());
+ private pb::UnknownFieldSet _unknownFields;
+ private pb::ExtensionSet<TestEmptyMessageWithExtensions> _extensions;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestEmptyMessageWithExtensions> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[17]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestEmptyMessageWithExtensions() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestEmptyMessageWithExtensions(TestEmptyMessageWithExtensions other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ _extensions = pb::ExtensionSet.Clone(other._extensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestEmptyMessageWithExtensions Clone() {
+ return new TestEmptyMessageWithExtensions(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestEmptyMessageWithExtensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestEmptyMessageWithExtensions other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!Equals(_extensions, other._extensions)) {
+ return false;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_extensions != null) {
+ hash ^= _extensions.GetHashCode();
+ }
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_extensions != null) {
+ _extensions.WriteTo(output);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_extensions != null) {
+ size += _extensions.CalculateSize();
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestEmptyMessageWithExtensions other) {
+ if (other == null) {
+ return;
+ }
+ pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ }
+ break;
+ }
+ }
+ }
+
+ public void RegisterExtension(pb::Extension extension) {
+ pb::ExtensionSet.Register(ref _extensions, extension);
+ }
+ public TValue GetExtension<TValue>(pb::Extension<TestEmptyMessageWithExtensions, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TestEmptyMessageWithExtensions, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public void SetExtension<TValue>(pb::Extension<TestEmptyMessageWithExtensions, TValue> extension, TValue value) {
+ pb::ExtensionSet.Set(ref _extensions, extension, value);
+ }
+ public bool HasExtension<TValue>(pb::Extension<TestEmptyMessageWithExtensions, TValue> extension) {
+ return pb::ExtensionSet.Has(ref _extensions, extension);
+ }
+ public void ClearExtension<TValue>(pb::Extension<TestEmptyMessageWithExtensions, TValue> extension) {
+ pb::ExtensionSet.Clear(ref _extensions, extension);
+ }
+
+ }
+
+ public sealed partial class TestMultipleExtensionRanges : pb::IExtensionMessage<TestMultipleExtensionRanges> {
+ private static readonly pb::MessageParser<TestMultipleExtensionRanges> _parser = new pb::MessageParser<TestMultipleExtensionRanges>(() => new TestMultipleExtensionRanges());
+ private pb::UnknownFieldSet _unknownFields;
+ private pb::ExtensionSet<TestMultipleExtensionRanges> _extensions;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestMultipleExtensionRanges> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[18]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestMultipleExtensionRanges() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestMultipleExtensionRanges(TestMultipleExtensionRanges other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ _extensions = pb::ExtensionSet.Clone(other._extensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestMultipleExtensionRanges Clone() {
+ return new TestMultipleExtensionRanges(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestMultipleExtensionRanges);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestMultipleExtensionRanges other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!Equals(_extensions, other._extensions)) {
+ return false;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_extensions != null) {
+ hash ^= _extensions.GetHashCode();
+ }
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_extensions != null) {
+ _extensions.WriteTo(output);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_extensions != null) {
+ size += _extensions.CalculateSize();
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestMultipleExtensionRanges other) {
+ if (other == null) {
+ return;
+ }
+ pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ }
+ break;
+ }
+ }
+ }
+
+ public void RegisterExtension(pb::Extension extension) {
+ pb::ExtensionSet.Register(ref _extensions, extension);
+ }
+ public TValue GetExtension<TValue>(pb::Extension<TestMultipleExtensionRanges, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TestMultipleExtensionRanges, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public void SetExtension<TValue>(pb::Extension<TestMultipleExtensionRanges, TValue> extension, TValue value) {
+ pb::ExtensionSet.Set(ref _extensions, extension, value);
+ }
+ public bool HasExtension<TValue>(pb::Extension<TestMultipleExtensionRanges, TValue> extension) {
+ return pb::ExtensionSet.Has(ref _extensions, extension);
+ }
+ public void ClearExtension<TValue>(pb::Extension<TestMultipleExtensionRanges, TValue> extension) {
+ pb::ExtensionSet.Clear(ref _extensions, extension);
+ }
+
+ }
+
+ /// <summary>
+ /// Test that really large tag numbers don't break anything.
+ /// </summary>
+ public sealed partial class TestReallyLargeTagNumber : pb::IMessage<TestReallyLargeTagNumber> {
+ private static readonly pb::MessageParser<TestReallyLargeTagNumber> _parser = new pb::MessageParser<TestReallyLargeTagNumber>(() => new TestReallyLargeTagNumber());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestReallyLargeTagNumber> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[19]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestReallyLargeTagNumber() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestReallyLargeTagNumber(TestReallyLargeTagNumber other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ bb_ = other.bb_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestReallyLargeTagNumber Clone() {
+ return new TestReallyLargeTagNumber(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 1;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ /// <summary>
+ /// The largest possible tag number is 2^28 - 1, since the wire format uses
+ /// three bits to communicate wire type.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "bb" field.</summary>
+ public const int BbFieldNumber = 268435455;
+ private readonly static int BbDefaultValue = 0;
+
+ private int bb_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Bb {
+ get { if ((_hasBits0 & 2) != 0) { return bb_; } else { return BbDefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ bb_ = value;
+ }
+ }
+ /// <summary>Gets whether the "bb" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBb {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "bb" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBb() {
+ _hasBits0 &= ~2;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestReallyLargeTagNumber);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestReallyLargeTagNumber other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ if (Bb != other.Bb) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (HasBb) hash ^= Bb.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(8);
+ output.WriteInt32(A);
+ }
+ if (HasBb) {
+ output.WriteRawTag(248, 255, 255, 255, 7);
+ output.WriteInt32(Bb);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (HasBb) {
+ size += 5 + pb::CodedOutputStream.ComputeInt32Size(Bb);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestReallyLargeTagNumber other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasBb) {
+ Bb = other.Bb;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ A = input.ReadInt32();
+ break;
+ }
+ case 2147483640: {
+ Bb = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class TestRecursiveMessage : pb::IMessage<TestRecursiveMessage> {
+ private static readonly pb::MessageParser<TestRecursiveMessage> _parser = new pb::MessageParser<TestRecursiveMessage>(() => new TestRecursiveMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestRecursiveMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[20]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRecursiveMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRecursiveMessage(TestRecursiveMessage other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.HasA ? other.a_.Clone() : null;
+ i_ = other.i_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRecursiveMessage Clone() {
+ return new TestRecursiveMessage(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestRecursiveMessage a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestRecursiveMessage A {
+ get { return a_; }
+ set {
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the a field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return a_ != null; }
+ }
+ /// <summary>Clears the value of the a field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ a_ = null;
+ }
+
+ /// <summary>Field number for the "i" field.</summary>
+ public const int IFieldNumber = 2;
+ private readonly static int IDefaultValue = 0;
+
+ private int i_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int I {
+ get { if ((_hasBits0 & 1) != 0) { return i_; } else { return IDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ i_ = value;
+ }
+ }
+ /// <summary>Gets whether the "i" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasI {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "i" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearI() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestRecursiveMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestRecursiveMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(A, other.A)) return false;
+ if (I != other.I) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (HasI) hash ^= I.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(10);
+ output.WriteMessage(A);
+ }
+ if (HasI) {
+ output.WriteRawTag(16);
+ output.WriteInt32(I);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(A);
+ }
+ if (HasI) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(I);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestRecursiveMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ if (!HasA) {
+ A = new global::Google.Protobuf.TestProtos.Proto2.TestRecursiveMessage();
+ }
+ A.MergeFrom(other.A);
+ }
+ if (other.HasI) {
+ I = other.I;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasA) {
+ A = new global::Google.Protobuf.TestProtos.Proto2.TestRecursiveMessage();
+ }
+ input.ReadMessage(A);
+ break;
+ }
+ case 16: {
+ I = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Test that mutual recursion works.
+ /// </summary>
+ public sealed partial class TestMutualRecursionA : pb::IMessage<TestMutualRecursionA> {
+ private static readonly pb::MessageParser<TestMutualRecursionA> _parser = new pb::MessageParser<TestMutualRecursionA>(() => new TestMutualRecursionA());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestMutualRecursionA> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[21]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestMutualRecursionA() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestMutualRecursionA(TestMutualRecursionA other) : this() {
+ bb_ = other.HasBb ? other.bb_.Clone() : null;
+ subGroup_ = other.HasSubGroup ? other.subGroup_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestMutualRecursionA Clone() {
+ return new TestMutualRecursionA(this);
+ }
+
+ /// <summary>Field number for the "bb" field.</summary>
+ public const int BbFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionB bb_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionB Bb {
+ get { return bb_; }
+ set {
+ bb_ = value;
+ }
+ }
+ /// <summary>Gets whether the bb field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBb {
+ get { return bb_ != null; }
+ }
+ /// <summary>Clears the value of the bb field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBb() {
+ bb_ = null;
+ }
+
+ /// <summary>Field number for the "subgroup" field.</summary>
+ public const int SubGroupFieldNumber = 2;
+ private global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubGroup subGroup_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubGroup SubGroup {
+ get { return subGroup_; }
+ set {
+ subGroup_ = value;
+ }
+ }
+ /// <summary>Gets whether the subgroup field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasSubGroup {
+ get { return subGroup_ != null; }
+ }
+ /// <summary>Clears the value of the subgroup field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearSubGroup() {
+ subGroup_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestMutualRecursionA);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestMutualRecursionA other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(Bb, other.Bb)) return false;
+ if (!object.Equals(SubGroup, other.SubGroup)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasBb) hash ^= Bb.GetHashCode();
+ if (HasSubGroup) hash ^= SubGroup.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasBb) {
+ output.WriteRawTag(10);
+ output.WriteMessage(Bb);
+ }
+ if (HasSubGroup) {
+ output.WriteRawTag(19);
+ output.WriteGroup(SubGroup);
+ output.WriteRawTag(20);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasBb) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bb);
+ }
+ if (HasSubGroup) {
+ size += 2 + pb::CodedOutputStream.ComputeGroupSize(SubGroup);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestMutualRecursionA other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasBb) {
+ if (!HasBb) {
+ Bb = new global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionB();
+ }
+ Bb.MergeFrom(other.Bb);
+ }
+ if (other.HasSubGroup) {
+ if (!HasSubGroup) {
+ SubGroup = new global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubGroup();
+ }
+ SubGroup.MergeFrom(other.SubGroup);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasBb) {
+ Bb = new global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionB();
+ }
+ input.ReadMessage(Bb);
+ break;
+ }
+ case 19: {
+ if (!HasSubGroup) {
+ SubGroup = new global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubGroup();
+ }
+ input.ReadGroup(SubGroup);
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestMutualRecursionA message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class SubMessage : pb::IMessage<SubMessage> {
+ private static readonly pb::MessageParser<SubMessage> _parser = new pb::MessageParser<SubMessage>(() => new SubMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SubMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubMessage(SubMessage other) : this() {
+ b_ = other.HasB ? other.b_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubMessage Clone() {
+ return new SubMessage(this);
+ }
+
+ /// <summary>Field number for the "b" field.</summary>
+ public const int BFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionB b_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionB B {
+ get { return b_; }
+ set {
+ b_ = value;
+ }
+ }
+ /// <summary>Gets whether the b field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasB {
+ get { return b_ != null; }
+ }
+ /// <summary>Clears the value of the b field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearB() {
+ b_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SubMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SubMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(B, other.B)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasB) hash ^= B.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasB) {
+ output.WriteRawTag(10);
+ output.WriteMessage(B);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasB) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(B);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SubMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasB) {
+ if (!HasB) {
+ B = new global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionB();
+ }
+ B.MergeFrom(other.B);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasB) {
+ B = new global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionB();
+ }
+ input.ReadMessage(B);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class SubGroup : pb::IMessage<SubGroup> {
+ private static readonly pb::MessageParser<SubGroup> _parser = new pb::MessageParser<SubGroup>(() => new SubGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SubGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Descriptor.NestedTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubGroup(SubGroup other) : this() {
+ subMessage_ = other.HasSubMessage ? other.subMessage_.Clone() : null;
+ notInThisScc_ = other.HasNotInThisScc ? other.notInThisScc_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubGroup Clone() {
+ return new SubGroup(this);
+ }
+
+ /// <summary>Field number for the "sub_message" field.</summary>
+ public const int SubMessageFieldNumber = 3;
+ private global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubMessage subMessage_;
+ /// <summary>
+ /// Needed because of bug in javatest
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubMessage SubMessage {
+ get { return subMessage_; }
+ set {
+ subMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the sub_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasSubMessage {
+ get { return subMessage_ != null; }
+ }
+ /// <summary>Clears the value of the sub_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearSubMessage() {
+ subMessage_ = null;
+ }
+
+ /// <summary>Field number for the "not_in_this_scc" field.</summary>
+ public const int NotInThisSccFieldNumber = 4;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes notInThisScc_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes NotInThisScc {
+ get { return notInThisScc_; }
+ set {
+ notInThisScc_ = value;
+ }
+ }
+ /// <summary>Gets whether the not_in_this_scc field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasNotInThisScc {
+ get { return notInThisScc_ != null; }
+ }
+ /// <summary>Clears the value of the not_in_this_scc field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearNotInThisScc() {
+ notInThisScc_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SubGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SubGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(SubMessage, other.SubMessage)) return false;
+ if (!object.Equals(NotInThisScc, other.NotInThisScc)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasSubMessage) hash ^= SubMessage.GetHashCode();
+ if (HasNotInThisScc) hash ^= NotInThisScc.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasSubMessage) {
+ output.WriteRawTag(26);
+ output.WriteMessage(SubMessage);
+ }
+ if (HasNotInThisScc) {
+ output.WriteRawTag(34);
+ output.WriteMessage(NotInThisScc);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasSubMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(SubMessage);
+ }
+ if (HasNotInThisScc) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(NotInThisScc);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SubGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasSubMessage) {
+ if (!HasSubMessage) {
+ SubMessage = new global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubMessage();
+ }
+ SubMessage.MergeFrom(other.SubMessage);
+ }
+ if (other.HasNotInThisScc) {
+ if (!HasNotInThisScc) {
+ NotInThisScc = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ NotInThisScc.MergeFrom(other.NotInThisScc);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 20:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 26: {
+ if (!HasSubMessage) {
+ SubMessage = new global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubMessage();
+ }
+ input.ReadMessage(SubMessage);
+ break;
+ }
+ case 34: {
+ if (!HasNotInThisScc) {
+ NotInThisScc = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ input.ReadMessage(NotInThisScc);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestMutualRecursionB : pb::IMessage<TestMutualRecursionB> {
+ private static readonly pb::MessageParser<TestMutualRecursionB> _parser = new pb::MessageParser<TestMutualRecursionB>(() => new TestMutualRecursionB());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestMutualRecursionB> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[22]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestMutualRecursionB() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestMutualRecursionB(TestMutualRecursionB other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.HasA ? other.a_.Clone() : null;
+ optionalInt32_ = other.optionalInt32_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestMutualRecursionB Clone() {
+ return new TestMutualRecursionB(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA A {
+ get { return a_; }
+ set {
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the a field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return a_ != null; }
+ }
+ /// <summary>Clears the value of the a field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ a_ = null;
+ }
+
+ /// <summary>Field number for the "optional_int32" field.</summary>
+ public const int OptionalInt32FieldNumber = 2;
+ private readonly static int OptionalInt32DefaultValue = 0;
+
+ private int optionalInt32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OptionalInt32 {
+ get { if ((_hasBits0 & 1) != 0) { return optionalInt32_; } else { return OptionalInt32DefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ optionalInt32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_int32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalInt32 {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_int32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalInt32() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestMutualRecursionB);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestMutualRecursionB other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(A, other.A)) return false;
+ if (OptionalInt32 != other.OptionalInt32) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (HasOptionalInt32) hash ^= OptionalInt32.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(10);
+ output.WriteMessage(A);
+ }
+ if (HasOptionalInt32) {
+ output.WriteRawTag(16);
+ output.WriteInt32(OptionalInt32);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(A);
+ }
+ if (HasOptionalInt32) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestMutualRecursionB other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ if (!HasA) {
+ A = new global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA();
+ }
+ A.MergeFrom(other.A);
+ }
+ if (other.HasOptionalInt32) {
+ OptionalInt32 = other.OptionalInt32;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasA) {
+ A = new global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA();
+ }
+ input.ReadMessage(A);
+ break;
+ }
+ case 16: {
+ OptionalInt32 = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class TestIsInitialized : pb::IMessage<TestIsInitialized> {
+ private static readonly pb::MessageParser<TestIsInitialized> _parser = new pb::MessageParser<TestIsInitialized>(() => new TestIsInitialized());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestIsInitialized> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[23]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestIsInitialized() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestIsInitialized(TestIsInitialized other) : this() {
+ subMessage_ = other.HasSubMessage ? other.subMessage_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestIsInitialized Clone() {
+ return new TestIsInitialized(this);
+ }
+
+ /// <summary>Field number for the "sub_message" field.</summary>
+ public const int SubMessageFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage subMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage SubMessage {
+ get { return subMessage_; }
+ set {
+ subMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the sub_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasSubMessage {
+ get { return subMessage_ != null; }
+ }
+ /// <summary>Clears the value of the sub_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearSubMessage() {
+ subMessage_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestIsInitialized);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestIsInitialized other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(SubMessage, other.SubMessage)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasSubMessage) hash ^= SubMessage.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasSubMessage) {
+ output.WriteRawTag(10);
+ output.WriteMessage(SubMessage);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasSubMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(SubMessage);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestIsInitialized other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasSubMessage) {
+ if (!HasSubMessage) {
+ SubMessage = new global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage();
+ }
+ SubMessage.MergeFrom(other.SubMessage);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasSubMessage) {
+ SubMessage = new global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage();
+ }
+ input.ReadMessage(SubMessage);
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestIsInitialized message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class SubMessage : pb::IMessage<SubMessage> {
+ private static readonly pb::MessageParser<SubMessage> _parser = new pb::MessageParser<SubMessage>(() => new SubMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SubMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubMessage(SubMessage other) : this() {
+ subGroup_ = other.HasSubGroup ? other.subGroup_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubMessage Clone() {
+ return new SubMessage(this);
+ }
+
+ /// <summary>Field number for the "subgroup" field.</summary>
+ public const int SubGroupFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage.Types.SubGroup subGroup_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage.Types.SubGroup SubGroup {
+ get { return subGroup_; }
+ set {
+ subGroup_ = value;
+ }
+ }
+ /// <summary>Gets whether the subgroup field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasSubGroup {
+ get { return subGroup_ != null; }
+ }
+ /// <summary>Clears the value of the subgroup field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearSubGroup() {
+ subGroup_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SubMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SubMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(SubGroup, other.SubGroup)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasSubGroup) hash ^= SubGroup.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasSubGroup) {
+ output.WriteRawTag(11);
+ output.WriteGroup(SubGroup);
+ output.WriteRawTag(12);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasSubGroup) {
+ size += 2 + pb::CodedOutputStream.ComputeGroupSize(SubGroup);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SubMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasSubGroup) {
+ if (!HasSubGroup) {
+ SubGroup = new global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage.Types.SubGroup();
+ }
+ SubGroup.MergeFrom(other.SubGroup);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 11: {
+ if (!HasSubGroup) {
+ SubGroup = new global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage.Types.SubGroup();
+ }
+ input.ReadGroup(SubGroup);
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the SubMessage message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class SubGroup : pb::IMessage<SubGroup> {
+ private static readonly pb::MessageParser<SubGroup> _parser = new pb::MessageParser<SubGroup>(() => new SubGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SubGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestIsInitialized.Types.SubMessage.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubGroup(SubGroup other) : this() {
+ _hasBits0 = other._hasBits0;
+ i_ = other.i_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SubGroup Clone() {
+ return new SubGroup(this);
+ }
+
+ /// <summary>Field number for the "i" field.</summary>
+ public const int IFieldNumber = 2;
+ private readonly static int IDefaultValue = 0;
+
+ private int i_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int I {
+ get { if ((_hasBits0 & 1) != 0) { return i_; } else { return IDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ i_ = value;
+ }
+ }
+ /// <summary>Gets whether the "i" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasI {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "i" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearI() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SubGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SubGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (I != other.I) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasI) hash ^= I.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasI) {
+ output.WriteRawTag(16);
+ output.WriteInt32(I);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasI) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(I);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SubGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasI) {
+ I = other.I;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 12:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 16: {
+ I = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ /// <summary>
+ /// Test that groups have disjoint field numbers from their siblings and
+ /// parents. This is NOT possible in proto1; only google.protobuf. When attempting
+ /// to compile with proto1, this will emit an error; so we only include it
+ /// in protobuf_unittest_proto.
+ /// </summary>
+ public sealed partial class TestDupFieldNumber : pb::IMessage<TestDupFieldNumber> {
+ private static readonly pb::MessageParser<TestDupFieldNumber> _parser = new pb::MessageParser<TestDupFieldNumber>(() => new TestDupFieldNumber());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestDupFieldNumber> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[24]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDupFieldNumber() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDupFieldNumber(TestDupFieldNumber other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ foo_ = other.HasFoo ? other.foo_.Clone() : null;
+ bar_ = other.HasBar ? other.bar_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDupFieldNumber Clone() {
+ return new TestDupFieldNumber(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 1;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ /// <summary>
+ /// NO_PROTO1
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "foo" field.</summary>
+ public const int FooFieldNumber = 2;
+ private global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Foo foo_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Foo Foo {
+ get { return foo_; }
+ set {
+ foo_ = value;
+ }
+ }
+ /// <summary>Gets whether the foo field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFoo {
+ get { return foo_ != null; }
+ }
+ /// <summary>Clears the value of the foo field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFoo() {
+ foo_ = null;
+ }
+
+ /// <summary>Field number for the "bar" field.</summary>
+ public const int BarFieldNumber = 3;
+ private global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Bar bar_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Bar Bar {
+ get { return bar_; }
+ set {
+ bar_ = value;
+ }
+ }
+ /// <summary>Gets whether the bar field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBar {
+ get { return bar_ != null; }
+ }
+ /// <summary>Clears the value of the bar field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBar() {
+ bar_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestDupFieldNumber);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestDupFieldNumber other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ if (!object.Equals(Foo, other.Foo)) return false;
+ if (!object.Equals(Bar, other.Bar)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (HasFoo) hash ^= Foo.GetHashCode();
+ if (HasBar) hash ^= Bar.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(8);
+ output.WriteInt32(A);
+ }
+ if (HasFoo) {
+ output.WriteRawTag(19);
+ output.WriteGroup(Foo);
+ output.WriteRawTag(20);
+ }
+ if (HasBar) {
+ output.WriteRawTag(27);
+ output.WriteGroup(Bar);
+ output.WriteRawTag(28);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (HasFoo) {
+ size += 2 + pb::CodedOutputStream.ComputeGroupSize(Foo);
+ }
+ if (HasBar) {
+ size += 2 + pb::CodedOutputStream.ComputeGroupSize(Bar);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestDupFieldNumber other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasFoo) {
+ if (!HasFoo) {
+ Foo = new global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Foo();
+ }
+ Foo.MergeFrom(other.Foo);
+ }
+ if (other.HasBar) {
+ if (!HasBar) {
+ Bar = new global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Bar();
+ }
+ Bar.MergeFrom(other.Bar);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ A = input.ReadInt32();
+ break;
+ }
+ case 19: {
+ if (!HasFoo) {
+ Foo = new global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Foo();
+ }
+ input.ReadGroup(Foo);
+ break;
+ }
+ case 27: {
+ if (!HasBar) {
+ Bar = new global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Types.Bar();
+ }
+ input.ReadGroup(Bar);
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestDupFieldNumber message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class Foo : pb::IMessage<Foo> {
+ private static readonly pb::MessageParser<Foo> _parser = new pb::MessageParser<Foo>(() => new Foo());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<Foo> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Foo() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Foo(Foo other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Foo Clone() {
+ return new Foo(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 1;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Foo);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Foo other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(8);
+ output.WriteInt32(A);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Foo other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 20:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ A = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class Bar : pb::IMessage<Bar> {
+ private static readonly pb::MessageParser<Bar> _parser = new pb::MessageParser<Bar>(() => new Bar());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<Bar> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestDupFieldNumber.Descriptor.NestedTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Bar() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Bar(Bar other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Bar Clone() {
+ return new Bar(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 1;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Bar);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Bar other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(8);
+ output.WriteInt32(A);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Bar other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 28:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ A = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ /// <summary>
+ /// Additional messages for testing lazy fields.
+ /// </summary>
+ public sealed partial class TestEagerMessage : pb::IMessage<TestEagerMessage> {
+ private static readonly pb::MessageParser<TestEagerMessage> _parser = new pb::MessageParser<TestEagerMessage>(() => new TestEagerMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestEagerMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[25]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestEagerMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestEagerMessage(TestEagerMessage other) : this() {
+ subMessage_ = other.HasSubMessage ? other.subMessage_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestEagerMessage Clone() {
+ return new TestEagerMessage(this);
+ }
+
+ /// <summary>Field number for the "sub_message" field.</summary>
+ public const int SubMessageFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes subMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes SubMessage {
+ get { return subMessage_; }
+ set {
+ subMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the sub_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasSubMessage {
+ get { return subMessage_ != null; }
+ }
+ /// <summary>Clears the value of the sub_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearSubMessage() {
+ subMessage_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestEagerMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestEagerMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(SubMessage, other.SubMessage)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasSubMessage) hash ^= SubMessage.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasSubMessage) {
+ output.WriteRawTag(10);
+ output.WriteMessage(SubMessage);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasSubMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(SubMessage);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestEagerMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasSubMessage) {
+ if (!HasSubMessage) {
+ SubMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ SubMessage.MergeFrom(other.SubMessage);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasSubMessage) {
+ SubMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ input.ReadMessage(SubMessage);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class TestLazyMessage : pb::IMessage<TestLazyMessage> {
+ private static readonly pb::MessageParser<TestLazyMessage> _parser = new pb::MessageParser<TestLazyMessage>(() => new TestLazyMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestLazyMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[26]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestLazyMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestLazyMessage(TestLazyMessage other) : this() {
+ subMessage_ = other.HasSubMessage ? other.subMessage_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestLazyMessage Clone() {
+ return new TestLazyMessage(this);
+ }
+
+ /// <summary>Field number for the "sub_message" field.</summary>
+ public const int SubMessageFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes subMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes SubMessage {
+ get { return subMessage_; }
+ set {
+ subMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the sub_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasSubMessage {
+ get { return subMessage_ != null; }
+ }
+ /// <summary>Clears the value of the sub_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearSubMessage() {
+ subMessage_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestLazyMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestLazyMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(SubMessage, other.SubMessage)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasSubMessage) hash ^= SubMessage.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasSubMessage) {
+ output.WriteRawTag(10);
+ output.WriteMessage(SubMessage);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasSubMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(SubMessage);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestLazyMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasSubMessage) {
+ if (!HasSubMessage) {
+ SubMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ SubMessage.MergeFrom(other.SubMessage);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasSubMessage) {
+ SubMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ input.ReadMessage(SubMessage);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Needed for a Python test.
+ /// </summary>
+ public sealed partial class TestNestedMessageHasBits : pb::IMessage<TestNestedMessageHasBits> {
+ private static readonly pb::MessageParser<TestNestedMessageHasBits> _parser = new pb::MessageParser<TestNestedMessageHasBits>(() => new TestNestedMessageHasBits());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestNestedMessageHasBits> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[27]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestNestedMessageHasBits() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestNestedMessageHasBits(TestNestedMessageHasBits other) : this() {
+ optionalNestedMessage_ = other.HasOptionalNestedMessage ? other.optionalNestedMessage_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestNestedMessageHasBits Clone() {
+ return new TestNestedMessageHasBits(this);
+ }
+
+ /// <summary>Field number for the "optional_nested_message" field.</summary>
+ public const int OptionalNestedMessageFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestNestedMessageHasBits.Types.NestedMessage optionalNestedMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestNestedMessageHasBits.Types.NestedMessage OptionalNestedMessage {
+ get { return optionalNestedMessage_; }
+ set {
+ optionalNestedMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_nested_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalNestedMessage {
+ get { return optionalNestedMessage_ != null; }
+ }
+ /// <summary>Clears the value of the optional_nested_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalNestedMessage() {
+ optionalNestedMessage_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestNestedMessageHasBits);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestNestedMessageHasBits other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(OptionalNestedMessage, other.OptionalNestedMessage)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasOptionalNestedMessage) hash ^= OptionalNestedMessage.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasOptionalNestedMessage) {
+ output.WriteRawTag(10);
+ output.WriteMessage(OptionalNestedMessage);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasOptionalNestedMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestNestedMessageHasBits other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasOptionalNestedMessage) {
+ if (!HasOptionalNestedMessage) {
+ OptionalNestedMessage = new global::Google.Protobuf.TestProtos.Proto2.TestNestedMessageHasBits.Types.NestedMessage();
+ }
+ OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (!HasOptionalNestedMessage) {
+ OptionalNestedMessage = new global::Google.Protobuf.TestProtos.Proto2.TestNestedMessageHasBits.Types.NestedMessage();
+ }
+ input.ReadMessage(OptionalNestedMessage);
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestNestedMessageHasBits message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
+ private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestNestedMessageHasBits.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage(NestedMessage other) : this() {
+ nestedmessageRepeatedInt32_ = other.nestedmessageRepeatedInt32_.Clone();
+ nestedmessageRepeatedForeignmessage_ = other.nestedmessageRepeatedForeignmessage_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage Clone() {
+ return new NestedMessage(this);
+ }
+
+ /// <summary>Field number for the "nestedmessage_repeated_int32" field.</summary>
+ public const int NestedmessageRepeatedInt32FieldNumber = 1;
+ private static readonly pb::FieldCodec<int> _repeated_nestedmessageRepeatedInt32_codec
+ = pb::FieldCodec.ForInt32(8);
+ private readonly pbc::RepeatedField<int> nestedmessageRepeatedInt32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> NestedmessageRepeatedInt32 {
+ get { return nestedmessageRepeatedInt32_; }
+ }
+
+ /// <summary>Field number for the "nestedmessage_repeated_foreignmessage" field.</summary>
+ public const int NestedmessageRepeatedForeignmessageFieldNumber = 2;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage> _repeated_nestedmessageRepeatedForeignmessage_codec
+ = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage> nestedmessageRepeatedForeignmessage_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage> NestedmessageRepeatedForeignmessage {
+ get { return nestedmessageRepeatedForeignmessage_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as NestedMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(NestedMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!nestedmessageRepeatedInt32_.Equals(other.nestedmessageRepeatedInt32_)) return false;
+ if(!nestedmessageRepeatedForeignmessage_.Equals(other.nestedmessageRepeatedForeignmessage_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= nestedmessageRepeatedInt32_.GetHashCode();
+ hash ^= nestedmessageRepeatedForeignmessage_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ nestedmessageRepeatedInt32_.WriteTo(output, _repeated_nestedmessageRepeatedInt32_codec);
+ nestedmessageRepeatedForeignmessage_.WriteTo(output, _repeated_nestedmessageRepeatedForeignmessage_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ size += nestedmessageRepeatedInt32_.CalculateSize(_repeated_nestedmessageRepeatedInt32_codec);
+ size += nestedmessageRepeatedForeignmessage_.CalculateSize(_repeated_nestedmessageRepeatedForeignmessage_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(NestedMessage other) {
+ if (other == null) {
+ return;
+ }
+ nestedmessageRepeatedInt32_.Add(other.nestedmessageRepeatedInt32_);
+ nestedmessageRepeatedForeignmessage_.Add(other.nestedmessageRepeatedForeignmessage_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10:
+ case 8: {
+ nestedmessageRepeatedInt32_.AddEntriesFrom(input, _repeated_nestedmessageRepeatedInt32_codec);
+ break;
+ }
+ case 18: {
+ nestedmessageRepeatedForeignmessage_.AddEntriesFrom(input, _repeated_nestedmessageRepeatedForeignmessage_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ /// <summary>
+ /// Test message with CamelCase field names. This violates Protocol Buffer
+ /// standard style.
+ /// </summary>
+ public sealed partial class TestCamelCaseFieldNames : pb::IMessage<TestCamelCaseFieldNames> {
+ private static readonly pb::MessageParser<TestCamelCaseFieldNames> _parser = new pb::MessageParser<TestCamelCaseFieldNames>(() => new TestCamelCaseFieldNames());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestCamelCaseFieldNames> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[28]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestCamelCaseFieldNames() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestCamelCaseFieldNames(TestCamelCaseFieldNames other) : this() {
+ _hasBits0 = other._hasBits0;
+ primitiveField_ = other.primitiveField_;
+ stringField_ = other.stringField_;
+ enumField_ = other.enumField_;
+ messageField_ = other.HasMessageField ? other.messageField_.Clone() : null;
+ stringPieceField_ = other.stringPieceField_;
+ cordField_ = other.cordField_;
+ repeatedPrimitiveField_ = other.repeatedPrimitiveField_.Clone();
+ repeatedStringField_ = other.repeatedStringField_.Clone();
+ repeatedEnumField_ = other.repeatedEnumField_.Clone();
+ repeatedMessageField_ = other.repeatedMessageField_.Clone();
+ repeatedStringPieceField_ = other.repeatedStringPieceField_.Clone();
+ repeatedCordField_ = other.repeatedCordField_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestCamelCaseFieldNames Clone() {
+ return new TestCamelCaseFieldNames(this);
+ }
+
+ /// <summary>Field number for the "PrimitiveField" field.</summary>
+ public const int PrimitiveFieldFieldNumber = 1;
+ private readonly static int PrimitiveFieldDefaultValue = 0;
+
+ private int primitiveField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int PrimitiveField {
+ get { if ((_hasBits0 & 1) != 0) { return primitiveField_; } else { return PrimitiveFieldDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ primitiveField_ = value;
+ }
+ }
+ /// <summary>Gets whether the "PrimitiveField" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasPrimitiveField {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "PrimitiveField" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearPrimitiveField() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "StringField" field.</summary>
+ public const int StringFieldFieldNumber = 2;
+ private readonly static string StringFieldDefaultValue = "";
+
+ private string stringField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string StringField {
+ get { return stringField_ ?? StringFieldDefaultValue; }
+ set {
+ stringField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "StringField" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasStringField {
+ get { return stringField_ != null; }
+ }
+ /// <summary>Clears the value of the "StringField" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearStringField() {
+ stringField_ = null;
+ }
+
+ /// <summary>Field number for the "EnumField" field.</summary>
+ public const int EnumFieldFieldNumber = 3;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.ForeignEnum EnumFieldDefaultValue = global::Google.Protobuf.TestProtos.Proto2.ForeignEnum.ForeignFoo;
+
+ private global::Google.Protobuf.TestProtos.Proto2.ForeignEnum enumField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ForeignEnum EnumField {
+ get { if ((_hasBits0 & 2) != 0) { return enumField_; } else { return EnumFieldDefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ enumField_ = value;
+ }
+ }
+ /// <summary>Gets whether the "EnumField" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasEnumField {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "EnumField" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearEnumField() {
+ _hasBits0 &= ~2;
+ }
+
+ /// <summary>Field number for the "MessageField" field.</summary>
+ public const int MessageFieldFieldNumber = 4;
+ private global::Google.Protobuf.TestProtos.Proto2.ForeignMessage messageField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ForeignMessage MessageField {
+ get { return messageField_; }
+ set {
+ messageField_ = value;
+ }
+ }
+ /// <summary>Gets whether the MessageField field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasMessageField {
+ get { return messageField_ != null; }
+ }
+ /// <summary>Clears the value of the MessageField field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearMessageField() {
+ messageField_ = null;
+ }
+
+ /// <summary>Field number for the "StringPieceField" field.</summary>
+ public const int StringPieceFieldFieldNumber = 5;
+ private readonly static string StringPieceFieldDefaultValue = "";
+
+ private string stringPieceField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string StringPieceField {
+ get { return stringPieceField_ ?? StringPieceFieldDefaultValue; }
+ set {
+ stringPieceField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "StringPieceField" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasStringPieceField {
+ get { return stringPieceField_ != null; }
+ }
+ /// <summary>Clears the value of the "StringPieceField" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearStringPieceField() {
+ stringPieceField_ = null;
+ }
+
+ /// <summary>Field number for the "CordField" field.</summary>
+ public const int CordFieldFieldNumber = 6;
+ private readonly static string CordFieldDefaultValue = "";
+
+ private string cordField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string CordField {
+ get { return cordField_ ?? CordFieldDefaultValue; }
+ set {
+ cordField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "CordField" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasCordField {
+ get { return cordField_ != null; }
+ }
+ /// <summary>Clears the value of the "CordField" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearCordField() {
+ cordField_ = null;
+ }
+
+ /// <summary>Field number for the "RepeatedPrimitiveField" field.</summary>
+ public const int RepeatedPrimitiveFieldFieldNumber = 7;
+ private static readonly pb::FieldCodec<int> _repeated_repeatedPrimitiveField_codec
+ = pb::FieldCodec.ForInt32(56);
+ private readonly pbc::RepeatedField<int> repeatedPrimitiveField_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> RepeatedPrimitiveField {
+ get { return repeatedPrimitiveField_; }
+ }
+
+ /// <summary>Field number for the "RepeatedStringField" field.</summary>
+ public const int RepeatedStringFieldFieldNumber = 8;
+ private static readonly pb::FieldCodec<string> _repeated_repeatedStringField_codec
+ = pb::FieldCodec.ForString(66);
+ private readonly pbc::RepeatedField<string> repeatedStringField_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> RepeatedStringField {
+ get { return repeatedStringField_; }
+ }
+
+ /// <summary>Field number for the "RepeatedEnumField" field.</summary>
+ public const int RepeatedEnumFieldFieldNumber = 9;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> _repeated_repeatedEnumField_codec
+ = pb::FieldCodec.ForEnum(72, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> repeatedEnumField_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> RepeatedEnumField {
+ get { return repeatedEnumField_; }
+ }
+
+ /// <summary>Field number for the "RepeatedMessageField" field.</summary>
+ public const int RepeatedMessageFieldFieldNumber = 10;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage> _repeated_repeatedMessageField_codec
+ = pb::FieldCodec.ForMessage(82, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage> repeatedMessageField_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignMessage> RepeatedMessageField {
+ get { return repeatedMessageField_; }
+ }
+
+ /// <summary>Field number for the "RepeatedStringPieceField" field.</summary>
+ public const int RepeatedStringPieceFieldFieldNumber = 11;
+ private static readonly pb::FieldCodec<string> _repeated_repeatedStringPieceField_codec
+ = pb::FieldCodec.ForString(90);
+ private readonly pbc::RepeatedField<string> repeatedStringPieceField_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> RepeatedStringPieceField {
+ get { return repeatedStringPieceField_; }
+ }
+
+ /// <summary>Field number for the "RepeatedCordField" field.</summary>
+ public const int RepeatedCordFieldFieldNumber = 12;
+ private static readonly pb::FieldCodec<string> _repeated_repeatedCordField_codec
+ = pb::FieldCodec.ForString(98);
+ private readonly pbc::RepeatedField<string> repeatedCordField_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> RepeatedCordField {
+ get { return repeatedCordField_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestCamelCaseFieldNames);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestCamelCaseFieldNames other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (PrimitiveField != other.PrimitiveField) return false;
+ if (StringField != other.StringField) return false;
+ if (EnumField != other.EnumField) return false;
+ if (!object.Equals(MessageField, other.MessageField)) return false;
+ if (StringPieceField != other.StringPieceField) return false;
+ if (CordField != other.CordField) return false;
+ if(!repeatedPrimitiveField_.Equals(other.repeatedPrimitiveField_)) return false;
+ if(!repeatedStringField_.Equals(other.repeatedStringField_)) return false;
+ if(!repeatedEnumField_.Equals(other.repeatedEnumField_)) return false;
+ if(!repeatedMessageField_.Equals(other.repeatedMessageField_)) return false;
+ if(!repeatedStringPieceField_.Equals(other.repeatedStringPieceField_)) return false;
+ if(!repeatedCordField_.Equals(other.repeatedCordField_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasPrimitiveField) hash ^= PrimitiveField.GetHashCode();
+ if (HasStringField) hash ^= StringField.GetHashCode();
+ if (HasEnumField) hash ^= EnumField.GetHashCode();
+ if (HasMessageField) hash ^= MessageField.GetHashCode();
+ if (HasStringPieceField) hash ^= StringPieceField.GetHashCode();
+ if (HasCordField) hash ^= CordField.GetHashCode();
+ hash ^= repeatedPrimitiveField_.GetHashCode();
+ hash ^= repeatedStringField_.GetHashCode();
+ hash ^= repeatedEnumField_.GetHashCode();
+ hash ^= repeatedMessageField_.GetHashCode();
+ hash ^= repeatedStringPieceField_.GetHashCode();
+ hash ^= repeatedCordField_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasPrimitiveField) {
+ output.WriteRawTag(8);
+ output.WriteInt32(PrimitiveField);
+ }
+ if (HasStringField) {
+ output.WriteRawTag(18);
+ output.WriteString(StringField);
+ }
+ if (HasEnumField) {
+ output.WriteRawTag(24);
+ output.WriteEnum((int) EnumField);
+ }
+ if (HasMessageField) {
+ output.WriteRawTag(34);
+ output.WriteMessage(MessageField);
+ }
+ if (HasStringPieceField) {
+ output.WriteRawTag(42);
+ output.WriteString(StringPieceField);
+ }
+ if (HasCordField) {
+ output.WriteRawTag(50);
+ output.WriteString(CordField);
+ }
+ repeatedPrimitiveField_.WriteTo(output, _repeated_repeatedPrimitiveField_codec);
+ repeatedStringField_.WriteTo(output, _repeated_repeatedStringField_codec);
+ repeatedEnumField_.WriteTo(output, _repeated_repeatedEnumField_codec);
+ repeatedMessageField_.WriteTo(output, _repeated_repeatedMessageField_codec);
+ repeatedStringPieceField_.WriteTo(output, _repeated_repeatedStringPieceField_codec);
+ repeatedCordField_.WriteTo(output, _repeated_repeatedCordField_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasPrimitiveField) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveField);
+ }
+ if (HasStringField) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(StringField);
+ }
+ if (HasEnumField) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumField);
+ }
+ if (HasMessageField) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageField);
+ }
+ if (HasStringPieceField) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(StringPieceField);
+ }
+ if (HasCordField) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(CordField);
+ }
+ size += repeatedPrimitiveField_.CalculateSize(_repeated_repeatedPrimitiveField_codec);
+ size += repeatedStringField_.CalculateSize(_repeated_repeatedStringField_codec);
+ size += repeatedEnumField_.CalculateSize(_repeated_repeatedEnumField_codec);
+ size += repeatedMessageField_.CalculateSize(_repeated_repeatedMessageField_codec);
+ size += repeatedStringPieceField_.CalculateSize(_repeated_repeatedStringPieceField_codec);
+ size += repeatedCordField_.CalculateSize(_repeated_repeatedCordField_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestCamelCaseFieldNames other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasPrimitiveField) {
+ PrimitiveField = other.PrimitiveField;
+ }
+ if (other.HasStringField) {
+ StringField = other.StringField;
+ }
+ if (other.HasEnumField) {
+ EnumField = other.EnumField;
+ }
+ if (other.HasMessageField) {
+ if (!HasMessageField) {
+ MessageField = new global::Google.Protobuf.TestProtos.Proto2.ForeignMessage();
+ }
+ MessageField.MergeFrom(other.MessageField);
+ }
+ if (other.HasStringPieceField) {
+ StringPieceField = other.StringPieceField;
+ }
+ if (other.HasCordField) {
+ CordField = other.CordField;
+ }
+ repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_);
+ repeatedStringField_.Add(other.repeatedStringField_);
+ repeatedEnumField_.Add(other.repeatedEnumField_);
+ repeatedMessageField_.Add(other.repeatedMessageField_);
+ repeatedStringPieceField_.Add(other.repeatedStringPieceField_);
+ repeatedCordField_.Add(other.repeatedCordField_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ PrimitiveField = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ StringField = input.ReadString();
+ break;
+ }
+ case 24: {
+ EnumField = (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) input.ReadEnum();
+ break;
+ }
+ case 34: {
+ if (!HasMessageField) {
+ MessageField = new global::Google.Protobuf.TestProtos.Proto2.ForeignMessage();
+ }
+ input.ReadMessage(MessageField);
+ break;
+ }
+ case 42: {
+ StringPieceField = input.ReadString();
+ break;
+ }
+ case 50: {
+ CordField = input.ReadString();
+ break;
+ }
+ case 58:
+ case 56: {
+ repeatedPrimitiveField_.AddEntriesFrom(input, _repeated_repeatedPrimitiveField_codec);
+ break;
+ }
+ case 66: {
+ repeatedStringField_.AddEntriesFrom(input, _repeated_repeatedStringField_codec);
+ break;
+ }
+ case 74:
+ case 72: {
+ repeatedEnumField_.AddEntriesFrom(input, _repeated_repeatedEnumField_codec);
+ break;
+ }
+ case 82: {
+ repeatedMessageField_.AddEntriesFrom(input, _repeated_repeatedMessageField_codec);
+ break;
+ }
+ case 90: {
+ repeatedStringPieceField_.AddEntriesFrom(input, _repeated_repeatedStringPieceField_codec);
+ break;
+ }
+ case 98: {
+ repeatedCordField_.AddEntriesFrom(input, _repeated_repeatedCordField_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// We list fields out of order, to ensure that we're using field number and not
+ /// field index to determine serialization order.
+ /// </summary>
+ public sealed partial class TestFieldOrderings : pb::IExtensionMessage<TestFieldOrderings> {
+ private static readonly pb::MessageParser<TestFieldOrderings> _parser = new pb::MessageParser<TestFieldOrderings>(() => new TestFieldOrderings());
+ private pb::UnknownFieldSet _unknownFields;
+ private pb::ExtensionSet<TestFieldOrderings> _extensions;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestFieldOrderings> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[29]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestFieldOrderings() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestFieldOrderings(TestFieldOrderings other) : this() {
+ _hasBits0 = other._hasBits0;
+ myString_ = other.myString_;
+ myInt_ = other.myInt_;
+ myFloat_ = other.myFloat_;
+ optionalNestedMessage_ = other.HasOptionalNestedMessage ? other.optionalNestedMessage_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ _extensions = pb::ExtensionSet.Clone(other._extensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestFieldOrderings Clone() {
+ return new TestFieldOrderings(this);
+ }
+
+ /// <summary>Field number for the "my_string" field.</summary>
+ public const int MyStringFieldNumber = 11;
+ private readonly static string MyStringDefaultValue = "";
+
+ private string myString_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string MyString {
+ get { return myString_ ?? MyStringDefaultValue; }
+ set {
+ myString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "my_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasMyString {
+ get { return myString_ != null; }
+ }
+ /// <summary>Clears the value of the "my_string" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearMyString() {
+ myString_ = null;
+ }
+
+ /// <summary>Field number for the "my_int" field.</summary>
+ public const int MyIntFieldNumber = 1;
+ private readonly static long MyIntDefaultValue = 0L;
+
+ private long myInt_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long MyInt {
+ get { if ((_hasBits0 & 1) != 0) { return myInt_; } else { return MyIntDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ myInt_ = value;
+ }
+ }
+ /// <summary>Gets whether the "my_int" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasMyInt {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "my_int" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearMyInt() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "my_float" field.</summary>
+ public const int MyFloatFieldNumber = 101;
+ private readonly static float MyFloatDefaultValue = 0F;
+
+ private float myFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float MyFloat {
+ get { if ((_hasBits0 & 2) != 0) { return myFloat_; } else { return MyFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ myFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "my_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasMyFloat {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "my_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearMyFloat() {
+ _hasBits0 &= ~2;
+ }
+
+ /// <summary>Field number for the "optional_nested_message" field.</summary>
+ public const int OptionalNestedMessageFieldNumber = 200;
+ private global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings.Types.NestedMessage optionalNestedMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings.Types.NestedMessage OptionalNestedMessage {
+ get { return optionalNestedMessage_; }
+ set {
+ optionalNestedMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_nested_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalNestedMessage {
+ get { return optionalNestedMessage_ != null; }
+ }
+ /// <summary>Clears the value of the optional_nested_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalNestedMessage() {
+ optionalNestedMessage_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestFieldOrderings);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestFieldOrderings other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MyString != other.MyString) return false;
+ if (MyInt != other.MyInt) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MyFloat, other.MyFloat)) return false;
+ if (!object.Equals(OptionalNestedMessage, other.OptionalNestedMessage)) return false;
+ if (!Equals(_extensions, other._extensions)) {
+ return false;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasMyString) hash ^= MyString.GetHashCode();
+ if (HasMyInt) hash ^= MyInt.GetHashCode();
+ if (HasMyFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MyFloat);
+ if (HasOptionalNestedMessage) hash ^= OptionalNestedMessage.GetHashCode();
+ if (_extensions != null) {
+ hash ^= _extensions.GetHashCode();
+ }
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasMyInt) {
+ output.WriteRawTag(8);
+ output.WriteInt64(MyInt);
+ }
+ if (HasMyString) {
+ output.WriteRawTag(90);
+ output.WriteString(MyString);
+ }
+ if (HasMyFloat) {
+ output.WriteRawTag(173, 6);
+ output.WriteFloat(MyFloat);
+ }
+ if (HasOptionalNestedMessage) {
+ output.WriteRawTag(194, 12);
+ output.WriteMessage(OptionalNestedMessage);
+ }
+ if (_extensions != null) {
+ _extensions.WriteTo(output);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasMyString) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(MyString);
+ }
+ if (HasMyInt) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(MyInt);
+ }
+ if (HasMyFloat) {
+ size += 2 + 4;
+ }
+ if (HasOptionalNestedMessage) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage);
+ }
+ if (_extensions != null) {
+ size += _extensions.CalculateSize();
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestFieldOrderings other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasMyString) {
+ MyString = other.MyString;
+ }
+ if (other.HasMyInt) {
+ MyInt = other.MyInt;
+ }
+ if (other.HasMyFloat) {
+ MyFloat = other.MyFloat;
+ }
+ if (other.HasOptionalNestedMessage) {
+ if (!HasOptionalNestedMessage) {
+ OptionalNestedMessage = new global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings.Types.NestedMessage();
+ }
+ OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage);
+ }
+ pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ }
+ break;
+ case 8: {
+ MyInt = input.ReadInt64();
+ break;
+ }
+ case 90: {
+ MyString = input.ReadString();
+ break;
+ }
+ case 813: {
+ MyFloat = input.ReadFloat();
+ break;
+ }
+ case 1602: {
+ if (!HasOptionalNestedMessage) {
+ OptionalNestedMessage = new global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings.Types.NestedMessage();
+ }
+ input.ReadMessage(OptionalNestedMessage);
+ break;
+ }
+ }
+ }
+ }
+
+ public void RegisterExtension(pb::Extension extension) {
+ pb::ExtensionSet.Register(ref _extensions, extension);
+ }
+ public TValue GetExtension<TValue>(pb::Extension<TestFieldOrderings, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TestFieldOrderings, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public void SetExtension<TValue>(pb::Extension<TestFieldOrderings, TValue> extension, TValue value) {
+ pb::ExtensionSet.Set(ref _extensions, extension, value);
+ }
+ public bool HasExtension<TValue>(pb::Extension<TestFieldOrderings, TValue> extension) {
+ return pb::ExtensionSet.Has(ref _extensions, extension);
+ }
+ public void ClearExtension<TValue>(pb::Extension<TestFieldOrderings, TValue> extension) {
+ pb::ExtensionSet.Clear(ref _extensions, extension);
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestFieldOrderings message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
+ private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage(NestedMessage other) : this() {
+ _hasBits0 = other._hasBits0;
+ oo_ = other.oo_;
+ bb_ = other.bb_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage Clone() {
+ return new NestedMessage(this);
+ }
+
+ /// <summary>Field number for the "oo" field.</summary>
+ public const int OoFieldNumber = 2;
+ private readonly static long OoDefaultValue = 0L;
+
+ private long oo_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long Oo {
+ get { if ((_hasBits0 & 2) != 0) { return oo_; } else { return OoDefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ oo_ = value;
+ }
+ }
+ /// <summary>Gets whether the "oo" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOo {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "oo" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOo() {
+ _hasBits0 &= ~2;
+ }
+
+ /// <summary>Field number for the "bb" field.</summary>
+ public const int BbFieldNumber = 1;
+ private readonly static int BbDefaultValue = 0;
+
+ private int bb_;
+ /// <summary>
+ /// The field name "b" fails to compile in proto1 because it conflicts with
+ /// a local variable named "b" in one of the generated methods. Doh.
+ /// This file needs to compile in proto1 to test backwards-compatibility.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Bb {
+ get { if ((_hasBits0 & 1) != 0) { return bb_; } else { return BbDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ bb_ = value;
+ }
+ }
+ /// <summary>Gets whether the "bb" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBb {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "bb" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBb() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as NestedMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(NestedMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Oo != other.Oo) return false;
+ if (Bb != other.Bb) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasOo) hash ^= Oo.GetHashCode();
+ if (HasBb) hash ^= Bb.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasBb) {
+ output.WriteRawTag(8);
+ output.WriteInt32(Bb);
+ }
+ if (HasOo) {
+ output.WriteRawTag(16);
+ output.WriteInt64(Oo);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasOo) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Oo);
+ }
+ if (HasBb) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(NestedMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasOo) {
+ Oo = other.Oo;
+ }
+ if (other.HasBb) {
+ Bb = other.Bb;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ Bb = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ Oo = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestExtensionOrderings1 : pb::IMessage<TestExtensionOrderings1> {
+ private static readonly pb::MessageParser<TestExtensionOrderings1> _parser = new pb::MessageParser<TestExtensionOrderings1>(() => new TestExtensionOrderings1());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestExtensionOrderings1> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[30]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionOrderings1() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionOrderings1(TestExtensionOrderings1 other) : this() {
+ myString_ = other.myString_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionOrderings1 Clone() {
+ return new TestExtensionOrderings1(this);
+ }
+
+ /// <summary>Field number for the "my_string" field.</summary>
+ public const int MyStringFieldNumber = 1;
+ private readonly static string MyStringDefaultValue = "";
+
+ private string myString_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string MyString {
+ get { return myString_ ?? MyStringDefaultValue; }
+ set {
+ myString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "my_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasMyString {
+ get { return myString_ != null; }
+ }
+ /// <summary>Clears the value of the "my_string" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearMyString() {
+ myString_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestExtensionOrderings1);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestExtensionOrderings1 other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MyString != other.MyString) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasMyString) hash ^= MyString.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasMyString) {
+ output.WriteRawTag(10);
+ output.WriteString(MyString);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasMyString) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(MyString);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestExtensionOrderings1 other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasMyString) {
+ MyString = other.MyString;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ MyString = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ #region Extensions
+ /// <summary>Container for extensions for other messages declared in the TestExtensionOrderings1 message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Extensions {
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings1> TestExtOrderings1 =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings1>(13, pb::FieldCodec.ForMessage(106, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings1.Parser));
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestExtensionOrderings2 : pb::IMessage<TestExtensionOrderings2> {
+ private static readonly pb::MessageParser<TestExtensionOrderings2> _parser = new pb::MessageParser<TestExtensionOrderings2>(() => new TestExtensionOrderings2());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestExtensionOrderings2> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[31]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionOrderings2() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionOrderings2(TestExtensionOrderings2 other) : this() {
+ myString_ = other.myString_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionOrderings2 Clone() {
+ return new TestExtensionOrderings2(this);
+ }
+
+ /// <summary>Field number for the "my_string" field.</summary>
+ public const int MyStringFieldNumber = 1;
+ private readonly static string MyStringDefaultValue = "";
+
+ private string myString_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string MyString {
+ get { return myString_ ?? MyStringDefaultValue; }
+ set {
+ myString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "my_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasMyString {
+ get { return myString_ != null; }
+ }
+ /// <summary>Clears the value of the "my_string" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearMyString() {
+ myString_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestExtensionOrderings2);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestExtensionOrderings2 other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MyString != other.MyString) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasMyString) hash ^= MyString.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasMyString) {
+ output.WriteRawTag(10);
+ output.WriteString(MyString);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasMyString) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(MyString);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestExtensionOrderings2 other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasMyString) {
+ MyString = other.MyString;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ MyString = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestExtensionOrderings2 message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class TestExtensionOrderings3 : pb::IMessage<TestExtensionOrderings3> {
+ private static readonly pb::MessageParser<TestExtensionOrderings3> _parser = new pb::MessageParser<TestExtensionOrderings3>(() => new TestExtensionOrderings3());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestExtensionOrderings3> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionOrderings3() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionOrderings3(TestExtensionOrderings3 other) : this() {
+ myString_ = other.myString_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionOrderings3 Clone() {
+ return new TestExtensionOrderings3(this);
+ }
+
+ /// <summary>Field number for the "my_string" field.</summary>
+ public const int MyStringFieldNumber = 1;
+ private readonly static string MyStringDefaultValue = "";
+
+ private string myString_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string MyString {
+ get { return myString_ ?? MyStringDefaultValue; }
+ set {
+ myString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "my_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasMyString {
+ get { return myString_ != null; }
+ }
+ /// <summary>Clears the value of the "my_string" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearMyString() {
+ myString_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestExtensionOrderings3);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestExtensionOrderings3 other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MyString != other.MyString) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasMyString) hash ^= MyString.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasMyString) {
+ output.WriteRawTag(10);
+ output.WriteString(MyString);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasMyString) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(MyString);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestExtensionOrderings3 other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasMyString) {
+ MyString = other.MyString;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ MyString = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ #region Extensions
+ /// <summary>Container for extensions for other messages declared in the TestExtensionOrderings3 message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Extensions {
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Types.TestExtensionOrderings3> TestExtOrderings3 =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Types.TestExtensionOrderings3>(14, pb::FieldCodec.ForMessage(114, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Types.TestExtensionOrderings3.Parser));
+ }
+ #endregion
+
+ }
+
+ }
+ #endregion
+
+ #region Extensions
+ /// <summary>Container for extensions for other messages declared in the TestExtensionOrderings2 message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Extensions {
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2> TestExtOrderings2 =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestFieldOrderings, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2>(12, pb::FieldCodec.ForMessage(98, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Parser));
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestExtremeDefaultValues : pb::IMessage<TestExtremeDefaultValues> {
+ private static readonly pb::MessageParser<TestExtremeDefaultValues> _parser = new pb::MessageParser<TestExtremeDefaultValues>(() => new TestExtremeDefaultValues());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestExtremeDefaultValues> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[32]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtremeDefaultValues() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtremeDefaultValues(TestExtremeDefaultValues other) : this() {
+ _hasBits0 = other._hasBits0;
+ escapedBytes_ = other.escapedBytes_;
+ largeUint32_ = other.largeUint32_;
+ largeUint64_ = other.largeUint64_;
+ smallInt32_ = other.smallInt32_;
+ smallInt64_ = other.smallInt64_;
+ reallySmallInt32_ = other.reallySmallInt32_;
+ reallySmallInt64_ = other.reallySmallInt64_;
+ utf8String_ = other.utf8String_;
+ zeroFloat_ = other.zeroFloat_;
+ oneFloat_ = other.oneFloat_;
+ smallFloat_ = other.smallFloat_;
+ negativeOneFloat_ = other.negativeOneFloat_;
+ negativeFloat_ = other.negativeFloat_;
+ largeFloat_ = other.largeFloat_;
+ smallNegativeFloat_ = other.smallNegativeFloat_;
+ infDouble_ = other.infDouble_;
+ negInfDouble_ = other.negInfDouble_;
+ nanDouble_ = other.nanDouble_;
+ infFloat_ = other.infFloat_;
+ negInfFloat_ = other.negInfFloat_;
+ nanFloat_ = other.nanFloat_;
+ cppTrigraph_ = other.cppTrigraph_;
+ stringWithZero_ = other.stringWithZero_;
+ bytesWithZero_ = other.bytesWithZero_;
+ stringPieceWithZero_ = other.stringPieceWithZero_;
+ cordWithZero_ = other.cordWithZero_;
+ replacementString_ = other.replacementString_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtremeDefaultValues Clone() {
+ return new TestExtremeDefaultValues(this);
+ }
+
+ /// <summary>Field number for the "escaped_bytes" field.</summary>
+ public const int EscapedBytesFieldNumber = 1;
+ private readonly static pb::ByteString EscapedBytesDefaultValue = pb::ByteString.FromBase64("AAEHCAwKDQkLXCci/g==");
+
+ private pb::ByteString escapedBytes_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString EscapedBytes {
+ get { return escapedBytes_ ?? EscapedBytesDefaultValue; }
+ set {
+ escapedBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "escaped_bytes" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasEscapedBytes {
+ get { return escapedBytes_ != null; }
+ }
+ /// <summary>Clears the value of the "escaped_bytes" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearEscapedBytes() {
+ escapedBytes_ = null;
+ }
+
+ /// <summary>Field number for the "large_uint32" field.</summary>
+ public const int LargeUint32FieldNumber = 2;
+ private readonly static uint LargeUint32DefaultValue = 4294967295;
+
+ private uint largeUint32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint LargeUint32 {
+ get { if ((_hasBits0 & 1) != 0) { return largeUint32_; } else { return LargeUint32DefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ largeUint32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "large_uint32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasLargeUint32 {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "large_uint32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearLargeUint32() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "large_uint64" field.</summary>
+ public const int LargeUint64FieldNumber = 3;
+ private readonly static ulong LargeUint64DefaultValue = 18446744073709551615UL;
+
+ private ulong largeUint64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ulong LargeUint64 {
+ get { if ((_hasBits0 & 2) != 0) { return largeUint64_; } else { return LargeUint64DefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ largeUint64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "large_uint64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasLargeUint64 {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "large_uint64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearLargeUint64() {
+ _hasBits0 &= ~2;
+ }
+
+ /// <summary>Field number for the "small_int32" field.</summary>
+ public const int SmallInt32FieldNumber = 4;
+ private readonly static int SmallInt32DefaultValue = -2147483647;
+
+ private int smallInt32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int SmallInt32 {
+ get { if ((_hasBits0 & 4) != 0) { return smallInt32_; } else { return SmallInt32DefaultValue; } }
+ set {
+ _hasBits0 |= 4;
+ smallInt32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "small_int32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasSmallInt32 {
+ get { return (_hasBits0 & 4) != 0; }
+ }
+ /// <summary>Clears the value of the "small_int32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearSmallInt32() {
+ _hasBits0 &= ~4;
+ }
+
+ /// <summary>Field number for the "small_int64" field.</summary>
+ public const int SmallInt64FieldNumber = 5;
+ private readonly static long SmallInt64DefaultValue = -9223372036854775807L;
+
+ private long smallInt64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long SmallInt64 {
+ get { if ((_hasBits0 & 8) != 0) { return smallInt64_; } else { return SmallInt64DefaultValue; } }
+ set {
+ _hasBits0 |= 8;
+ smallInt64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "small_int64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasSmallInt64 {
+ get { return (_hasBits0 & 8) != 0; }
+ }
+ /// <summary>Clears the value of the "small_int64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearSmallInt64() {
+ _hasBits0 &= ~8;
+ }
+
+ /// <summary>Field number for the "really_small_int32" field.</summary>
+ public const int ReallySmallInt32FieldNumber = 21;
+ private readonly static int ReallySmallInt32DefaultValue = -2147483648;
+
+ private int reallySmallInt32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int ReallySmallInt32 {
+ get { if ((_hasBits0 & 131072) != 0) { return reallySmallInt32_; } else { return ReallySmallInt32DefaultValue; } }
+ set {
+ _hasBits0 |= 131072;
+ reallySmallInt32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "really_small_int32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasReallySmallInt32 {
+ get { return (_hasBits0 & 131072) != 0; }
+ }
+ /// <summary>Clears the value of the "really_small_int32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearReallySmallInt32() {
+ _hasBits0 &= ~131072;
+ }
+
+ /// <summary>Field number for the "really_small_int64" field.</summary>
+ public const int ReallySmallInt64FieldNumber = 22;
+ private readonly static long ReallySmallInt64DefaultValue = -9223372036854775808L;
+
+ private long reallySmallInt64_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long ReallySmallInt64 {
+ get { if ((_hasBits0 & 262144) != 0) { return reallySmallInt64_; } else { return ReallySmallInt64DefaultValue; } }
+ set {
+ _hasBits0 |= 262144;
+ reallySmallInt64_ = value;
+ }
+ }
+ /// <summary>Gets whether the "really_small_int64" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasReallySmallInt64 {
+ get { return (_hasBits0 & 262144) != 0; }
+ }
+ /// <summary>Clears the value of the "really_small_int64" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearReallySmallInt64() {
+ _hasBits0 &= ~262144;
+ }
+
+ /// <summary>Field number for the "utf8_string" field.</summary>
+ public const int Utf8StringFieldNumber = 6;
+ private readonly static string Utf8StringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +4Yi0 +"));
+
+ private string utf8String_;
+ /// <summary>
+ /// The default value here is UTF-8 for "\u1234". (We could also just type
+ /// the UTF-8 text directly into this text file rather than escape it, but
+ /// lots of people use editors that would be confused by this.)
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Utf8String {
+ get { return utf8String_ ?? Utf8StringDefaultValue; }
+ set {
+ utf8String_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "utf8_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasUtf8String {
+ get { return utf8String_ != null; }
+ }
+ /// <summary>Clears the value of the "utf8_string" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearUtf8String() {
+ utf8String_ = null;
+ }
+
+ /// <summary>Field number for the "zero_float" field.</summary>
+ public const int ZeroFloatFieldNumber = 7;
+ private readonly static float ZeroFloatDefaultValue = 0F;
+
+ private float zeroFloat_;
+ /// <summary>
+ /// Tests for single-precision floating-point values.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float ZeroFloat {
+ get { if ((_hasBits0 & 16) != 0) { return zeroFloat_; } else { return ZeroFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 16;
+ zeroFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "zero_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasZeroFloat {
+ get { return (_hasBits0 & 16) != 0; }
+ }
+ /// <summary>Clears the value of the "zero_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearZeroFloat() {
+ _hasBits0 &= ~16;
+ }
+
+ /// <summary>Field number for the "one_float" field.</summary>
+ public const int OneFloatFieldNumber = 8;
+ private readonly static float OneFloatDefaultValue = 1F;
+
+ private float oneFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float OneFloat {
+ get { if ((_hasBits0 & 32) != 0) { return oneFloat_; } else { return OneFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 32;
+ oneFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "one_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOneFloat {
+ get { return (_hasBits0 & 32) != 0; }
+ }
+ /// <summary>Clears the value of the "one_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneFloat() {
+ _hasBits0 &= ~32;
+ }
+
+ /// <summary>Field number for the "small_float" field.</summary>
+ public const int SmallFloatFieldNumber = 9;
+ private readonly static float SmallFloatDefaultValue = 1.5F;
+
+ private float smallFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float SmallFloat {
+ get { if ((_hasBits0 & 64) != 0) { return smallFloat_; } else { return SmallFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 64;
+ smallFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "small_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasSmallFloat {
+ get { return (_hasBits0 & 64) != 0; }
+ }
+ /// <summary>Clears the value of the "small_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearSmallFloat() {
+ _hasBits0 &= ~64;
+ }
+
+ /// <summary>Field number for the "negative_one_float" field.</summary>
+ public const int NegativeOneFloatFieldNumber = 10;
+ private readonly static float NegativeOneFloatDefaultValue = -1F;
+
+ private float negativeOneFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float NegativeOneFloat {
+ get { if ((_hasBits0 & 128) != 0) { return negativeOneFloat_; } else { return NegativeOneFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 128;
+ negativeOneFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "negative_one_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasNegativeOneFloat {
+ get { return (_hasBits0 & 128) != 0; }
+ }
+ /// <summary>Clears the value of the "negative_one_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearNegativeOneFloat() {
+ _hasBits0 &= ~128;
+ }
+
+ /// <summary>Field number for the "negative_float" field.</summary>
+ public const int NegativeFloatFieldNumber = 11;
+ private readonly static float NegativeFloatDefaultValue = -1.5F;
+
+ private float negativeFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float NegativeFloat {
+ get { if ((_hasBits0 & 256) != 0) { return negativeFloat_; } else { return NegativeFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 256;
+ negativeFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "negative_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasNegativeFloat {
+ get { return (_hasBits0 & 256) != 0; }
+ }
+ /// <summary>Clears the value of the "negative_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearNegativeFloat() {
+ _hasBits0 &= ~256;
+ }
+
+ /// <summary>Field number for the "large_float" field.</summary>
+ public const int LargeFloatFieldNumber = 12;
+ private readonly static float LargeFloatDefaultValue = 2e+08F;
+
+ private float largeFloat_;
+ /// <summary>
+ /// Using exponents
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float LargeFloat {
+ get { if ((_hasBits0 & 512) != 0) { return largeFloat_; } else { return LargeFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 512;
+ largeFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "large_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasLargeFloat {
+ get { return (_hasBits0 & 512) != 0; }
+ }
+ /// <summary>Clears the value of the "large_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearLargeFloat() {
+ _hasBits0 &= ~512;
+ }
+
+ /// <summary>Field number for the "small_negative_float" field.</summary>
+ public const int SmallNegativeFloatFieldNumber = 13;
+ private readonly static float SmallNegativeFloatDefaultValue = -8e-28F;
+
+ private float smallNegativeFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float SmallNegativeFloat {
+ get { if ((_hasBits0 & 1024) != 0) { return smallNegativeFloat_; } else { return SmallNegativeFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 1024;
+ smallNegativeFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "small_negative_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasSmallNegativeFloat {
+ get { return (_hasBits0 & 1024) != 0; }
+ }
+ /// <summary>Clears the value of the "small_negative_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearSmallNegativeFloat() {
+ _hasBits0 &= ~1024;
+ }
+
+ /// <summary>Field number for the "inf_double" field.</summary>
+ public const int InfDoubleFieldNumber = 14;
+ private readonly static double InfDoubleDefaultValue = double.PositiveInfinity;
+
+ private double infDouble_;
+ /// <summary>
+ /// Text for nonfinite floating-point values.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double InfDouble {
+ get { if ((_hasBits0 & 2048) != 0) { return infDouble_; } else { return InfDoubleDefaultValue; } }
+ set {
+ _hasBits0 |= 2048;
+ infDouble_ = value;
+ }
+ }
+ /// <summary>Gets whether the "inf_double" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasInfDouble {
+ get { return (_hasBits0 & 2048) != 0; }
+ }
+ /// <summary>Clears the value of the "inf_double" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearInfDouble() {
+ _hasBits0 &= ~2048;
+ }
+
+ /// <summary>Field number for the "neg_inf_double" field.</summary>
+ public const int NegInfDoubleFieldNumber = 15;
+ private readonly static double NegInfDoubleDefaultValue = double.NegativeInfinity;
+
+ private double negInfDouble_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double NegInfDouble {
+ get { if ((_hasBits0 & 4096) != 0) { return negInfDouble_; } else { return NegInfDoubleDefaultValue; } }
+ set {
+ _hasBits0 |= 4096;
+ negInfDouble_ = value;
+ }
+ }
+ /// <summary>Gets whether the "neg_inf_double" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasNegInfDouble {
+ get { return (_hasBits0 & 4096) != 0; }
+ }
+ /// <summary>Clears the value of the "neg_inf_double" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearNegInfDouble() {
+ _hasBits0 &= ~4096;
+ }
+
+ /// <summary>Field number for the "nan_double" field.</summary>
+ public const int NanDoubleFieldNumber = 16;
+ private readonly static double NanDoubleDefaultValue = double.NaN;
+
+ private double nanDouble_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double NanDouble {
+ get { if ((_hasBits0 & 8192) != 0) { return nanDouble_; } else { return NanDoubleDefaultValue; } }
+ set {
+ _hasBits0 |= 8192;
+ nanDouble_ = value;
+ }
+ }
+ /// <summary>Gets whether the "nan_double" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasNanDouble {
+ get { return (_hasBits0 & 8192) != 0; }
+ }
+ /// <summary>Clears the value of the "nan_double" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearNanDouble() {
+ _hasBits0 &= ~8192;
+ }
+
+ /// <summary>Field number for the "inf_float" field.</summary>
+ public const int InfFloatFieldNumber = 17;
+ private readonly static float InfFloatDefaultValue = float.PositiveInfinity;
+
+ private float infFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float InfFloat {
+ get { if ((_hasBits0 & 16384) != 0) { return infFloat_; } else { return InfFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 16384;
+ infFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "inf_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasInfFloat {
+ get { return (_hasBits0 & 16384) != 0; }
+ }
+ /// <summary>Clears the value of the "inf_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearInfFloat() {
+ _hasBits0 &= ~16384;
+ }
+
+ /// <summary>Field number for the "neg_inf_float" field.</summary>
+ public const int NegInfFloatFieldNumber = 18;
+ private readonly static float NegInfFloatDefaultValue = float.NegativeInfinity;
+
+ private float negInfFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float NegInfFloat {
+ get { if ((_hasBits0 & 32768) != 0) { return negInfFloat_; } else { return NegInfFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 32768;
+ negInfFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "neg_inf_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasNegInfFloat {
+ get { return (_hasBits0 & 32768) != 0; }
+ }
+ /// <summary>Clears the value of the "neg_inf_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearNegInfFloat() {
+ _hasBits0 &= ~32768;
+ }
+
+ /// <summary>Field number for the "nan_float" field.</summary>
+ public const int NanFloatFieldNumber = 19;
+ private readonly static float NanFloatDefaultValue = float.NaN;
+
+ private float nanFloat_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float NanFloat {
+ get { if ((_hasBits0 & 65536) != 0) { return nanFloat_; } else { return NanFloatDefaultValue; } }
+ set {
+ _hasBits0 |= 65536;
+ nanFloat_ = value;
+ }
+ }
+ /// <summary>Gets whether the "nan_float" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasNanFloat {
+ get { return (_hasBits0 & 65536) != 0; }
+ }
+ /// <summary>Clears the value of the "nan_float" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearNanFloat() {
+ _hasBits0 &= ~65536;
+ }
+
+ /// <summary>Field number for the "cpp_trigraph" field.</summary>
+ public const int CppTrigraphFieldNumber = 20;
+ private readonly static string CppTrigraphDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +PyA/ID8/ID8/ID8/PyA/Py8gPz8t +"));
+
+ private string cppTrigraph_;
+ /// <summary>
+ /// Tests for C++ trigraphs.
+ /// Trigraphs should be escaped in C++ generated files, but they should not be
+ /// escaped for other languages.
+ /// Note that in .proto file, "\?" is a valid way to escape ? in string
+ /// literals.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string CppTrigraph {
+ get { return cppTrigraph_ ?? CppTrigraphDefaultValue; }
+ set {
+ cppTrigraph_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "cpp_trigraph" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasCppTrigraph {
+ get { return cppTrigraph_ != null; }
+ }
+ /// <summary>Clears the value of the "cpp_trigraph" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearCppTrigraph() {
+ cppTrigraph_ = null;
+ }
+
+ /// <summary>Field number for the "string_with_zero" field.</summary>
+ public const int StringWithZeroFieldNumber = 23;
+ private readonly static string StringWithZeroDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +aGVsAGxv +"));
+
+ private string stringWithZero_;
+ /// <summary>
+ /// String defaults containing the character '\000'
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string StringWithZero {
+ get { return stringWithZero_ ?? StringWithZeroDefaultValue; }
+ set {
+ stringWithZero_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "string_with_zero" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasStringWithZero {
+ get { return stringWithZero_ != null; }
+ }
+ /// <summary>Clears the value of the "string_with_zero" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearStringWithZero() {
+ stringWithZero_ = null;
+ }
+
+ /// <summary>Field number for the "bytes_with_zero" field.</summary>
+ public const int BytesWithZeroFieldNumber = 24;
+ private readonly static pb::ByteString BytesWithZeroDefaultValue = pb::ByteString.FromBase64("d29yAGxk");
+
+ private pb::ByteString bytesWithZero_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString BytesWithZero {
+ get { return bytesWithZero_ ?? BytesWithZeroDefaultValue; }
+ set {
+ bytesWithZero_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "bytes_with_zero" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBytesWithZero {
+ get { return bytesWithZero_ != null; }
+ }
+ /// <summary>Clears the value of the "bytes_with_zero" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBytesWithZero() {
+ bytesWithZero_ = null;
+ }
+
+ /// <summary>Field number for the "string_piece_with_zero" field.</summary>
+ public const int StringPieceWithZeroFieldNumber = 25;
+ private readonly static string StringPieceWithZeroDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +YWIAYw== +"));
+
+ private string stringPieceWithZero_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string StringPieceWithZero {
+ get { return stringPieceWithZero_ ?? StringPieceWithZeroDefaultValue; }
+ set {
+ stringPieceWithZero_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "string_piece_with_zero" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasStringPieceWithZero {
+ get { return stringPieceWithZero_ != null; }
+ }
+ /// <summary>Clears the value of the "string_piece_with_zero" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearStringPieceWithZero() {
+ stringPieceWithZero_ = null;
+ }
+
+ /// <summary>Field number for the "cord_with_zero" field.</summary>
+ public const int CordWithZeroFieldNumber = 26;
+ private readonly static string CordWithZeroDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +MTIAMw== +"));
+
+ private string cordWithZero_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string CordWithZero {
+ get { return cordWithZero_ ?? CordWithZeroDefaultValue; }
+ set {
+ cordWithZero_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "cord_with_zero" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasCordWithZero {
+ get { return cordWithZero_ != null; }
+ }
+ /// <summary>Clears the value of the "cord_with_zero" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearCordWithZero() {
+ cordWithZero_ = null;
+ }
+
+ /// <summary>Field number for the "replacement_string" field.</summary>
+ public const int ReplacementStringFieldNumber = 27;
+ private readonly static string ReplacementStringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +JHt1bmtub3dufQ== +"));
+
+ private string replacementString_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string ReplacementString {
+ get { return replacementString_ ?? ReplacementStringDefaultValue; }
+ set {
+ replacementString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "replacement_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasReplacementString {
+ get { return replacementString_ != null; }
+ }
+ /// <summary>Clears the value of the "replacement_string" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearReplacementString() {
+ replacementString_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestExtremeDefaultValues);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestExtremeDefaultValues other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (EscapedBytes != other.EscapedBytes) return false;
+ if (LargeUint32 != other.LargeUint32) return false;
+ if (LargeUint64 != other.LargeUint64) return false;
+ if (SmallInt32 != other.SmallInt32) return false;
+ if (SmallInt64 != other.SmallInt64) return false;
+ if (ReallySmallInt32 != other.ReallySmallInt32) return false;
+ if (ReallySmallInt64 != other.ReallySmallInt64) return false;
+ if (Utf8String != other.Utf8String) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ZeroFloat, other.ZeroFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OneFloat, other.OneFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SmallFloat, other.SmallFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(NegativeOneFloat, other.NegativeOneFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(NegativeFloat, other.NegativeFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LargeFloat, other.LargeFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SmallNegativeFloat, other.SmallNegativeFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(InfDouble, other.InfDouble)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(NegInfDouble, other.NegInfDouble)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(NanDouble, other.NanDouble)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(InfFloat, other.InfFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(NegInfFloat, other.NegInfFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(NanFloat, other.NanFloat)) return false;
+ if (CppTrigraph != other.CppTrigraph) return false;
+ if (StringWithZero != other.StringWithZero) return false;
+ if (BytesWithZero != other.BytesWithZero) return false;
+ if (StringPieceWithZero != other.StringPieceWithZero) return false;
+ if (CordWithZero != other.CordWithZero) return false;
+ if (ReplacementString != other.ReplacementString) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasEscapedBytes) hash ^= EscapedBytes.GetHashCode();
+ if (HasLargeUint32) hash ^= LargeUint32.GetHashCode();
+ if (HasLargeUint64) hash ^= LargeUint64.GetHashCode();
+ if (HasSmallInt32) hash ^= SmallInt32.GetHashCode();
+ if (HasSmallInt64) hash ^= SmallInt64.GetHashCode();
+ if (HasReallySmallInt32) hash ^= ReallySmallInt32.GetHashCode();
+ if (HasReallySmallInt64) hash ^= ReallySmallInt64.GetHashCode();
+ if (HasUtf8String) hash ^= Utf8String.GetHashCode();
+ if (HasZeroFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ZeroFloat);
+ if (HasOneFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OneFloat);
+ if (HasSmallFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SmallFloat);
+ if (HasNegativeOneFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(NegativeOneFloat);
+ if (HasNegativeFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(NegativeFloat);
+ if (HasLargeFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LargeFloat);
+ if (HasSmallNegativeFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SmallNegativeFloat);
+ if (HasInfDouble) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(InfDouble);
+ if (HasNegInfDouble) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(NegInfDouble);
+ if (HasNanDouble) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(NanDouble);
+ if (HasInfFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(InfFloat);
+ if (HasNegInfFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(NegInfFloat);
+ if (HasNanFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(NanFloat);
+ if (HasCppTrigraph) hash ^= CppTrigraph.GetHashCode();
+ if (HasStringWithZero) hash ^= StringWithZero.GetHashCode();
+ if (HasBytesWithZero) hash ^= BytesWithZero.GetHashCode();
+ if (HasStringPieceWithZero) hash ^= StringPieceWithZero.GetHashCode();
+ if (HasCordWithZero) hash ^= CordWithZero.GetHashCode();
+ if (HasReplacementString) hash ^= ReplacementString.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasEscapedBytes) {
+ output.WriteRawTag(10);
+ output.WriteBytes(EscapedBytes);
+ }
+ if (HasLargeUint32) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(LargeUint32);
+ }
+ if (HasLargeUint64) {
+ output.WriteRawTag(24);
+ output.WriteUInt64(LargeUint64);
+ }
+ if (HasSmallInt32) {
+ output.WriteRawTag(32);
+ output.WriteInt32(SmallInt32);
+ }
+ if (HasSmallInt64) {
+ output.WriteRawTag(40);
+ output.WriteInt64(SmallInt64);
+ }
+ if (HasUtf8String) {
+ output.WriteRawTag(50);
+ output.WriteString(Utf8String);
+ }
+ if (HasZeroFloat) {
+ output.WriteRawTag(61);
+ output.WriteFloat(ZeroFloat);
+ }
+ if (HasOneFloat) {
+ output.WriteRawTag(69);
+ output.WriteFloat(OneFloat);
+ }
+ if (HasSmallFloat) {
+ output.WriteRawTag(77);
+ output.WriteFloat(SmallFloat);
+ }
+ if (HasNegativeOneFloat) {
+ output.WriteRawTag(85);
+ output.WriteFloat(NegativeOneFloat);
+ }
+ if (HasNegativeFloat) {
+ output.WriteRawTag(93);
+ output.WriteFloat(NegativeFloat);
+ }
+ if (HasLargeFloat) {
+ output.WriteRawTag(101);
+ output.WriteFloat(LargeFloat);
+ }
+ if (HasSmallNegativeFloat) {
+ output.WriteRawTag(109);
+ output.WriteFloat(SmallNegativeFloat);
+ }
+ if (HasInfDouble) {
+ output.WriteRawTag(113);
+ output.WriteDouble(InfDouble);
+ }
+ if (HasNegInfDouble) {
+ output.WriteRawTag(121);
+ output.WriteDouble(NegInfDouble);
+ }
+ if (HasNanDouble) {
+ output.WriteRawTag(129, 1);
+ output.WriteDouble(NanDouble);
+ }
+ if (HasInfFloat) {
+ output.WriteRawTag(141, 1);
+ output.WriteFloat(InfFloat);
+ }
+ if (HasNegInfFloat) {
+ output.WriteRawTag(149, 1);
+ output.WriteFloat(NegInfFloat);
+ }
+ if (HasNanFloat) {
+ output.WriteRawTag(157, 1);
+ output.WriteFloat(NanFloat);
+ }
+ if (HasCppTrigraph) {
+ output.WriteRawTag(162, 1);
+ output.WriteString(CppTrigraph);
+ }
+ if (HasReallySmallInt32) {
+ output.WriteRawTag(168, 1);
+ output.WriteInt32(ReallySmallInt32);
+ }
+ if (HasReallySmallInt64) {
+ output.WriteRawTag(176, 1);
+ output.WriteInt64(ReallySmallInt64);
+ }
+ if (HasStringWithZero) {
+ output.WriteRawTag(186, 1);
+ output.WriteString(StringWithZero);
+ }
+ if (HasBytesWithZero) {
+ output.WriteRawTag(194, 1);
+ output.WriteBytes(BytesWithZero);
+ }
+ if (HasStringPieceWithZero) {
+ output.WriteRawTag(202, 1);
+ output.WriteString(StringPieceWithZero);
+ }
+ if (HasCordWithZero) {
+ output.WriteRawTag(210, 1);
+ output.WriteString(CordWithZero);
+ }
+ if (HasReplacementString) {
+ output.WriteRawTag(218, 1);
+ output.WriteString(ReplacementString);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasEscapedBytes) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(EscapedBytes);
+ }
+ if (HasLargeUint32) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(LargeUint32);
+ }
+ if (HasLargeUint64) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt64Size(LargeUint64);
+ }
+ if (HasSmallInt32) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(SmallInt32);
+ }
+ if (HasSmallInt64) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(SmallInt64);
+ }
+ if (HasReallySmallInt32) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(ReallySmallInt32);
+ }
+ if (HasReallySmallInt64) {
+ size += 2 + pb::CodedOutputStream.ComputeInt64Size(ReallySmallInt64);
+ }
+ if (HasUtf8String) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Utf8String);
+ }
+ if (HasZeroFloat) {
+ size += 1 + 4;
+ }
+ if (HasOneFloat) {
+ size += 1 + 4;
+ }
+ if (HasSmallFloat) {
+ size += 1 + 4;
+ }
+ if (HasNegativeOneFloat) {
+ size += 1 + 4;
+ }
+ if (HasNegativeFloat) {
+ size += 1 + 4;
+ }
+ if (HasLargeFloat) {
+ size += 1 + 4;
+ }
+ if (HasSmallNegativeFloat) {
+ size += 1 + 4;
+ }
+ if (HasInfDouble) {
+ size += 1 + 8;
+ }
+ if (HasNegInfDouble) {
+ size += 1 + 8;
+ }
+ if (HasNanDouble) {
+ size += 2 + 8;
+ }
+ if (HasInfFloat) {
+ size += 2 + 4;
+ }
+ if (HasNegInfFloat) {
+ size += 2 + 4;
+ }
+ if (HasNanFloat) {
+ size += 2 + 4;
+ }
+ if (HasCppTrigraph) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(CppTrigraph);
+ }
+ if (HasStringWithZero) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(StringWithZero);
+ }
+ if (HasBytesWithZero) {
+ size += 2 + pb::CodedOutputStream.ComputeBytesSize(BytesWithZero);
+ }
+ if (HasStringPieceWithZero) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(StringPieceWithZero);
+ }
+ if (HasCordWithZero) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(CordWithZero);
+ }
+ if (HasReplacementString) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(ReplacementString);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestExtremeDefaultValues other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasEscapedBytes) {
+ EscapedBytes = other.EscapedBytes;
+ }
+ if (other.HasLargeUint32) {
+ LargeUint32 = other.LargeUint32;
+ }
+ if (other.HasLargeUint64) {
+ LargeUint64 = other.LargeUint64;
+ }
+ if (other.HasSmallInt32) {
+ SmallInt32 = other.SmallInt32;
+ }
+ if (other.HasSmallInt64) {
+ SmallInt64 = other.SmallInt64;
+ }
+ if (other.HasReallySmallInt32) {
+ ReallySmallInt32 = other.ReallySmallInt32;
+ }
+ if (other.HasReallySmallInt64) {
+ ReallySmallInt64 = other.ReallySmallInt64;
+ }
+ if (other.HasUtf8String) {
+ Utf8String = other.Utf8String;
+ }
+ if (other.HasZeroFloat) {
+ ZeroFloat = other.ZeroFloat;
+ }
+ if (other.HasOneFloat) {
+ OneFloat = other.OneFloat;
+ }
+ if (other.HasSmallFloat) {
+ SmallFloat = other.SmallFloat;
+ }
+ if (other.HasNegativeOneFloat) {
+ NegativeOneFloat = other.NegativeOneFloat;
+ }
+ if (other.HasNegativeFloat) {
+ NegativeFloat = other.NegativeFloat;
+ }
+ if (other.HasLargeFloat) {
+ LargeFloat = other.LargeFloat;
+ }
+ if (other.HasSmallNegativeFloat) {
+ SmallNegativeFloat = other.SmallNegativeFloat;
+ }
+ if (other.HasInfDouble) {
+ InfDouble = other.InfDouble;
+ }
+ if (other.HasNegInfDouble) {
+ NegInfDouble = other.NegInfDouble;
+ }
+ if (other.HasNanDouble) {
+ NanDouble = other.NanDouble;
+ }
+ if (other.HasInfFloat) {
+ InfFloat = other.InfFloat;
+ }
+ if (other.HasNegInfFloat) {
+ NegInfFloat = other.NegInfFloat;
+ }
+ if (other.HasNanFloat) {
+ NanFloat = other.NanFloat;
+ }
+ if (other.HasCppTrigraph) {
+ CppTrigraph = other.CppTrigraph;
+ }
+ if (other.HasStringWithZero) {
+ StringWithZero = other.StringWithZero;
+ }
+ if (other.HasBytesWithZero) {
+ BytesWithZero = other.BytesWithZero;
+ }
+ if (other.HasStringPieceWithZero) {
+ StringPieceWithZero = other.StringPieceWithZero;
+ }
+ if (other.HasCordWithZero) {
+ CordWithZero = other.CordWithZero;
+ }
+ if (other.HasReplacementString) {
+ ReplacementString = other.ReplacementString;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ EscapedBytes = input.ReadBytes();
+ break;
+ }
+ case 16: {
+ LargeUint32 = input.ReadUInt32();
+ break;
+ }
+ case 24: {
+ LargeUint64 = input.ReadUInt64();
+ break;
+ }
+ case 32: {
+ SmallInt32 = input.ReadInt32();
+ break;
+ }
+ case 40: {
+ SmallInt64 = input.ReadInt64();
+ break;
+ }
+ case 50: {
+ Utf8String = input.ReadString();
+ break;
+ }
+ case 61: {
+ ZeroFloat = input.ReadFloat();
+ break;
+ }
+ case 69: {
+ OneFloat = input.ReadFloat();
+ break;
+ }
+ case 77: {
+ SmallFloat = input.ReadFloat();
+ break;
+ }
+ case 85: {
+ NegativeOneFloat = input.ReadFloat();
+ break;
+ }
+ case 93: {
+ NegativeFloat = input.ReadFloat();
+ break;
+ }
+ case 101: {
+ LargeFloat = input.ReadFloat();
+ break;
+ }
+ case 109: {
+ SmallNegativeFloat = input.ReadFloat();
+ break;
+ }
+ case 113: {
+ InfDouble = input.ReadDouble();
+ break;
+ }
+ case 121: {
+ NegInfDouble = input.ReadDouble();
+ break;
+ }
+ case 129: {
+ NanDouble = input.ReadDouble();
+ break;
+ }
+ case 141: {
+ InfFloat = input.ReadFloat();
+ break;
+ }
+ case 149: {
+ NegInfFloat = input.ReadFloat();
+ break;
+ }
+ case 157: {
+ NanFloat = input.ReadFloat();
+ break;
+ }
+ case 162: {
+ CppTrigraph = input.ReadString();
+ break;
+ }
+ case 168: {
+ ReallySmallInt32 = input.ReadInt32();
+ break;
+ }
+ case 176: {
+ ReallySmallInt64 = input.ReadInt64();
+ break;
+ }
+ case 186: {
+ StringWithZero = input.ReadString();
+ break;
+ }
+ case 194: {
+ BytesWithZero = input.ReadBytes();
+ break;
+ }
+ case 202: {
+ StringPieceWithZero = input.ReadString();
+ break;
+ }
+ case 210: {
+ CordWithZero = input.ReadString();
+ break;
+ }
+ case 218: {
+ ReplacementString = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class SparseEnumMessage : pb::IMessage<SparseEnumMessage> {
+ private static readonly pb::MessageParser<SparseEnumMessage> _parser = new pb::MessageParser<SparseEnumMessage>(() => new SparseEnumMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SparseEnumMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[33]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SparseEnumMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SparseEnumMessage(SparseEnumMessage other) : this() {
+ _hasBits0 = other._hasBits0;
+ sparseEnum_ = other.sparseEnum_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SparseEnumMessage Clone() {
+ return new SparseEnumMessage(this);
+ }
+
+ /// <summary>Field number for the "sparse_enum" field.</summary>
+ public const int SparseEnumFieldNumber = 1;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.TestSparseEnum SparseEnumDefaultValue = global::Google.Protobuf.TestProtos.Proto2.TestSparseEnum.SparseA;
+
+ private global::Google.Protobuf.TestProtos.Proto2.TestSparseEnum sparseEnum_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestSparseEnum SparseEnum {
+ get { if ((_hasBits0 & 1) != 0) { return sparseEnum_; } else { return SparseEnumDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ sparseEnum_ = value;
+ }
+ }
+ /// <summary>Gets whether the "sparse_enum" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasSparseEnum {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "sparse_enum" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearSparseEnum() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SparseEnumMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SparseEnumMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (SparseEnum != other.SparseEnum) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasSparseEnum) hash ^= SparseEnum.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasSparseEnum) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) SparseEnum);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasSparseEnum) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SparseEnum);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SparseEnumMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasSparseEnum) {
+ SparseEnum = other.SparseEnum;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ SparseEnum = (global::Google.Protobuf.TestProtos.Proto2.TestSparseEnum) input.ReadEnum();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Test String and Bytes: string is for valid UTF-8 strings
+ /// </summary>
+ public sealed partial class OneString : pb::IMessage<OneString> {
+ private static readonly pb::MessageParser<OneString> _parser = new pb::MessageParser<OneString>(() => new OneString());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<OneString> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[34]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OneString() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OneString(OneString other) : this() {
+ data_ = other.data_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OneString Clone() {
+ return new OneString(this);
+ }
+
+ /// <summary>Field number for the "data" field.</summary>
+ public const int DataFieldNumber = 1;
+ private readonly static string DataDefaultValue = "";
+
+ private string data_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Data {
+ get { return data_ ?? DataDefaultValue; }
+ set {
+ data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "data" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasData {
+ get { return data_ != null; }
+ }
+ /// <summary>Clears the value of the "data" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearData() {
+ data_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as OneString);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(OneString other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Data != other.Data) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasData) hash ^= Data.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasData) {
+ output.WriteRawTag(10);
+ output.WriteString(Data);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasData) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Data);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(OneString other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Data = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class MoreString : pb::IMessage<MoreString> {
+ private static readonly pb::MessageParser<MoreString> _parser = new pb::MessageParser<MoreString>(() => new MoreString());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<MoreString> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[35]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MoreString() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MoreString(MoreString other) : this() {
+ data_ = other.data_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MoreString Clone() {
+ return new MoreString(this);
+ }
+
+ /// <summary>Field number for the "data" field.</summary>
+ public const int DataFieldNumber = 1;
+ private static readonly pb::FieldCodec<string> _repeated_data_codec
+ = pb::FieldCodec.ForString(10);
+ private readonly pbc::RepeatedField<string> data_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> Data {
+ get { return data_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as MoreString);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(MoreString other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!data_.Equals(other.data_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= data_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ data_.WriteTo(output, _repeated_data_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ size += data_.CalculateSize(_repeated_data_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(MoreString other) {
+ if (other == null) {
+ return;
+ }
+ data_.Add(other.data_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ data_.AddEntriesFrom(input, _repeated_data_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class OneBytes : pb::IMessage<OneBytes> {
+ private static readonly pb::MessageParser<OneBytes> _parser = new pb::MessageParser<OneBytes>(() => new OneBytes());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<OneBytes> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[36]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OneBytes() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OneBytes(OneBytes other) : this() {
+ data_ = other.data_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OneBytes Clone() {
+ return new OneBytes(this);
+ }
+
+ /// <summary>Field number for the "data" field.</summary>
+ public const int DataFieldNumber = 1;
+ private readonly static pb::ByteString DataDefaultValue = pb::ByteString.Empty;
+
+ private pb::ByteString data_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString Data {
+ get { return data_ ?? DataDefaultValue; }
+ set {
+ data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "data" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasData {
+ get { return data_ != null; }
+ }
+ /// <summary>Clears the value of the "data" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearData() {
+ data_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as OneBytes);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(OneBytes other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Data != other.Data) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasData) hash ^= Data.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasData) {
+ output.WriteRawTag(10);
+ output.WriteBytes(Data);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasData) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(OneBytes other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Data = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class MoreBytes : pb::IMessage<MoreBytes> {
+ private static readonly pb::MessageParser<MoreBytes> _parser = new pb::MessageParser<MoreBytes>(() => new MoreBytes());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<MoreBytes> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[37]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MoreBytes() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MoreBytes(MoreBytes other) : this() {
+ data_ = other.data_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MoreBytes Clone() {
+ return new MoreBytes(this);
+ }
+
+ /// <summary>Field number for the "data" field.</summary>
+ public const int DataFieldNumber = 1;
+ private static readonly pb::FieldCodec<pb::ByteString> _repeated_data_codec
+ = pb::FieldCodec.ForBytes(10);
+ private readonly pbc::RepeatedField<pb::ByteString> data_ = new pbc::RepeatedField<pb::ByteString>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<pb::ByteString> Data {
+ get { return data_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as MoreBytes);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(MoreBytes other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!data_.Equals(other.data_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= data_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ data_.WriteTo(output, _repeated_data_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ size += data_.CalculateSize(_repeated_data_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(MoreBytes other) {
+ if (other == null) {
+ return;
+ }
+ data_.Add(other.data_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ data_.AddEntriesFrom(input, _repeated_data_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Test int32, uint32, int64, uint64, and bool are all compatible
+ /// </summary>
+ public sealed partial class Int32Message : pb::IMessage<Int32Message> {
+ private static readonly pb::MessageParser<Int32Message> _parser = new pb::MessageParser<Int32Message>(() => new Int32Message());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<Int32Message> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[38]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Int32Message() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Int32Message(Int32Message other) : this() {
+ _hasBits0 = other._hasBits0;
+ data_ = other.data_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Int32Message Clone() {
+ return new Int32Message(this);
+ }
+
+ /// <summary>Field number for the "data" field.</summary>
+ public const int DataFieldNumber = 1;
+ private readonly static int DataDefaultValue = 0;
+
+ private int data_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Data {
+ get { if ((_hasBits0 & 1) != 0) { return data_; } else { return DataDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ data_ = value;
+ }
+ }
+ /// <summary>Gets whether the "data" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasData {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "data" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearData() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Int32Message);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Int32Message other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Data != other.Data) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasData) hash ^= Data.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasData) {
+ output.WriteRawTag(8);
+ output.WriteInt32(Data);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasData) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Data);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Int32Message other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ Data = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class Uint32Message : pb::IMessage<Uint32Message> {
+ private static readonly pb::MessageParser<Uint32Message> _parser = new pb::MessageParser<Uint32Message>(() => new Uint32Message());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<Uint32Message> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[39]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Uint32Message() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Uint32Message(Uint32Message other) : this() {
+ _hasBits0 = other._hasBits0;
+ data_ = other.data_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Uint32Message Clone() {
+ return new Uint32Message(this);
+ }
+
+ /// <summary>Field number for the "data" field.</summary>
+ public const int DataFieldNumber = 1;
+ private readonly static uint DataDefaultValue = 0;
+
+ private uint data_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint Data {
+ get { if ((_hasBits0 & 1) != 0) { return data_; } else { return DataDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ data_ = value;
+ }
+ }
+ /// <summary>Gets whether the "data" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasData {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "data" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearData() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Uint32Message);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Uint32Message other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Data != other.Data) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasData) hash ^= Data.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasData) {
+ output.WriteRawTag(8);
+ output.WriteUInt32(Data);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasData) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Data);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Uint32Message other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ Data = input.ReadUInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class Int64Message : pb::IMessage<Int64Message> {
+ private static readonly pb::MessageParser<Int64Message> _parser = new pb::MessageParser<Int64Message>(() => new Int64Message());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<Int64Message> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[40]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Int64Message() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Int64Message(Int64Message other) : this() {
+ _hasBits0 = other._hasBits0;
+ data_ = other.data_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Int64Message Clone() {
+ return new Int64Message(this);
+ }
+
+ /// <summary>Field number for the "data" field.</summary>
+ public const int DataFieldNumber = 1;
+ private readonly static long DataDefaultValue = 0L;
+
+ private long data_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long Data {
+ get { if ((_hasBits0 & 1) != 0) { return data_; } else { return DataDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ data_ = value;
+ }
+ }
+ /// <summary>Gets whether the "data" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasData {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "data" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearData() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Int64Message);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Int64Message other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Data != other.Data) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasData) hash ^= Data.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasData) {
+ output.WriteRawTag(8);
+ output.WriteInt64(Data);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasData) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Data);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Int64Message other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ Data = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class Uint64Message : pb::IMessage<Uint64Message> {
+ private static readonly pb::MessageParser<Uint64Message> _parser = new pb::MessageParser<Uint64Message>(() => new Uint64Message());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<Uint64Message> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[41]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Uint64Message() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Uint64Message(Uint64Message other) : this() {
+ _hasBits0 = other._hasBits0;
+ data_ = other.data_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Uint64Message Clone() {
+ return new Uint64Message(this);
+ }
+
+ /// <summary>Field number for the "data" field.</summary>
+ public const int DataFieldNumber = 1;
+ private readonly static ulong DataDefaultValue = 0UL;
+
+ private ulong data_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ulong Data {
+ get { if ((_hasBits0 & 1) != 0) { return data_; } else { return DataDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ data_ = value;
+ }
+ }
+ /// <summary>Gets whether the "data" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasData {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "data" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearData() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Uint64Message);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Uint64Message other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Data != other.Data) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasData) hash ^= Data.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasData) {
+ output.WriteRawTag(8);
+ output.WriteUInt64(Data);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasData) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Data);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Uint64Message other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ Data = input.ReadUInt64();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class BoolMessage : pb::IMessage<BoolMessage> {
+ private static readonly pb::MessageParser<BoolMessage> _parser = new pb::MessageParser<BoolMessage>(() => new BoolMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<BoolMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[42]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public BoolMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public BoolMessage(BoolMessage other) : this() {
+ _hasBits0 = other._hasBits0;
+ data_ = other.data_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public BoolMessage Clone() {
+ return new BoolMessage(this);
+ }
+
+ /// <summary>Field number for the "data" field.</summary>
+ public const int DataFieldNumber = 1;
+ private readonly static bool DataDefaultValue = false;
+
+ private bool data_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Data {
+ get { if ((_hasBits0 & 1) != 0) { return data_; } else { return DataDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ data_ = value;
+ }
+ }
+ /// <summary>Gets whether the "data" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasData {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "data" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearData() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as BoolMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(BoolMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Data != other.Data) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasData) hash ^= Data.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasData) {
+ output.WriteRawTag(8);
+ output.WriteBool(Data);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasData) {
+ size += 1 + 1;
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(BoolMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ Data = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Test oneofs.
+ /// </summary>
+ public sealed partial class TestOneof : pb::IMessage<TestOneof> {
+ private static readonly pb::MessageParser<TestOneof> _parser = new pb::MessageParser<TestOneof>(() => new TestOneof());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestOneof> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[43]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestOneof() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestOneof(TestOneof other) : this() {
+ _hasBits0 = other._hasBits0;
+ switch (other.FooCase) {
+ case FooOneofCase.FooInt:
+ FooInt = other.FooInt;
+ break;
+ case FooOneofCase.FooString:
+ FooString = other.FooString;
+ break;
+ case FooOneofCase.FooMessage:
+ FooMessage = other.FooMessage.Clone();
+ break;
+ case FooOneofCase.FooGroup:
+ FooGroup = other.FooGroup.Clone();
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestOneof Clone() {
+ return new TestOneof(this);
+ }
+
+ /// <summary>Field number for the "foo_int" field.</summary>
+ public const int FooIntFieldNumber = 1;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FooInt {
+ get { return HasFooInt ? (int) foo_ : 0; }
+ set {
+ foo_ = value;
+ fooCase_ = FooOneofCase.FooInt;
+ }
+ }
+ /// <summary>Gets whether the "foo_int" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooInt {
+ get { return fooCase_ == FooOneofCase.FooInt; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_int" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooInt() {
+ if (HasFooInt) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foo_string" field.</summary>
+ public const int FooStringFieldNumber = 2;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string FooString {
+ get { return HasFooString ? (string) foo_ : ""; }
+ set {
+ foo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ fooCase_ = FooOneofCase.FooString;
+ }
+ }
+ /// <summary>Gets whether the "foo_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooString {
+ get { return fooCase_ == FooOneofCase.FooString; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_string" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooString() {
+ if (HasFooString) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foo_message" field.</summary>
+ public const int FooMessageFieldNumber = 3;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes FooMessage {
+ get { return HasFooMessage ? (global::Google.Protobuf.TestProtos.Proto2.TestAllTypes) foo_ : null; }
+ set {
+ foo_ = value;
+ fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooMessage;
+ }
+ }
+ /// <summary>Gets whether the "foo_message" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooMessage {
+ get { return fooCase_ == FooOneofCase.FooMessage; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_message" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooMessage() {
+ if (HasFooMessage) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foogroup" field.</summary>
+ public const int FooGroupFieldNumber = 4;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestOneof.Types.FooGroup FooGroup {
+ get { return HasFooGroup ? (global::Google.Protobuf.TestProtos.Proto2.TestOneof.Types.FooGroup) foo_ : null; }
+ set {
+ foo_ = value;
+ fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooGroup;
+ }
+ }
+ /// <summary>Gets whether the "foogroup" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooGroup {
+ get { return fooCase_ == FooOneofCase.FooGroup; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foogroup" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooGroup() {
+ if (HasFooGroup) {
+ ClearFoo();
+ }
+ }
+
+ private object foo_;
+ /// <summary>Enum of possible cases for the "foo" oneof.</summary>
+ public enum FooOneofCase {
+ None = 0,
+ FooInt = 1,
+ FooString = 2,
+ FooMessage = 3,
+ FooGroup = 4,
+ }
+ private FooOneofCase fooCase_ = FooOneofCase.None;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooOneofCase FooCase {
+ get { return fooCase_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFoo() {
+ fooCase_ = FooOneofCase.None;
+ foo_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestOneof);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestOneof other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FooInt != other.FooInt) return false;
+ if (FooString != other.FooString) return false;
+ if (!object.Equals(FooMessage, other.FooMessage)) return false;
+ if (!object.Equals(FooGroup, other.FooGroup)) return false;
+ if (FooCase != other.FooCase) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasFooInt) hash ^= FooInt.GetHashCode();
+ if (HasFooString) hash ^= FooString.GetHashCode();
+ if (HasFooMessage) hash ^= FooMessage.GetHashCode();
+ if (HasFooGroup) hash ^= FooGroup.GetHashCode();
+ hash ^= (int) fooCase_;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasFooInt) {
+ output.WriteRawTag(8);
+ output.WriteInt32(FooInt);
+ }
+ if (HasFooString) {
+ output.WriteRawTag(18);
+ output.WriteString(FooString);
+ }
+ if (HasFooMessage) {
+ output.WriteRawTag(26);
+ output.WriteMessage(FooMessage);
+ }
+ if (HasFooGroup) {
+ output.WriteRawTag(35);
+ output.WriteGroup(FooGroup);
+ output.WriteRawTag(36);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasFooInt) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FooInt);
+ }
+ if (HasFooString) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(FooString);
+ }
+ if (HasFooMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(FooMessage);
+ }
+ if (HasFooGroup) {
+ size += 2 + pb::CodedOutputStream.ComputeGroupSize(FooGroup);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestOneof other) {
+ if (other == null) {
+ return;
+ }
+ switch (other.FooCase) {
+ case FooOneofCase.FooInt:
+ FooInt = other.FooInt;
+ break;
+ case FooOneofCase.FooString:
+ FooString = other.FooString;
+ break;
+ case FooOneofCase.FooMessage:
+ if (FooMessage == null) {
+ FooMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ FooMessage.MergeFrom(other.FooMessage);
+ break;
+ case FooOneofCase.FooGroup:
+ if (FooGroup == null) {
+ FooGroup = new global::Google.Protobuf.TestProtos.Proto2.TestOneof.Types.FooGroup();
+ }
+ FooGroup.MergeFrom(other.FooGroup);
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ FooInt = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ FooString = input.ReadString();
+ break;
+ }
+ case 26: {
+ global::Google.Protobuf.TestProtos.Proto2.TestAllTypes subBuilder = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ if (HasFooMessage) {
+ subBuilder.MergeFrom(FooMessage);
+ }
+ input.ReadMessage(subBuilder);
+ FooMessage = subBuilder;
+ break;
+ }
+ case 35: {
+ global::Google.Protobuf.TestProtos.Proto2.TestOneof.Types.FooGroup subBuilder = new global::Google.Protobuf.TestProtos.Proto2.TestOneof.Types.FooGroup();
+ if (HasFooGroup) {
+ subBuilder.MergeFrom(FooGroup);
+ }
+ input.ReadGroup(subBuilder);
+ FooGroup = subBuilder;
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestOneof message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class FooGroup : pb::IMessage<FooGroup> {
+ private static readonly pb::MessageParser<FooGroup> _parser = new pb::MessageParser<FooGroup>(() => new FooGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<FooGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestOneof.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooGroup(FooGroup other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ b_ = other.b_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooGroup Clone() {
+ return new FooGroup(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 5;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "b" field.</summary>
+ public const int BFieldNumber = 6;
+ private readonly static string BDefaultValue = "";
+
+ private string b_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string B {
+ get { return b_ ?? BDefaultValue; }
+ set {
+ b_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "b" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasB {
+ get { return b_ != null; }
+ }
+ /// <summary>Clears the value of the "b" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearB() {
+ b_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as FooGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(FooGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ if (B != other.B) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (HasB) hash ^= B.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(40);
+ output.WriteInt32(A);
+ }
+ if (HasB) {
+ output.WriteRawTag(50);
+ output.WriteString(B);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (HasB) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(B);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(FooGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasB) {
+ B = other.B;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 36:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 40: {
+ A = input.ReadInt32();
+ break;
+ }
+ case 50: {
+ B = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestOneofBackwardsCompatible : pb::IMessage<TestOneofBackwardsCompatible> {
+ private static readonly pb::MessageParser<TestOneofBackwardsCompatible> _parser = new pb::MessageParser<TestOneofBackwardsCompatible>(() => new TestOneofBackwardsCompatible());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestOneofBackwardsCompatible> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[44]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestOneofBackwardsCompatible() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestOneofBackwardsCompatible(TestOneofBackwardsCompatible other) : this() {
+ _hasBits0 = other._hasBits0;
+ fooInt_ = other.fooInt_;
+ fooString_ = other.fooString_;
+ fooMessage_ = other.HasFooMessage ? other.fooMessage_.Clone() : null;
+ fooGroup_ = other.HasFooGroup ? other.fooGroup_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestOneofBackwardsCompatible Clone() {
+ return new TestOneofBackwardsCompatible(this);
+ }
+
+ /// <summary>Field number for the "foo_int" field.</summary>
+ public const int FooIntFieldNumber = 1;
+ private readonly static int FooIntDefaultValue = 0;
+
+ private int fooInt_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FooInt {
+ get { if ((_hasBits0 & 1) != 0) { return fooInt_; } else { return FooIntDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ fooInt_ = value;
+ }
+ }
+ /// <summary>Gets whether the "foo_int" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooInt {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "foo_int" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooInt() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "foo_string" field.</summary>
+ public const int FooStringFieldNumber = 2;
+ private readonly static string FooStringDefaultValue = "";
+
+ private string fooString_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string FooString {
+ get { return fooString_ ?? FooStringDefaultValue; }
+ set {
+ fooString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "foo_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooString {
+ get { return fooString_ != null; }
+ }
+ /// <summary>Clears the value of the "foo_string" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooString() {
+ fooString_ = null;
+ }
+
+ /// <summary>Field number for the "foo_message" field.</summary>
+ public const int FooMessageFieldNumber = 3;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes fooMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes FooMessage {
+ get { return fooMessage_; }
+ set {
+ fooMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the foo_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooMessage {
+ get { return fooMessage_ != null; }
+ }
+ /// <summary>Clears the value of the foo_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooMessage() {
+ fooMessage_ = null;
+ }
+
+ /// <summary>Field number for the "foogroup" field.</summary>
+ public const int FooGroupFieldNumber = 4;
+ private global::Google.Protobuf.TestProtos.Proto2.TestOneofBackwardsCompatible.Types.FooGroup fooGroup_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestOneofBackwardsCompatible.Types.FooGroup FooGroup {
+ get { return fooGroup_; }
+ set {
+ fooGroup_ = value;
+ }
+ }
+ /// <summary>Gets whether the foogroup field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooGroup {
+ get { return fooGroup_ != null; }
+ }
+ /// <summary>Clears the value of the foogroup field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooGroup() {
+ fooGroup_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestOneofBackwardsCompatible);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestOneofBackwardsCompatible other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FooInt != other.FooInt) return false;
+ if (FooString != other.FooString) return false;
+ if (!object.Equals(FooMessage, other.FooMessage)) return false;
+ if (!object.Equals(FooGroup, other.FooGroup)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasFooInt) hash ^= FooInt.GetHashCode();
+ if (HasFooString) hash ^= FooString.GetHashCode();
+ if (HasFooMessage) hash ^= FooMessage.GetHashCode();
+ if (HasFooGroup) hash ^= FooGroup.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasFooInt) {
+ output.WriteRawTag(8);
+ output.WriteInt32(FooInt);
+ }
+ if (HasFooString) {
+ output.WriteRawTag(18);
+ output.WriteString(FooString);
+ }
+ if (HasFooMessage) {
+ output.WriteRawTag(26);
+ output.WriteMessage(FooMessage);
+ }
+ if (HasFooGroup) {
+ output.WriteRawTag(35);
+ output.WriteGroup(FooGroup);
+ output.WriteRawTag(36);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasFooInt) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FooInt);
+ }
+ if (HasFooString) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(FooString);
+ }
+ if (HasFooMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(FooMessage);
+ }
+ if (HasFooGroup) {
+ size += 2 + pb::CodedOutputStream.ComputeGroupSize(FooGroup);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestOneofBackwardsCompatible other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasFooInt) {
+ FooInt = other.FooInt;
+ }
+ if (other.HasFooString) {
+ FooString = other.FooString;
+ }
+ if (other.HasFooMessage) {
+ if (!HasFooMessage) {
+ FooMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ FooMessage.MergeFrom(other.FooMessage);
+ }
+ if (other.HasFooGroup) {
+ if (!HasFooGroup) {
+ FooGroup = new global::Google.Protobuf.TestProtos.Proto2.TestOneofBackwardsCompatible.Types.FooGroup();
+ }
+ FooGroup.MergeFrom(other.FooGroup);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ FooInt = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ FooString = input.ReadString();
+ break;
+ }
+ case 26: {
+ if (!HasFooMessage) {
+ FooMessage = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ input.ReadMessage(FooMessage);
+ break;
+ }
+ case 35: {
+ if (!HasFooGroup) {
+ FooGroup = new global::Google.Protobuf.TestProtos.Proto2.TestOneofBackwardsCompatible.Types.FooGroup();
+ }
+ input.ReadGroup(FooGroup);
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestOneofBackwardsCompatible message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class FooGroup : pb::IMessage<FooGroup> {
+ private static readonly pb::MessageParser<FooGroup> _parser = new pb::MessageParser<FooGroup>(() => new FooGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<FooGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestOneofBackwardsCompatible.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooGroup(FooGroup other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ b_ = other.b_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooGroup Clone() {
+ return new FooGroup(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 5;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "b" field.</summary>
+ public const int BFieldNumber = 6;
+ private readonly static string BDefaultValue = "";
+
+ private string b_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string B {
+ get { return b_ ?? BDefaultValue; }
+ set {
+ b_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "b" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasB {
+ get { return b_ != null; }
+ }
+ /// <summary>Clears the value of the "b" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearB() {
+ b_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as FooGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(FooGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ if (B != other.B) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (HasB) hash ^= B.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(40);
+ output.WriteInt32(A);
+ }
+ if (HasB) {
+ output.WriteRawTag(50);
+ output.WriteString(B);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (HasB) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(B);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(FooGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasB) {
+ B = other.B;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 36:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 40: {
+ A = input.ReadInt32();
+ break;
+ }
+ case 50: {
+ B = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestOneof2 : pb::IMessage<TestOneof2> {
+ private static readonly pb::MessageParser<TestOneof2> _parser = new pb::MessageParser<TestOneof2>(() => new TestOneof2());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestOneof2> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[45]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestOneof2() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestOneof2(TestOneof2 other) : this() {
+ _hasBits0 = other._hasBits0;
+ bazInt_ = other.bazInt_;
+ bazString_ = other.bazString_;
+ switch (other.FooCase) {
+ case FooOneofCase.FooInt:
+ FooInt = other.FooInt;
+ break;
+ case FooOneofCase.FooString:
+ FooString = other.FooString;
+ break;
+ case FooOneofCase.FooCord:
+ FooCord = other.FooCord;
+ break;
+ case FooOneofCase.FooStringPiece:
+ FooStringPiece = other.FooStringPiece;
+ break;
+ case FooOneofCase.FooBytes:
+ FooBytes = other.FooBytes;
+ break;
+ case FooOneofCase.FooEnum:
+ FooEnum = other.FooEnum;
+ break;
+ case FooOneofCase.FooMessage:
+ FooMessage = other.FooMessage.Clone();
+ break;
+ case FooOneofCase.FooGroup:
+ FooGroup = other.FooGroup.Clone();
+ break;
+ case FooOneofCase.FooLazyMessage:
+ FooLazyMessage = other.FooLazyMessage.Clone();
+ break;
+ }
+
+ switch (other.BarCase) {
+ case BarOneofCase.BarInt:
+ BarInt = other.BarInt;
+ break;
+ case BarOneofCase.BarString:
+ BarString = other.BarString;
+ break;
+ case BarOneofCase.BarCord:
+ BarCord = other.BarCord;
+ break;
+ case BarOneofCase.BarStringPiece:
+ BarStringPiece = other.BarStringPiece;
+ break;
+ case BarOneofCase.BarBytes:
+ BarBytes = other.BarBytes;
+ break;
+ case BarOneofCase.BarEnum:
+ BarEnum = other.BarEnum;
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestOneof2 Clone() {
+ return new TestOneof2(this);
+ }
+
+ /// <summary>Field number for the "foo_int" field.</summary>
+ public const int FooIntFieldNumber = 1;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FooInt {
+ get { return HasFooInt ? (int) foo_ : 0; }
+ set {
+ foo_ = value;
+ fooCase_ = FooOneofCase.FooInt;
+ }
+ }
+ /// <summary>Gets whether the "foo_int" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooInt {
+ get { return fooCase_ == FooOneofCase.FooInt; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_int" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooInt() {
+ if (HasFooInt) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foo_string" field.</summary>
+ public const int FooStringFieldNumber = 2;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string FooString {
+ get { return HasFooString ? (string) foo_ : ""; }
+ set {
+ foo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ fooCase_ = FooOneofCase.FooString;
+ }
+ }
+ /// <summary>Gets whether the "foo_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooString {
+ get { return fooCase_ == FooOneofCase.FooString; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_string" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooString() {
+ if (HasFooString) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foo_cord" field.</summary>
+ public const int FooCordFieldNumber = 3;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string FooCord {
+ get { return HasFooCord ? (string) foo_ : ""; }
+ set {
+ foo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ fooCase_ = FooOneofCase.FooCord;
+ }
+ }
+ /// <summary>Gets whether the "foo_cord" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooCord {
+ get { return fooCase_ == FooOneofCase.FooCord; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_cord" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooCord() {
+ if (HasFooCord) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foo_string_piece" field.</summary>
+ public const int FooStringPieceFieldNumber = 4;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string FooStringPiece {
+ get { return HasFooStringPiece ? (string) foo_ : ""; }
+ set {
+ foo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ fooCase_ = FooOneofCase.FooStringPiece;
+ }
+ }
+ /// <summary>Gets whether the "foo_string_piece" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooStringPiece {
+ get { return fooCase_ == FooOneofCase.FooStringPiece; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_string_piece" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooStringPiece() {
+ if (HasFooStringPiece) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foo_bytes" field.</summary>
+ public const int FooBytesFieldNumber = 5;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString FooBytes {
+ get { return HasFooBytes ? (pb::ByteString) foo_ : pb::ByteString.Empty; }
+ set {
+ foo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ fooCase_ = FooOneofCase.FooBytes;
+ }
+ }
+ /// <summary>Gets whether the "foo_bytes" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooBytes {
+ get { return fooCase_ == FooOneofCase.FooBytes; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_bytes" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooBytes() {
+ if (HasFooBytes) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foo_enum" field.</summary>
+ public const int FooEnumFieldNumber = 6;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedEnum FooEnum {
+ get { return HasFooEnum ? (global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedEnum) foo_ : global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedEnum.Foo; }
+ set {
+ foo_ = value;
+ fooCase_ = FooOneofCase.FooEnum;
+ }
+ }
+ /// <summary>Gets whether the "foo_enum" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooEnum {
+ get { return fooCase_ == FooOneofCase.FooEnum; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_enum" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooEnum() {
+ if (HasFooEnum) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foo_message" field.</summary>
+ public const int FooMessageFieldNumber = 7;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage FooMessage {
+ get { return HasFooMessage ? (global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage) foo_ : null; }
+ set {
+ foo_ = value;
+ fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooMessage;
+ }
+ }
+ /// <summary>Gets whether the "foo_message" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooMessage {
+ get { return fooCase_ == FooOneofCase.FooMessage; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_message" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooMessage() {
+ if (HasFooMessage) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foogroup" field.</summary>
+ public const int FooGroupFieldNumber = 8;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.FooGroup FooGroup {
+ get { return HasFooGroup ? (global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.FooGroup) foo_ : null; }
+ set {
+ foo_ = value;
+ fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooGroup;
+ }
+ }
+ /// <summary>Gets whether the "foogroup" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooGroup {
+ get { return fooCase_ == FooOneofCase.FooGroup; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foogroup" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooGroup() {
+ if (HasFooGroup) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foo_lazy_message" field.</summary>
+ public const int FooLazyMessageFieldNumber = 11;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage FooLazyMessage {
+ get { return HasFooLazyMessage ? (global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage) foo_ : null; }
+ set {
+ foo_ = value;
+ fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooLazyMessage;
+ }
+ }
+ /// <summary>Gets whether the "foo_lazy_message" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooLazyMessage {
+ get { return fooCase_ == FooOneofCase.FooLazyMessage; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_lazy_message" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooLazyMessage() {
+ if (HasFooLazyMessage) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "bar_int" field.</summary>
+ public const int BarIntFieldNumber = 12;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int BarInt {
+ get { return HasBarInt ? (int) bar_ : 5; }
+ set {
+ bar_ = value;
+ barCase_ = BarOneofCase.BarInt;
+ }
+ }
+ /// <summary>Gets whether the "bar_int" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBarInt {
+ get { return barCase_ == BarOneofCase.BarInt; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "bar_int" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBarInt() {
+ if (HasBarInt) {
+ ClearBar();
+ }
+ }
+
+ /// <summary>Field number for the "bar_string" field.</summary>
+ public const int BarStringFieldNumber = 13;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string BarString {
+ get { return HasBarString ? (string) bar_ : global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +U1RSSU5H +")); }
+ set {
+ bar_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ barCase_ = BarOneofCase.BarString;
+ }
+ }
+ /// <summary>Gets whether the "bar_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBarString {
+ get { return barCase_ == BarOneofCase.BarString; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "bar_string" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBarString() {
+ if (HasBarString) {
+ ClearBar();
+ }
+ }
+
+ /// <summary>Field number for the "bar_cord" field.</summary>
+ public const int BarCordFieldNumber = 14;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string BarCord {
+ get { return HasBarCord ? (string) bar_ : global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +Q09SRA== +")); }
+ set {
+ bar_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ barCase_ = BarOneofCase.BarCord;
+ }
+ }
+ /// <summary>Gets whether the "bar_cord" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBarCord {
+ get { return barCase_ == BarOneofCase.BarCord; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "bar_cord" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBarCord() {
+ if (HasBarCord) {
+ ClearBar();
+ }
+ }
+
+ /// <summary>Field number for the "bar_string_piece" field.</summary>
+ public const int BarStringPieceFieldNumber = 15;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string BarStringPiece {
+ get { return HasBarStringPiece ? (string) bar_ : global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +U1BJRUNF +")); }
+ set {
+ bar_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ barCase_ = BarOneofCase.BarStringPiece;
+ }
+ }
+ /// <summary>Gets whether the "bar_string_piece" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBarStringPiece {
+ get { return barCase_ == BarOneofCase.BarStringPiece; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "bar_string_piece" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBarStringPiece() {
+ if (HasBarStringPiece) {
+ ClearBar();
+ }
+ }
+
+ /// <summary>Field number for the "bar_bytes" field.</summary>
+ public const int BarBytesFieldNumber = 16;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString BarBytes {
+ get { return HasBarBytes ? (pb::ByteString) bar_ : pb::ByteString.FromBase64("QllURVM="); }
+ set {
+ bar_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ barCase_ = BarOneofCase.BarBytes;
+ }
+ }
+ /// <summary>Gets whether the "bar_bytes" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBarBytes {
+ get { return barCase_ == BarOneofCase.BarBytes; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "bar_bytes" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBarBytes() {
+ if (HasBarBytes) {
+ ClearBar();
+ }
+ }
+
+ /// <summary>Field number for the "bar_enum" field.</summary>
+ public const int BarEnumFieldNumber = 17;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedEnum BarEnum {
+ get { return HasBarEnum ? (global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedEnum) bar_ : global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedEnum.Bar; }
+ set {
+ bar_ = value;
+ barCase_ = BarOneofCase.BarEnum;
+ }
+ }
+ /// <summary>Gets whether the "bar_enum" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBarEnum {
+ get { return barCase_ == BarOneofCase.BarEnum; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "bar_enum" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBarEnum() {
+ if (HasBarEnum) {
+ ClearBar();
+ }
+ }
+
+ /// <summary>Field number for the "baz_int" field.</summary>
+ public const int BazIntFieldNumber = 18;
+ private readonly static int BazIntDefaultValue = 0;
+
+ private int bazInt_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int BazInt {
+ get { if ((_hasBits0 & 16) != 0) { return bazInt_; } else { return BazIntDefaultValue; } }
+ set {
+ _hasBits0 |= 16;
+ bazInt_ = value;
+ }
+ }
+ /// <summary>Gets whether the "baz_int" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBazInt {
+ get { return (_hasBits0 & 16) != 0; }
+ }
+ /// <summary>Clears the value of the "baz_int" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBazInt() {
+ _hasBits0 &= ~16;
+ }
+
+ /// <summary>Field number for the "baz_string" field.</summary>
+ public const int BazStringFieldNumber = 19;
+ private readonly static string BazStringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +QkFa +"));
+
+ private string bazString_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string BazString {
+ get { return bazString_ ?? BazStringDefaultValue; }
+ set {
+ bazString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "baz_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasBazString {
+ get { return bazString_ != null; }
+ }
+ /// <summary>Clears the value of the "baz_string" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBazString() {
+ bazString_ = null;
+ }
+
+ private object foo_;
+ /// <summary>Enum of possible cases for the "foo" oneof.</summary>
+ public enum FooOneofCase {
+ None = 0,
+ FooInt = 1,
+ FooString = 2,
+ FooCord = 3,
+ FooStringPiece = 4,
+ FooBytes = 5,
+ FooEnum = 6,
+ FooMessage = 7,
+ FooGroup = 8,
+ FooLazyMessage = 11,
+ }
+ private FooOneofCase fooCase_ = FooOneofCase.None;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooOneofCase FooCase {
+ get { return fooCase_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFoo() {
+ fooCase_ = FooOneofCase.None;
+ foo_ = null;
+ }
+
+ private object bar_;
+ /// <summary>Enum of possible cases for the "bar" oneof.</summary>
+ public enum BarOneofCase {
+ None = 0,
+ BarInt = 12,
+ BarString = 13,
+ BarCord = 14,
+ BarStringPiece = 15,
+ BarBytes = 16,
+ BarEnum = 17,
+ }
+ private BarOneofCase barCase_ = BarOneofCase.None;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public BarOneofCase BarCase {
+ get { return barCase_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearBar() {
+ barCase_ = BarOneofCase.None;
+ bar_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestOneof2);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestOneof2 other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FooInt != other.FooInt) return false;
+ if (FooString != other.FooString) return false;
+ if (FooCord != other.FooCord) return false;
+ if (FooStringPiece != other.FooStringPiece) return false;
+ if (FooBytes != other.FooBytes) return false;
+ if (FooEnum != other.FooEnum) return false;
+ if (!object.Equals(FooMessage, other.FooMessage)) return false;
+ if (!object.Equals(FooGroup, other.FooGroup)) return false;
+ if (!object.Equals(FooLazyMessage, other.FooLazyMessage)) return false;
+ if (BarInt != other.BarInt) return false;
+ if (BarString != other.BarString) return false;
+ if (BarCord != other.BarCord) return false;
+ if (BarStringPiece != other.BarStringPiece) return false;
+ if (BarBytes != other.BarBytes) return false;
+ if (BarEnum != other.BarEnum) return false;
+ if (BazInt != other.BazInt) return false;
+ if (BazString != other.BazString) return false;
+ if (FooCase != other.FooCase) return false;
+ if (BarCase != other.BarCase) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasFooInt) hash ^= FooInt.GetHashCode();
+ if (HasFooString) hash ^= FooString.GetHashCode();
+ if (HasFooCord) hash ^= FooCord.GetHashCode();
+ if (HasFooStringPiece) hash ^= FooStringPiece.GetHashCode();
+ if (HasFooBytes) hash ^= FooBytes.GetHashCode();
+ if (HasFooEnum) hash ^= FooEnum.GetHashCode();
+ if (HasFooMessage) hash ^= FooMessage.GetHashCode();
+ if (HasFooGroup) hash ^= FooGroup.GetHashCode();
+ if (HasFooLazyMessage) hash ^= FooLazyMessage.GetHashCode();
+ if (HasBarInt) hash ^= BarInt.GetHashCode();
+ if (HasBarString) hash ^= BarString.GetHashCode();
+ if (HasBarCord) hash ^= BarCord.GetHashCode();
+ if (HasBarStringPiece) hash ^= BarStringPiece.GetHashCode();
+ if (HasBarBytes) hash ^= BarBytes.GetHashCode();
+ if (HasBarEnum) hash ^= BarEnum.GetHashCode();
+ if (HasBazInt) hash ^= BazInt.GetHashCode();
+ if (HasBazString) hash ^= BazString.GetHashCode();
+ hash ^= (int) fooCase_;
+ hash ^= (int) barCase_;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasFooInt) {
+ output.WriteRawTag(8);
+ output.WriteInt32(FooInt);
+ }
+ if (HasFooString) {
+ output.WriteRawTag(18);
+ output.WriteString(FooString);
+ }
+ if (HasFooCord) {
+ output.WriteRawTag(26);
+ output.WriteString(FooCord);
+ }
+ if (HasFooStringPiece) {
+ output.WriteRawTag(34);
+ output.WriteString(FooStringPiece);
+ }
+ if (HasFooBytes) {
+ output.WriteRawTag(42);
+ output.WriteBytes(FooBytes);
+ }
+ if (HasFooEnum) {
+ output.WriteRawTag(48);
+ output.WriteEnum((int) FooEnum);
+ }
+ if (HasFooMessage) {
+ output.WriteRawTag(58);
+ output.WriteMessage(FooMessage);
+ }
+ if (HasFooGroup) {
+ output.WriteRawTag(67);
+ output.WriteGroup(FooGroup);
+ output.WriteRawTag(68);
+ }
+ if (HasFooLazyMessage) {
+ output.WriteRawTag(90);
+ output.WriteMessage(FooLazyMessage);
+ }
+ if (HasBarInt) {
+ output.WriteRawTag(96);
+ output.WriteInt32(BarInt);
+ }
+ if (HasBarString) {
+ output.WriteRawTag(106);
+ output.WriteString(BarString);
+ }
+ if (HasBarCord) {
+ output.WriteRawTag(114);
+ output.WriteString(BarCord);
+ }
+ if (HasBarStringPiece) {
+ output.WriteRawTag(122);
+ output.WriteString(BarStringPiece);
+ }
+ if (HasBarBytes) {
+ output.WriteRawTag(130, 1);
+ output.WriteBytes(BarBytes);
+ }
+ if (HasBarEnum) {
+ output.WriteRawTag(136, 1);
+ output.WriteEnum((int) BarEnum);
+ }
+ if (HasBazInt) {
+ output.WriteRawTag(144, 1);
+ output.WriteInt32(BazInt);
+ }
+ if (HasBazString) {
+ output.WriteRawTag(154, 1);
+ output.WriteString(BazString);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasFooInt) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FooInt);
+ }
+ if (HasFooString) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(FooString);
+ }
+ if (HasFooCord) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(FooCord);
+ }
+ if (HasFooStringPiece) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(FooStringPiece);
+ }
+ if (HasFooBytes) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(FooBytes);
+ }
+ if (HasFooEnum) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FooEnum);
+ }
+ if (HasFooMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(FooMessage);
+ }
+ if (HasFooGroup) {
+ size += 2 + pb::CodedOutputStream.ComputeGroupSize(FooGroup);
+ }
+ if (HasFooLazyMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(FooLazyMessage);
+ }
+ if (HasBarInt) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(BarInt);
+ }
+ if (HasBarString) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(BarString);
+ }
+ if (HasBarCord) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(BarCord);
+ }
+ if (HasBarStringPiece) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(BarStringPiece);
+ }
+ if (HasBarBytes) {
+ size += 2 + pb::CodedOutputStream.ComputeBytesSize(BarBytes);
+ }
+ if (HasBarEnum) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) BarEnum);
+ }
+ if (HasBazInt) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(BazInt);
+ }
+ if (HasBazString) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(BazString);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestOneof2 other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasBazInt) {
+ BazInt = other.BazInt;
+ }
+ if (other.HasBazString) {
+ BazString = other.BazString;
+ }
+ switch (other.FooCase) {
+ case FooOneofCase.FooInt:
+ FooInt = other.FooInt;
+ break;
+ case FooOneofCase.FooString:
+ FooString = other.FooString;
+ break;
+ case FooOneofCase.FooCord:
+ FooCord = other.FooCord;
+ break;
+ case FooOneofCase.FooStringPiece:
+ FooStringPiece = other.FooStringPiece;
+ break;
+ case FooOneofCase.FooBytes:
+ FooBytes = other.FooBytes;
+ break;
+ case FooOneofCase.FooEnum:
+ FooEnum = other.FooEnum;
+ break;
+ case FooOneofCase.FooMessage:
+ if (FooMessage == null) {
+ FooMessage = new global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage();
+ }
+ FooMessage.MergeFrom(other.FooMessage);
+ break;
+ case FooOneofCase.FooGroup:
+ if (FooGroup == null) {
+ FooGroup = new global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.FooGroup();
+ }
+ FooGroup.MergeFrom(other.FooGroup);
+ break;
+ case FooOneofCase.FooLazyMessage:
+ if (FooLazyMessage == null) {
+ FooLazyMessage = new global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage();
+ }
+ FooLazyMessage.MergeFrom(other.FooLazyMessage);
+ break;
+ }
+
+ switch (other.BarCase) {
+ case BarOneofCase.BarInt:
+ BarInt = other.BarInt;
+ break;
+ case BarOneofCase.BarString:
+ BarString = other.BarString;
+ break;
+ case BarOneofCase.BarCord:
+ BarCord = other.BarCord;
+ break;
+ case BarOneofCase.BarStringPiece:
+ BarStringPiece = other.BarStringPiece;
+ break;
+ case BarOneofCase.BarBytes:
+ BarBytes = other.BarBytes;
+ break;
+ case BarOneofCase.BarEnum:
+ BarEnum = other.BarEnum;
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ FooInt = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ FooString = input.ReadString();
+ break;
+ }
+ case 26: {
+ FooCord = input.ReadString();
+ break;
+ }
+ case 34: {
+ FooStringPiece = input.ReadString();
+ break;
+ }
+ case 42: {
+ FooBytes = input.ReadBytes();
+ break;
+ }
+ case 48: {
+ foo_ = input.ReadEnum();
+ fooCase_ = FooOneofCase.FooEnum;
+ break;
+ }
+ case 58: {
+ global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage subBuilder = new global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage();
+ if (HasFooMessage) {
+ subBuilder.MergeFrom(FooMessage);
+ }
+ input.ReadMessage(subBuilder);
+ FooMessage = subBuilder;
+ break;
+ }
+ case 67: {
+ global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.FooGroup subBuilder = new global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.FooGroup();
+ if (HasFooGroup) {
+ subBuilder.MergeFrom(FooGroup);
+ }
+ input.ReadGroup(subBuilder);
+ FooGroup = subBuilder;
+ break;
+ }
+ case 90: {
+ global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage subBuilder = new global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Types.NestedMessage();
+ if (HasFooLazyMessage) {
+ subBuilder.MergeFrom(FooLazyMessage);
+ }
+ input.ReadMessage(subBuilder);
+ FooLazyMessage = subBuilder;
+ break;
+ }
+ case 96: {
+ BarInt = input.ReadInt32();
+ break;
+ }
+ case 106: {
+ BarString = input.ReadString();
+ break;
+ }
+ case 114: {
+ BarCord = input.ReadString();
+ break;
+ }
+ case 122: {
+ BarStringPiece = input.ReadString();
+ break;
+ }
+ case 130: {
+ BarBytes = input.ReadBytes();
+ break;
+ }
+ case 136: {
+ bar_ = input.ReadEnum();
+ barCase_ = BarOneofCase.BarEnum;
+ break;
+ }
+ case 144: {
+ BazInt = input.ReadInt32();
+ break;
+ }
+ case 154: {
+ BazString = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestOneof2 message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public enum NestedEnum {
+ [pbr::OriginalName("FOO")] Foo = 1,
+ [pbr::OriginalName("BAR")] Bar = 2,
+ [pbr::OriginalName("BAZ")] Baz = 3,
+ }
+
+ public sealed partial class FooGroup : pb::IMessage<FooGroup> {
+ private static readonly pb::MessageParser<FooGroup> _parser = new pb::MessageParser<FooGroup>(() => new FooGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<FooGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooGroup(FooGroup other) : this() {
+ _hasBits0 = other._hasBits0;
+ a_ = other.a_;
+ b_ = other.b_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooGroup Clone() {
+ return new FooGroup(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 9;
+ private readonly static int ADefaultValue = 0;
+
+ private int a_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int A {
+ get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ a_ = value;
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "b" field.</summary>
+ public const int BFieldNumber = 10;
+ private readonly static string BDefaultValue = "";
+
+ private string b_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string B {
+ get { return b_ ?? BDefaultValue; }
+ set {
+ b_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "b" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasB {
+ get { return b_ != null; }
+ }
+ /// <summary>Clears the value of the "b" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearB() {
+ b_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as FooGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(FooGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ if (B != other.B) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (HasB) hash ^= B.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(72);
+ output.WriteInt32(A);
+ }
+ if (HasB) {
+ output.WriteRawTag(82);
+ output.WriteString(B);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
+ }
+ if (HasB) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(B);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(FooGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasB) {
+ B = other.B;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 68:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 72: {
+ A = input.ReadInt32();
+ break;
+ }
+ case 82: {
+ B = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
+ private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestOneof2.Descriptor.NestedTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage(NestedMessage other) : this() {
+ _hasBits0 = other._hasBits0;
+ quxInt_ = other.quxInt_;
+ corgeInt_ = other.corgeInt_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage Clone() {
+ return new NestedMessage(this);
+ }
+
+ /// <summary>Field number for the "qux_int" field.</summary>
+ public const int QuxIntFieldNumber = 1;
+ private readonly static long QuxIntDefaultValue = 0L;
+
+ private long quxInt_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long QuxInt {
+ get { if ((_hasBits0 & 1) != 0) { return quxInt_; } else { return QuxIntDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ quxInt_ = value;
+ }
+ }
+ /// <summary>Gets whether the "qux_int" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasQuxInt {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "qux_int" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearQuxInt() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "corge_int" field.</summary>
+ public const int CorgeIntFieldNumber = 2;
+ private static readonly pb::FieldCodec<int> _repeated_corgeInt_codec
+ = pb::FieldCodec.ForInt32(16);
+ private readonly pbc::RepeatedField<int> corgeInt_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> CorgeInt {
+ get { return corgeInt_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as NestedMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(NestedMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (QuxInt != other.QuxInt) return false;
+ if(!corgeInt_.Equals(other.corgeInt_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasQuxInt) hash ^= QuxInt.GetHashCode();
+ hash ^= corgeInt_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasQuxInt) {
+ output.WriteRawTag(8);
+ output.WriteInt64(QuxInt);
+ }
+ corgeInt_.WriteTo(output, _repeated_corgeInt_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasQuxInt) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(QuxInt);
+ }
+ size += corgeInt_.CalculateSize(_repeated_corgeInt_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(NestedMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasQuxInt) {
+ QuxInt = other.QuxInt;
+ }
+ corgeInt_.Add(other.corgeInt_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ QuxInt = input.ReadInt64();
+ break;
+ }
+ case 18:
+ case 16: {
+ corgeInt_.AddEntriesFrom(input, _repeated_corgeInt_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestRequiredOneof : pb::IMessage<TestRequiredOneof> {
+ private static readonly pb::MessageParser<TestRequiredOneof> _parser = new pb::MessageParser<TestRequiredOneof>(() => new TestRequiredOneof());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestRequiredOneof> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[46]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequiredOneof() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequiredOneof(TestRequiredOneof other) : this() {
+ _hasBits0 = other._hasBits0;
+ switch (other.FooCase) {
+ case FooOneofCase.FooInt:
+ FooInt = other.FooInt;
+ break;
+ case FooOneofCase.FooString:
+ FooString = other.FooString;
+ break;
+ case FooOneofCase.FooMessage:
+ FooMessage = other.FooMessage.Clone();
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRequiredOneof Clone() {
+ return new TestRequiredOneof(this);
+ }
+
+ /// <summary>Field number for the "foo_int" field.</summary>
+ public const int FooIntFieldNumber = 1;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FooInt {
+ get { return HasFooInt ? (int) foo_ : 0; }
+ set {
+ foo_ = value;
+ fooCase_ = FooOneofCase.FooInt;
+ }
+ }
+ /// <summary>Gets whether the "foo_int" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooInt {
+ get { return fooCase_ == FooOneofCase.FooInt; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_int" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooInt() {
+ if (HasFooInt) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foo_string" field.</summary>
+ public const int FooStringFieldNumber = 2;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string FooString {
+ get { return HasFooString ? (string) foo_ : ""; }
+ set {
+ foo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ fooCase_ = FooOneofCase.FooString;
+ }
+ }
+ /// <summary>Gets whether the "foo_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooString {
+ get { return fooCase_ == FooOneofCase.FooString; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_string" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooString() {
+ if (HasFooString) {
+ ClearFoo();
+ }
+ }
+
+ /// <summary>Field number for the "foo_message" field.</summary>
+ public const int FooMessageFieldNumber = 3;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestRequiredOneof.Types.NestedMessage FooMessage {
+ get { return HasFooMessage ? (global::Google.Protobuf.TestProtos.Proto2.TestRequiredOneof.Types.NestedMessage) foo_ : null; }
+ set {
+ foo_ = value;
+ fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooMessage;
+ }
+ }
+ /// <summary>Gets whether the "foo_message" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFooMessage {
+ get { return fooCase_ == FooOneofCase.FooMessage; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "foo_message" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFooMessage() {
+ if (HasFooMessage) {
+ ClearFoo();
+ }
+ }
+
+ private object foo_;
+ /// <summary>Enum of possible cases for the "foo" oneof.</summary>
+ public enum FooOneofCase {
+ None = 0,
+ FooInt = 1,
+ FooString = 2,
+ FooMessage = 3,
+ }
+ private FooOneofCase fooCase_ = FooOneofCase.None;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooOneofCase FooCase {
+ get { return fooCase_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFoo() {
+ fooCase_ = FooOneofCase.None;
+ foo_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestRequiredOneof);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestRequiredOneof other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FooInt != other.FooInt) return false;
+ if (FooString != other.FooString) return false;
+ if (!object.Equals(FooMessage, other.FooMessage)) return false;
+ if (FooCase != other.FooCase) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasFooInt) hash ^= FooInt.GetHashCode();
+ if (HasFooString) hash ^= FooString.GetHashCode();
+ if (HasFooMessage) hash ^= FooMessage.GetHashCode();
+ hash ^= (int) fooCase_;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasFooInt) {
+ output.WriteRawTag(8);
+ output.WriteInt32(FooInt);
+ }
+ if (HasFooString) {
+ output.WriteRawTag(18);
+ output.WriteString(FooString);
+ }
+ if (HasFooMessage) {
+ output.WriteRawTag(26);
+ output.WriteMessage(FooMessage);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasFooInt) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FooInt);
+ }
+ if (HasFooString) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(FooString);
+ }
+ if (HasFooMessage) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(FooMessage);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestRequiredOneof other) {
+ if (other == null) {
+ return;
+ }
+ switch (other.FooCase) {
+ case FooOneofCase.FooInt:
+ FooInt = other.FooInt;
+ break;
+ case FooOneofCase.FooString:
+ FooString = other.FooString;
+ break;
+ case FooOneofCase.FooMessage:
+ if (FooMessage == null) {
+ FooMessage = new global::Google.Protobuf.TestProtos.Proto2.TestRequiredOneof.Types.NestedMessage();
+ }
+ FooMessage.MergeFrom(other.FooMessage);
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ FooInt = input.ReadInt32();
+ break;
+ }
+ case 18: {
+ FooString = input.ReadString();
+ break;
+ }
+ case 26: {
+ global::Google.Protobuf.TestProtos.Proto2.TestRequiredOneof.Types.NestedMessage subBuilder = new global::Google.Protobuf.TestProtos.Proto2.TestRequiredOneof.Types.NestedMessage();
+ if (HasFooMessage) {
+ subBuilder.MergeFrom(FooMessage);
+ }
+ input.ReadMessage(subBuilder);
+ FooMessage = subBuilder;
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestRequiredOneof message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class NestedMessage : pb::IMessage<NestedMessage> {
+ private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestRequiredOneof.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage(NestedMessage other) : this() {
+ _hasBits0 = other._hasBits0;
+ requiredDouble_ = other.requiredDouble_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public NestedMessage Clone() {
+ return new NestedMessage(this);
+ }
+
+ /// <summary>Field number for the "required_double" field.</summary>
+ public const int RequiredDoubleFieldNumber = 1;
+ private readonly static double RequiredDoubleDefaultValue = 0D;
+
+ private double requiredDouble_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double RequiredDouble {
+ get { if ((_hasBits0 & 1) != 0) { return requiredDouble_; } else { return RequiredDoubleDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ requiredDouble_ = value;
+ }
+ }
+ /// <summary>Gets whether the "required_double" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasRequiredDouble {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "required_double" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearRequiredDouble() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as NestedMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(NestedMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(RequiredDouble, other.RequiredDouble)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasRequiredDouble) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(RequiredDouble);
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasRequiredDouble) {
+ output.WriteRawTag(9);
+ output.WriteDouble(RequiredDouble);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasRequiredDouble) {
+ size += 1 + 8;
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(NestedMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasRequiredDouble) {
+ RequiredDouble = other.RequiredDouble;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 9: {
+ RequiredDouble = input.ReadDouble();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestPackedTypes : pb::IMessage<TestPackedTypes> {
+ private static readonly pb::MessageParser<TestPackedTypes> _parser = new pb::MessageParser<TestPackedTypes>(() => new TestPackedTypes());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestPackedTypes> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[47]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestPackedTypes() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestPackedTypes(TestPackedTypes other) : this() {
+ packedInt32_ = other.packedInt32_.Clone();
+ packedInt64_ = other.packedInt64_.Clone();
+ packedUint32_ = other.packedUint32_.Clone();
+ packedUint64_ = other.packedUint64_.Clone();
+ packedSint32_ = other.packedSint32_.Clone();
+ packedSint64_ = other.packedSint64_.Clone();
+ packedFixed32_ = other.packedFixed32_.Clone();
+ packedFixed64_ = other.packedFixed64_.Clone();
+ packedSfixed32_ = other.packedSfixed32_.Clone();
+ packedSfixed64_ = other.packedSfixed64_.Clone();
+ packedFloat_ = other.packedFloat_.Clone();
+ packedDouble_ = other.packedDouble_.Clone();
+ packedBool_ = other.packedBool_.Clone();
+ packedEnum_ = other.packedEnum_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestPackedTypes Clone() {
+ return new TestPackedTypes(this);
+ }
+
+ /// <summary>Field number for the "packed_int32" field.</summary>
+ public const int PackedInt32FieldNumber = 90;
+ private static readonly pb::FieldCodec<int> _repeated_packedInt32_codec
+ = pb::FieldCodec.ForInt32(722);
+ private readonly pbc::RepeatedField<int> packedInt32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> PackedInt32 {
+ get { return packedInt32_; }
+ }
+
+ /// <summary>Field number for the "packed_int64" field.</summary>
+ public const int PackedInt64FieldNumber = 91;
+ private static readonly pb::FieldCodec<long> _repeated_packedInt64_codec
+ = pb::FieldCodec.ForInt64(730);
+ private readonly pbc::RepeatedField<long> packedInt64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> PackedInt64 {
+ get { return packedInt64_; }
+ }
+
+ /// <summary>Field number for the "packed_uint32" field.</summary>
+ public const int PackedUint32FieldNumber = 92;
+ private static readonly pb::FieldCodec<uint> _repeated_packedUint32_codec
+ = pb::FieldCodec.ForUInt32(738);
+ private readonly pbc::RepeatedField<uint> packedUint32_ = new pbc::RepeatedField<uint>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<uint> PackedUint32 {
+ get { return packedUint32_; }
+ }
+
+ /// <summary>Field number for the "packed_uint64" field.</summary>
+ public const int PackedUint64FieldNumber = 93;
+ private static readonly pb::FieldCodec<ulong> _repeated_packedUint64_codec
+ = pb::FieldCodec.ForUInt64(746);
+ private readonly pbc::RepeatedField<ulong> packedUint64_ = new pbc::RepeatedField<ulong>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<ulong> PackedUint64 {
+ get { return packedUint64_; }
+ }
+
+ /// <summary>Field number for the "packed_sint32" field.</summary>
+ public const int PackedSint32FieldNumber = 94;
+ private static readonly pb::FieldCodec<int> _repeated_packedSint32_codec
+ = pb::FieldCodec.ForSInt32(754);
+ private readonly pbc::RepeatedField<int> packedSint32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> PackedSint32 {
+ get { return packedSint32_; }
+ }
+
+ /// <summary>Field number for the "packed_sint64" field.</summary>
+ public const int PackedSint64FieldNumber = 95;
+ private static readonly pb::FieldCodec<long> _repeated_packedSint64_codec
+ = pb::FieldCodec.ForSInt64(762);
+ private readonly pbc::RepeatedField<long> packedSint64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> PackedSint64 {
+ get { return packedSint64_; }
+ }
+
+ /// <summary>Field number for the "packed_fixed32" field.</summary>
+ public const int PackedFixed32FieldNumber = 96;
+ private static readonly pb::FieldCodec<uint> _repeated_packedFixed32_codec
+ = pb::FieldCodec.ForFixed32(770);
+ private readonly pbc::RepeatedField<uint> packedFixed32_ = new pbc::RepeatedField<uint>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<uint> PackedFixed32 {
+ get { return packedFixed32_; }
+ }
+
+ /// <summary>Field number for the "packed_fixed64" field.</summary>
+ public const int PackedFixed64FieldNumber = 97;
+ private static readonly pb::FieldCodec<ulong> _repeated_packedFixed64_codec
+ = pb::FieldCodec.ForFixed64(778);
+ private readonly pbc::RepeatedField<ulong> packedFixed64_ = new pbc::RepeatedField<ulong>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<ulong> PackedFixed64 {
+ get { return packedFixed64_; }
+ }
+
+ /// <summary>Field number for the "packed_sfixed32" field.</summary>
+ public const int PackedSfixed32FieldNumber = 98;
+ private static readonly pb::FieldCodec<int> _repeated_packedSfixed32_codec
+ = pb::FieldCodec.ForSFixed32(786);
+ private readonly pbc::RepeatedField<int> packedSfixed32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> PackedSfixed32 {
+ get { return packedSfixed32_; }
+ }
+
+ /// <summary>Field number for the "packed_sfixed64" field.</summary>
+ public const int PackedSfixed64FieldNumber = 99;
+ private static readonly pb::FieldCodec<long> _repeated_packedSfixed64_codec
+ = pb::FieldCodec.ForSFixed64(794);
+ private readonly pbc::RepeatedField<long> packedSfixed64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> PackedSfixed64 {
+ get { return packedSfixed64_; }
+ }
+
+ /// <summary>Field number for the "packed_float" field.</summary>
+ public const int PackedFloatFieldNumber = 100;
+ private static readonly pb::FieldCodec<float> _repeated_packedFloat_codec
+ = pb::FieldCodec.ForFloat(802);
+ private readonly pbc::RepeatedField<float> packedFloat_ = new pbc::RepeatedField<float>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<float> PackedFloat {
+ get { return packedFloat_; }
+ }
+
+ /// <summary>Field number for the "packed_double" field.</summary>
+ public const int PackedDoubleFieldNumber = 101;
+ private static readonly pb::FieldCodec<double> _repeated_packedDouble_codec
+ = pb::FieldCodec.ForDouble(810);
+ private readonly pbc::RepeatedField<double> packedDouble_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> PackedDouble {
+ get { return packedDouble_; }
+ }
+
+ /// <summary>Field number for the "packed_bool" field.</summary>
+ public const int PackedBoolFieldNumber = 102;
+ private static readonly pb::FieldCodec<bool> _repeated_packedBool_codec
+ = pb::FieldCodec.ForBool(818);
+ private readonly pbc::RepeatedField<bool> packedBool_ = new pbc::RepeatedField<bool>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<bool> PackedBool {
+ get { return packedBool_; }
+ }
+
+ /// <summary>Field number for the "packed_enum" field.</summary>
+ public const int PackedEnumFieldNumber = 103;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> _repeated_packedEnum_codec
+ = pb::FieldCodec.ForEnum(826, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> packedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> PackedEnum {
+ get { return packedEnum_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestPackedTypes);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestPackedTypes other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!packedInt32_.Equals(other.packedInt32_)) return false;
+ if(!packedInt64_.Equals(other.packedInt64_)) return false;
+ if(!packedUint32_.Equals(other.packedUint32_)) return false;
+ if(!packedUint64_.Equals(other.packedUint64_)) return false;
+ if(!packedSint32_.Equals(other.packedSint32_)) return false;
+ if(!packedSint64_.Equals(other.packedSint64_)) return false;
+ if(!packedFixed32_.Equals(other.packedFixed32_)) return false;
+ if(!packedFixed64_.Equals(other.packedFixed64_)) return false;
+ if(!packedSfixed32_.Equals(other.packedSfixed32_)) return false;
+ if(!packedSfixed64_.Equals(other.packedSfixed64_)) return false;
+ if(!packedFloat_.Equals(other.packedFloat_)) return false;
+ if(!packedDouble_.Equals(other.packedDouble_)) return false;
+ if(!packedBool_.Equals(other.packedBool_)) return false;
+ if(!packedEnum_.Equals(other.packedEnum_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= packedInt32_.GetHashCode();
+ hash ^= packedInt64_.GetHashCode();
+ hash ^= packedUint32_.GetHashCode();
+ hash ^= packedUint64_.GetHashCode();
+ hash ^= packedSint32_.GetHashCode();
+ hash ^= packedSint64_.GetHashCode();
+ hash ^= packedFixed32_.GetHashCode();
+ hash ^= packedFixed64_.GetHashCode();
+ hash ^= packedSfixed32_.GetHashCode();
+ hash ^= packedSfixed64_.GetHashCode();
+ hash ^= packedFloat_.GetHashCode();
+ hash ^= packedDouble_.GetHashCode();
+ hash ^= packedBool_.GetHashCode();
+ hash ^= packedEnum_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ packedInt32_.WriteTo(output, _repeated_packedInt32_codec);
+ packedInt64_.WriteTo(output, _repeated_packedInt64_codec);
+ packedUint32_.WriteTo(output, _repeated_packedUint32_codec);
+ packedUint64_.WriteTo(output, _repeated_packedUint64_codec);
+ packedSint32_.WriteTo(output, _repeated_packedSint32_codec);
+ packedSint64_.WriteTo(output, _repeated_packedSint64_codec);
+ packedFixed32_.WriteTo(output, _repeated_packedFixed32_codec);
+ packedFixed64_.WriteTo(output, _repeated_packedFixed64_codec);
+ packedSfixed32_.WriteTo(output, _repeated_packedSfixed32_codec);
+ packedSfixed64_.WriteTo(output, _repeated_packedSfixed64_codec);
+ packedFloat_.WriteTo(output, _repeated_packedFloat_codec);
+ packedDouble_.WriteTo(output, _repeated_packedDouble_codec);
+ packedBool_.WriteTo(output, _repeated_packedBool_codec);
+ packedEnum_.WriteTo(output, _repeated_packedEnum_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ size += packedInt32_.CalculateSize(_repeated_packedInt32_codec);
+ size += packedInt64_.CalculateSize(_repeated_packedInt64_codec);
+ size += packedUint32_.CalculateSize(_repeated_packedUint32_codec);
+ size += packedUint64_.CalculateSize(_repeated_packedUint64_codec);
+ size += packedSint32_.CalculateSize(_repeated_packedSint32_codec);
+ size += packedSint64_.CalculateSize(_repeated_packedSint64_codec);
+ size += packedFixed32_.CalculateSize(_repeated_packedFixed32_codec);
+ size += packedFixed64_.CalculateSize(_repeated_packedFixed64_codec);
+ size += packedSfixed32_.CalculateSize(_repeated_packedSfixed32_codec);
+ size += packedSfixed64_.CalculateSize(_repeated_packedSfixed64_codec);
+ size += packedFloat_.CalculateSize(_repeated_packedFloat_codec);
+ size += packedDouble_.CalculateSize(_repeated_packedDouble_codec);
+ size += packedBool_.CalculateSize(_repeated_packedBool_codec);
+ size += packedEnum_.CalculateSize(_repeated_packedEnum_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestPackedTypes other) {
+ if (other == null) {
+ return;
+ }
+ packedInt32_.Add(other.packedInt32_);
+ packedInt64_.Add(other.packedInt64_);
+ packedUint32_.Add(other.packedUint32_);
+ packedUint64_.Add(other.packedUint64_);
+ packedSint32_.Add(other.packedSint32_);
+ packedSint64_.Add(other.packedSint64_);
+ packedFixed32_.Add(other.packedFixed32_);
+ packedFixed64_.Add(other.packedFixed64_);
+ packedSfixed32_.Add(other.packedSfixed32_);
+ packedSfixed64_.Add(other.packedSfixed64_);
+ packedFloat_.Add(other.packedFloat_);
+ packedDouble_.Add(other.packedDouble_);
+ packedBool_.Add(other.packedBool_);
+ packedEnum_.Add(other.packedEnum_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 722:
+ case 720: {
+ packedInt32_.AddEntriesFrom(input, _repeated_packedInt32_codec);
+ break;
+ }
+ case 730:
+ case 728: {
+ packedInt64_.AddEntriesFrom(input, _repeated_packedInt64_codec);
+ break;
+ }
+ case 738:
+ case 736: {
+ packedUint32_.AddEntriesFrom(input, _repeated_packedUint32_codec);
+ break;
+ }
+ case 746:
+ case 744: {
+ packedUint64_.AddEntriesFrom(input, _repeated_packedUint64_codec);
+ break;
+ }
+ case 754:
+ case 752: {
+ packedSint32_.AddEntriesFrom(input, _repeated_packedSint32_codec);
+ break;
+ }
+ case 762:
+ case 760: {
+ packedSint64_.AddEntriesFrom(input, _repeated_packedSint64_codec);
+ break;
+ }
+ case 770:
+ case 773: {
+ packedFixed32_.AddEntriesFrom(input, _repeated_packedFixed32_codec);
+ break;
+ }
+ case 778:
+ case 777: {
+ packedFixed64_.AddEntriesFrom(input, _repeated_packedFixed64_codec);
+ break;
+ }
+ case 786:
+ case 789: {
+ packedSfixed32_.AddEntriesFrom(input, _repeated_packedSfixed32_codec);
+ break;
+ }
+ case 794:
+ case 793: {
+ packedSfixed64_.AddEntriesFrom(input, _repeated_packedSfixed64_codec);
+ break;
+ }
+ case 802:
+ case 805: {
+ packedFloat_.AddEntriesFrom(input, _repeated_packedFloat_codec);
+ break;
+ }
+ case 810:
+ case 809: {
+ packedDouble_.AddEntriesFrom(input, _repeated_packedDouble_codec);
+ break;
+ }
+ case 818:
+ case 816: {
+ packedBool_.AddEntriesFrom(input, _repeated_packedBool_codec);
+ break;
+ }
+ case 826:
+ case 824: {
+ packedEnum_.AddEntriesFrom(input, _repeated_packedEnum_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// A message with the same fields as TestPackedTypes, but without packing. Used
+ /// to test packed <-> unpacked wire compatibility.
+ /// </summary>
+ public sealed partial class TestUnpackedTypes : pb::IMessage<TestUnpackedTypes> {
+ private static readonly pb::MessageParser<TestUnpackedTypes> _parser = new pb::MessageParser<TestUnpackedTypes>(() => new TestUnpackedTypes());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestUnpackedTypes> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[48]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestUnpackedTypes() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestUnpackedTypes(TestUnpackedTypes other) : this() {
+ unpackedInt32_ = other.unpackedInt32_.Clone();
+ unpackedInt64_ = other.unpackedInt64_.Clone();
+ unpackedUint32_ = other.unpackedUint32_.Clone();
+ unpackedUint64_ = other.unpackedUint64_.Clone();
+ unpackedSint32_ = other.unpackedSint32_.Clone();
+ unpackedSint64_ = other.unpackedSint64_.Clone();
+ unpackedFixed32_ = other.unpackedFixed32_.Clone();
+ unpackedFixed64_ = other.unpackedFixed64_.Clone();
+ unpackedSfixed32_ = other.unpackedSfixed32_.Clone();
+ unpackedSfixed64_ = other.unpackedSfixed64_.Clone();
+ unpackedFloat_ = other.unpackedFloat_.Clone();
+ unpackedDouble_ = other.unpackedDouble_.Clone();
+ unpackedBool_ = other.unpackedBool_.Clone();
+ unpackedEnum_ = other.unpackedEnum_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestUnpackedTypes Clone() {
+ return new TestUnpackedTypes(this);
+ }
+
+ /// <summary>Field number for the "unpacked_int32" field.</summary>
+ public const int UnpackedInt32FieldNumber = 90;
+ private static readonly pb::FieldCodec<int> _repeated_unpackedInt32_codec
+ = pb::FieldCodec.ForInt32(720);
+ private readonly pbc::RepeatedField<int> unpackedInt32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> UnpackedInt32 {
+ get { return unpackedInt32_; }
+ }
+
+ /// <summary>Field number for the "unpacked_int64" field.</summary>
+ public const int UnpackedInt64FieldNumber = 91;
+ private static readonly pb::FieldCodec<long> _repeated_unpackedInt64_codec
+ = pb::FieldCodec.ForInt64(728);
+ private readonly pbc::RepeatedField<long> unpackedInt64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> UnpackedInt64 {
+ get { return unpackedInt64_; }
+ }
+
+ /// <summary>Field number for the "unpacked_uint32" field.</summary>
+ public const int UnpackedUint32FieldNumber = 92;
+ private static readonly pb::FieldCodec<uint> _repeated_unpackedUint32_codec
+ = pb::FieldCodec.ForUInt32(736);
+ private readonly pbc::RepeatedField<uint> unpackedUint32_ = new pbc::RepeatedField<uint>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<uint> UnpackedUint32 {
+ get { return unpackedUint32_; }
+ }
+
+ /// <summary>Field number for the "unpacked_uint64" field.</summary>
+ public const int UnpackedUint64FieldNumber = 93;
+ private static readonly pb::FieldCodec<ulong> _repeated_unpackedUint64_codec
+ = pb::FieldCodec.ForUInt64(744);
+ private readonly pbc::RepeatedField<ulong> unpackedUint64_ = new pbc::RepeatedField<ulong>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<ulong> UnpackedUint64 {
+ get { return unpackedUint64_; }
+ }
+
+ /// <summary>Field number for the "unpacked_sint32" field.</summary>
+ public const int UnpackedSint32FieldNumber = 94;
+ private static readonly pb::FieldCodec<int> _repeated_unpackedSint32_codec
+ = pb::FieldCodec.ForSInt32(752);
+ private readonly pbc::RepeatedField<int> unpackedSint32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> UnpackedSint32 {
+ get { return unpackedSint32_; }
+ }
+
+ /// <summary>Field number for the "unpacked_sint64" field.</summary>
+ public const int UnpackedSint64FieldNumber = 95;
+ private static readonly pb::FieldCodec<long> _repeated_unpackedSint64_codec
+ = pb::FieldCodec.ForSInt64(760);
+ private readonly pbc::RepeatedField<long> unpackedSint64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> UnpackedSint64 {
+ get { return unpackedSint64_; }
+ }
+
+ /// <summary>Field number for the "unpacked_fixed32" field.</summary>
+ public const int UnpackedFixed32FieldNumber = 96;
+ private static readonly pb::FieldCodec<uint> _repeated_unpackedFixed32_codec
+ = pb::FieldCodec.ForFixed32(773);
+ private readonly pbc::RepeatedField<uint> unpackedFixed32_ = new pbc::RepeatedField<uint>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<uint> UnpackedFixed32 {
+ get { return unpackedFixed32_; }
+ }
+
+ /// <summary>Field number for the "unpacked_fixed64" field.</summary>
+ public const int UnpackedFixed64FieldNumber = 97;
+ private static readonly pb::FieldCodec<ulong> _repeated_unpackedFixed64_codec
+ = pb::FieldCodec.ForFixed64(777);
+ private readonly pbc::RepeatedField<ulong> unpackedFixed64_ = new pbc::RepeatedField<ulong>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<ulong> UnpackedFixed64 {
+ get { return unpackedFixed64_; }
+ }
+
+ /// <summary>Field number for the "unpacked_sfixed32" field.</summary>
+ public const int UnpackedSfixed32FieldNumber = 98;
+ private static readonly pb::FieldCodec<int> _repeated_unpackedSfixed32_codec
+ = pb::FieldCodec.ForSFixed32(789);
+ private readonly pbc::RepeatedField<int> unpackedSfixed32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> UnpackedSfixed32 {
+ get { return unpackedSfixed32_; }
+ }
+
+ /// <summary>Field number for the "unpacked_sfixed64" field.</summary>
+ public const int UnpackedSfixed64FieldNumber = 99;
+ private static readonly pb::FieldCodec<long> _repeated_unpackedSfixed64_codec
+ = pb::FieldCodec.ForSFixed64(793);
+ private readonly pbc::RepeatedField<long> unpackedSfixed64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> UnpackedSfixed64 {
+ get { return unpackedSfixed64_; }
+ }
+
+ /// <summary>Field number for the "unpacked_float" field.</summary>
+ public const int UnpackedFloatFieldNumber = 100;
+ private static readonly pb::FieldCodec<float> _repeated_unpackedFloat_codec
+ = pb::FieldCodec.ForFloat(805);
+ private readonly pbc::RepeatedField<float> unpackedFloat_ = new pbc::RepeatedField<float>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<float> UnpackedFloat {
+ get { return unpackedFloat_; }
+ }
+
+ /// <summary>Field number for the "unpacked_double" field.</summary>
+ public const int UnpackedDoubleFieldNumber = 101;
+ private static readonly pb::FieldCodec<double> _repeated_unpackedDouble_codec
+ = pb::FieldCodec.ForDouble(809);
+ private readonly pbc::RepeatedField<double> unpackedDouble_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> UnpackedDouble {
+ get { return unpackedDouble_; }
+ }
+
+ /// <summary>Field number for the "unpacked_bool" field.</summary>
+ public const int UnpackedBoolFieldNumber = 102;
+ private static readonly pb::FieldCodec<bool> _repeated_unpackedBool_codec
+ = pb::FieldCodec.ForBool(816);
+ private readonly pbc::RepeatedField<bool> unpackedBool_ = new pbc::RepeatedField<bool>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<bool> UnpackedBool {
+ get { return unpackedBool_; }
+ }
+
+ /// <summary>Field number for the "unpacked_enum" field.</summary>
+ public const int UnpackedEnumFieldNumber = 103;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> _repeated_unpackedEnum_codec
+ = pb::FieldCodec.ForEnum(824, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> unpackedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.ForeignEnum> UnpackedEnum {
+ get { return unpackedEnum_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestUnpackedTypes);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestUnpackedTypes other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!unpackedInt32_.Equals(other.unpackedInt32_)) return false;
+ if(!unpackedInt64_.Equals(other.unpackedInt64_)) return false;
+ if(!unpackedUint32_.Equals(other.unpackedUint32_)) return false;
+ if(!unpackedUint64_.Equals(other.unpackedUint64_)) return false;
+ if(!unpackedSint32_.Equals(other.unpackedSint32_)) return false;
+ if(!unpackedSint64_.Equals(other.unpackedSint64_)) return false;
+ if(!unpackedFixed32_.Equals(other.unpackedFixed32_)) return false;
+ if(!unpackedFixed64_.Equals(other.unpackedFixed64_)) return false;
+ if(!unpackedSfixed32_.Equals(other.unpackedSfixed32_)) return false;
+ if(!unpackedSfixed64_.Equals(other.unpackedSfixed64_)) return false;
+ if(!unpackedFloat_.Equals(other.unpackedFloat_)) return false;
+ if(!unpackedDouble_.Equals(other.unpackedDouble_)) return false;
+ if(!unpackedBool_.Equals(other.unpackedBool_)) return false;
+ if(!unpackedEnum_.Equals(other.unpackedEnum_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= unpackedInt32_.GetHashCode();
+ hash ^= unpackedInt64_.GetHashCode();
+ hash ^= unpackedUint32_.GetHashCode();
+ hash ^= unpackedUint64_.GetHashCode();
+ hash ^= unpackedSint32_.GetHashCode();
+ hash ^= unpackedSint64_.GetHashCode();
+ hash ^= unpackedFixed32_.GetHashCode();
+ hash ^= unpackedFixed64_.GetHashCode();
+ hash ^= unpackedSfixed32_.GetHashCode();
+ hash ^= unpackedSfixed64_.GetHashCode();
+ hash ^= unpackedFloat_.GetHashCode();
+ hash ^= unpackedDouble_.GetHashCode();
+ hash ^= unpackedBool_.GetHashCode();
+ hash ^= unpackedEnum_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ unpackedInt32_.WriteTo(output, _repeated_unpackedInt32_codec);
+ unpackedInt64_.WriteTo(output, _repeated_unpackedInt64_codec);
+ unpackedUint32_.WriteTo(output, _repeated_unpackedUint32_codec);
+ unpackedUint64_.WriteTo(output, _repeated_unpackedUint64_codec);
+ unpackedSint32_.WriteTo(output, _repeated_unpackedSint32_codec);
+ unpackedSint64_.WriteTo(output, _repeated_unpackedSint64_codec);
+ unpackedFixed32_.WriteTo(output, _repeated_unpackedFixed32_codec);
+ unpackedFixed64_.WriteTo(output, _repeated_unpackedFixed64_codec);
+ unpackedSfixed32_.WriteTo(output, _repeated_unpackedSfixed32_codec);
+ unpackedSfixed64_.WriteTo(output, _repeated_unpackedSfixed64_codec);
+ unpackedFloat_.WriteTo(output, _repeated_unpackedFloat_codec);
+ unpackedDouble_.WriteTo(output, _repeated_unpackedDouble_codec);
+ unpackedBool_.WriteTo(output, _repeated_unpackedBool_codec);
+ unpackedEnum_.WriteTo(output, _repeated_unpackedEnum_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ size += unpackedInt32_.CalculateSize(_repeated_unpackedInt32_codec);
+ size += unpackedInt64_.CalculateSize(_repeated_unpackedInt64_codec);
+ size += unpackedUint32_.CalculateSize(_repeated_unpackedUint32_codec);
+ size += unpackedUint64_.CalculateSize(_repeated_unpackedUint64_codec);
+ size += unpackedSint32_.CalculateSize(_repeated_unpackedSint32_codec);
+ size += unpackedSint64_.CalculateSize(_repeated_unpackedSint64_codec);
+ size += unpackedFixed32_.CalculateSize(_repeated_unpackedFixed32_codec);
+ size += unpackedFixed64_.CalculateSize(_repeated_unpackedFixed64_codec);
+ size += unpackedSfixed32_.CalculateSize(_repeated_unpackedSfixed32_codec);
+ size += unpackedSfixed64_.CalculateSize(_repeated_unpackedSfixed64_codec);
+ size += unpackedFloat_.CalculateSize(_repeated_unpackedFloat_codec);
+ size += unpackedDouble_.CalculateSize(_repeated_unpackedDouble_codec);
+ size += unpackedBool_.CalculateSize(_repeated_unpackedBool_codec);
+ size += unpackedEnum_.CalculateSize(_repeated_unpackedEnum_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestUnpackedTypes other) {
+ if (other == null) {
+ return;
+ }
+ unpackedInt32_.Add(other.unpackedInt32_);
+ unpackedInt64_.Add(other.unpackedInt64_);
+ unpackedUint32_.Add(other.unpackedUint32_);
+ unpackedUint64_.Add(other.unpackedUint64_);
+ unpackedSint32_.Add(other.unpackedSint32_);
+ unpackedSint64_.Add(other.unpackedSint64_);
+ unpackedFixed32_.Add(other.unpackedFixed32_);
+ unpackedFixed64_.Add(other.unpackedFixed64_);
+ unpackedSfixed32_.Add(other.unpackedSfixed32_);
+ unpackedSfixed64_.Add(other.unpackedSfixed64_);
+ unpackedFloat_.Add(other.unpackedFloat_);
+ unpackedDouble_.Add(other.unpackedDouble_);
+ unpackedBool_.Add(other.unpackedBool_);
+ unpackedEnum_.Add(other.unpackedEnum_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 722:
+ case 720: {
+ unpackedInt32_.AddEntriesFrom(input, _repeated_unpackedInt32_codec);
+ break;
+ }
+ case 730:
+ case 728: {
+ unpackedInt64_.AddEntriesFrom(input, _repeated_unpackedInt64_codec);
+ break;
+ }
+ case 738:
+ case 736: {
+ unpackedUint32_.AddEntriesFrom(input, _repeated_unpackedUint32_codec);
+ break;
+ }
+ case 746:
+ case 744: {
+ unpackedUint64_.AddEntriesFrom(input, _repeated_unpackedUint64_codec);
+ break;
+ }
+ case 754:
+ case 752: {
+ unpackedSint32_.AddEntriesFrom(input, _repeated_unpackedSint32_codec);
+ break;
+ }
+ case 762:
+ case 760: {
+ unpackedSint64_.AddEntriesFrom(input, _repeated_unpackedSint64_codec);
+ break;
+ }
+ case 770:
+ case 773: {
+ unpackedFixed32_.AddEntriesFrom(input, _repeated_unpackedFixed32_codec);
+ break;
+ }
+ case 778:
+ case 777: {
+ unpackedFixed64_.AddEntriesFrom(input, _repeated_unpackedFixed64_codec);
+ break;
+ }
+ case 786:
+ case 789: {
+ unpackedSfixed32_.AddEntriesFrom(input, _repeated_unpackedSfixed32_codec);
+ break;
+ }
+ case 794:
+ case 793: {
+ unpackedSfixed64_.AddEntriesFrom(input, _repeated_unpackedSfixed64_codec);
+ break;
+ }
+ case 802:
+ case 805: {
+ unpackedFloat_.AddEntriesFrom(input, _repeated_unpackedFloat_codec);
+ break;
+ }
+ case 810:
+ case 809: {
+ unpackedDouble_.AddEntriesFrom(input, _repeated_unpackedDouble_codec);
+ break;
+ }
+ case 818:
+ case 816: {
+ unpackedBool_.AddEntriesFrom(input, _repeated_unpackedBool_codec);
+ break;
+ }
+ case 826:
+ case 824: {
+ unpackedEnum_.AddEntriesFrom(input, _repeated_unpackedEnum_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class TestPackedExtensions : pb::IExtensionMessage<TestPackedExtensions> {
+ private static readonly pb::MessageParser<TestPackedExtensions> _parser = new pb::MessageParser<TestPackedExtensions>(() => new TestPackedExtensions());
+ private pb::UnknownFieldSet _unknownFields;
+ private pb::ExtensionSet<TestPackedExtensions> _extensions;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestPackedExtensions> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[49]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestPackedExtensions() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestPackedExtensions(TestPackedExtensions other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ _extensions = pb::ExtensionSet.Clone(other._extensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestPackedExtensions Clone() {
+ return new TestPackedExtensions(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestPackedExtensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestPackedExtensions other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!Equals(_extensions, other._extensions)) {
+ return false;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_extensions != null) {
+ hash ^= _extensions.GetHashCode();
+ }
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_extensions != null) {
+ _extensions.WriteTo(output);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_extensions != null) {
+ size += _extensions.CalculateSize();
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestPackedExtensions other) {
+ if (other == null) {
+ return;
+ }
+ pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ }
+ break;
+ }
+ }
+ }
+
+ public void RegisterExtension(pb::Extension extension) {
+ pb::ExtensionSet.Register(ref _extensions, extension);
+ }
+ public TValue GetExtension<TValue>(pb::Extension<TestPackedExtensions, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TestPackedExtensions, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public void SetExtension<TValue>(pb::Extension<TestPackedExtensions, TValue> extension, TValue value) {
+ pb::ExtensionSet.Set(ref _extensions, extension, value);
+ }
+ public bool HasExtension<TValue>(pb::Extension<TestPackedExtensions, TValue> extension) {
+ return pb::ExtensionSet.Has(ref _extensions, extension);
+ }
+ public void ClearExtension<TValue>(pb::Extension<TestPackedExtensions, TValue> extension) {
+ pb::ExtensionSet.Clear(ref _extensions, extension);
+ }
+
+ }
+
+ public sealed partial class TestUnpackedExtensions : pb::IExtensionMessage<TestUnpackedExtensions> {
+ private static readonly pb::MessageParser<TestUnpackedExtensions> _parser = new pb::MessageParser<TestUnpackedExtensions>(() => new TestUnpackedExtensions());
+ private pb::UnknownFieldSet _unknownFields;
+ private pb::ExtensionSet<TestUnpackedExtensions> _extensions;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestUnpackedExtensions> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[50]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestUnpackedExtensions() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestUnpackedExtensions(TestUnpackedExtensions other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ _extensions = pb::ExtensionSet.Clone(other._extensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestUnpackedExtensions Clone() {
+ return new TestUnpackedExtensions(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestUnpackedExtensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestUnpackedExtensions other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!Equals(_extensions, other._extensions)) {
+ return false;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_extensions != null) {
+ hash ^= _extensions.GetHashCode();
+ }
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_extensions != null) {
+ _extensions.WriteTo(output);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_extensions != null) {
+ size += _extensions.CalculateSize();
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestUnpackedExtensions other) {
+ if (other == null) {
+ return;
+ }
+ pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ }
+ break;
+ }
+ }
+ }
+
+ public void RegisterExtension(pb::Extension extension) {
+ pb::ExtensionSet.Register(ref _extensions, extension);
+ }
+ public TValue GetExtension<TValue>(pb::Extension<TestUnpackedExtensions, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TestUnpackedExtensions, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public void SetExtension<TValue>(pb::Extension<TestUnpackedExtensions, TValue> extension, TValue value) {
+ pb::ExtensionSet.Set(ref _extensions, extension, value);
+ }
+ public bool HasExtension<TValue>(pb::Extension<TestUnpackedExtensions, TValue> extension) {
+ return pb::ExtensionSet.Has(ref _extensions, extension);
+ }
+ public void ClearExtension<TValue>(pb::Extension<TestUnpackedExtensions, TValue> extension) {
+ pb::ExtensionSet.Clear(ref _extensions, extension);
+ }
+
+ }
+
+ /// <summary>
+ /// Used by ExtensionSetTest/DynamicExtensions. The test actually builds
+ /// a set of extensions to TestAllExtensions dynamically, based on the fields
+ /// of this message type.
+ /// </summary>
+ public sealed partial class TestDynamicExtensions : pb::IMessage<TestDynamicExtensions> {
+ private static readonly pb::MessageParser<TestDynamicExtensions> _parser = new pb::MessageParser<TestDynamicExtensions>(() => new TestDynamicExtensions());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestDynamicExtensions> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[51]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDynamicExtensions() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDynamicExtensions(TestDynamicExtensions other) : this() {
+ _hasBits0 = other._hasBits0;
+ scalarExtension_ = other.scalarExtension_;
+ enumExtension_ = other.enumExtension_;
+ dynamicEnumExtension_ = other.dynamicEnumExtension_;
+ messageExtension_ = other.HasMessageExtension ? other.messageExtension_.Clone() : null;
+ dynamicMessageExtension_ = other.HasDynamicMessageExtension ? other.dynamicMessageExtension_.Clone() : null;
+ repeatedExtension_ = other.repeatedExtension_.Clone();
+ packedExtension_ = other.packedExtension_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestDynamicExtensions Clone() {
+ return new TestDynamicExtensions(this);
+ }
+
+ /// <summary>Field number for the "scalar_extension" field.</summary>
+ public const int ScalarExtensionFieldNumber = 2000;
+ private readonly static uint ScalarExtensionDefaultValue = 0;
+
+ private uint scalarExtension_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint ScalarExtension {
+ get { if ((_hasBits0 & 1) != 0) { return scalarExtension_; } else { return ScalarExtensionDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ scalarExtension_ = value;
+ }
+ }
+ /// <summary>Gets whether the "scalar_extension" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasScalarExtension {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "scalar_extension" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearScalarExtension() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "enum_extension" field.</summary>
+ public const int EnumExtensionFieldNumber = 2001;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.ForeignEnum EnumExtensionDefaultValue = global::Google.Protobuf.TestProtos.Proto2.ForeignEnum.ForeignFoo;
+
+ private global::Google.Protobuf.TestProtos.Proto2.ForeignEnum enumExtension_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ForeignEnum EnumExtension {
+ get { if ((_hasBits0 & 2) != 0) { return enumExtension_; } else { return EnumExtensionDefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ enumExtension_ = value;
+ }
+ }
+ /// <summary>Gets whether the "enum_extension" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasEnumExtension {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "enum_extension" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearEnumExtension() {
+ _hasBits0 &= ~2;
+ }
+
+ /// <summary>Field number for the "dynamic_enum_extension" field.</summary>
+ public const int DynamicEnumExtensionFieldNumber = 2002;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicEnumType DynamicEnumExtensionDefaultValue = global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicEnumType.DynamicFoo;
+
+ private global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicEnumType dynamicEnumExtension_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicEnumType DynamicEnumExtension {
+ get { if ((_hasBits0 & 4) != 0) { return dynamicEnumExtension_; } else { return DynamicEnumExtensionDefaultValue; } }
+ set {
+ _hasBits0 |= 4;
+ dynamicEnumExtension_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dynamic_enum_extension" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDynamicEnumExtension {
+ get { return (_hasBits0 & 4) != 0; }
+ }
+ /// <summary>Clears the value of the "dynamic_enum_extension" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDynamicEnumExtension() {
+ _hasBits0 &= ~4;
+ }
+
+ /// <summary>Field number for the "message_extension" field.</summary>
+ public const int MessageExtensionFieldNumber = 2003;
+ private global::Google.Protobuf.TestProtos.Proto2.ForeignMessage messageExtension_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ForeignMessage MessageExtension {
+ get { return messageExtension_; }
+ set {
+ messageExtension_ = value;
+ }
+ }
+ /// <summary>Gets whether the message_extension field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasMessageExtension {
+ get { return messageExtension_ != null; }
+ }
+ /// <summary>Clears the value of the message_extension field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearMessageExtension() {
+ messageExtension_ = null;
+ }
+
+ /// <summary>Field number for the "dynamic_message_extension" field.</summary>
+ public const int DynamicMessageExtensionFieldNumber = 2004;
+ private global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicMessageType dynamicMessageExtension_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicMessageType DynamicMessageExtension {
+ get { return dynamicMessageExtension_; }
+ set {
+ dynamicMessageExtension_ = value;
+ }
+ }
+ /// <summary>Gets whether the dynamic_message_extension field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDynamicMessageExtension {
+ get { return dynamicMessageExtension_ != null; }
+ }
+ /// <summary>Clears the value of the dynamic_message_extension field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDynamicMessageExtension() {
+ dynamicMessageExtension_ = null;
+ }
+
+ /// <summary>Field number for the "repeated_extension" field.</summary>
+ public const int RepeatedExtensionFieldNumber = 2005;
+ private static readonly pb::FieldCodec<string> _repeated_repeatedExtension_codec
+ = pb::FieldCodec.ForString(16042);
+ private readonly pbc::RepeatedField<string> repeatedExtension_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<string> RepeatedExtension {
+ get { return repeatedExtension_; }
+ }
+
+ /// <summary>Field number for the "packed_extension" field.</summary>
+ public const int PackedExtensionFieldNumber = 2006;
+ private static readonly pb::FieldCodec<int> _repeated_packedExtension_codec
+ = pb::FieldCodec.ForSInt32(16050);
+ private readonly pbc::RepeatedField<int> packedExtension_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> PackedExtension {
+ get { return packedExtension_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestDynamicExtensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestDynamicExtensions other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (ScalarExtension != other.ScalarExtension) return false;
+ if (EnumExtension != other.EnumExtension) return false;
+ if (DynamicEnumExtension != other.DynamicEnumExtension) return false;
+ if (!object.Equals(MessageExtension, other.MessageExtension)) return false;
+ if (!object.Equals(DynamicMessageExtension, other.DynamicMessageExtension)) return false;
+ if(!repeatedExtension_.Equals(other.repeatedExtension_)) return false;
+ if(!packedExtension_.Equals(other.packedExtension_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasScalarExtension) hash ^= ScalarExtension.GetHashCode();
+ if (HasEnumExtension) hash ^= EnumExtension.GetHashCode();
+ if (HasDynamicEnumExtension) hash ^= DynamicEnumExtension.GetHashCode();
+ if (HasMessageExtension) hash ^= MessageExtension.GetHashCode();
+ if (HasDynamicMessageExtension) hash ^= DynamicMessageExtension.GetHashCode();
+ hash ^= repeatedExtension_.GetHashCode();
+ hash ^= packedExtension_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasScalarExtension) {
+ output.WriteRawTag(133, 125);
+ output.WriteFixed32(ScalarExtension);
+ }
+ if (HasEnumExtension) {
+ output.WriteRawTag(136, 125);
+ output.WriteEnum((int) EnumExtension);
+ }
+ if (HasDynamicEnumExtension) {
+ output.WriteRawTag(144, 125);
+ output.WriteEnum((int) DynamicEnumExtension);
+ }
+ if (HasMessageExtension) {
+ output.WriteRawTag(154, 125);
+ output.WriteMessage(MessageExtension);
+ }
+ if (HasDynamicMessageExtension) {
+ output.WriteRawTag(162, 125);
+ output.WriteMessage(DynamicMessageExtension);
+ }
+ repeatedExtension_.WriteTo(output, _repeated_repeatedExtension_codec);
+ packedExtension_.WriteTo(output, _repeated_packedExtension_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasScalarExtension) {
+ size += 2 + 4;
+ }
+ if (HasEnumExtension) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) EnumExtension);
+ }
+ if (HasDynamicEnumExtension) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) DynamicEnumExtension);
+ }
+ if (HasMessageExtension) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(MessageExtension);
+ }
+ if (HasDynamicMessageExtension) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(DynamicMessageExtension);
+ }
+ size += repeatedExtension_.CalculateSize(_repeated_repeatedExtension_codec);
+ size += packedExtension_.CalculateSize(_repeated_packedExtension_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestDynamicExtensions other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasScalarExtension) {
+ ScalarExtension = other.ScalarExtension;
+ }
+ if (other.HasEnumExtension) {
+ EnumExtension = other.EnumExtension;
+ }
+ if (other.HasDynamicEnumExtension) {
+ DynamicEnumExtension = other.DynamicEnumExtension;
+ }
+ if (other.HasMessageExtension) {
+ if (!HasMessageExtension) {
+ MessageExtension = new global::Google.Protobuf.TestProtos.Proto2.ForeignMessage();
+ }
+ MessageExtension.MergeFrom(other.MessageExtension);
+ }
+ if (other.HasDynamicMessageExtension) {
+ if (!HasDynamicMessageExtension) {
+ DynamicMessageExtension = new global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicMessageType();
+ }
+ DynamicMessageExtension.MergeFrom(other.DynamicMessageExtension);
+ }
+ repeatedExtension_.Add(other.repeatedExtension_);
+ packedExtension_.Add(other.packedExtension_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 16005: {
+ ScalarExtension = input.ReadFixed32();
+ break;
+ }
+ case 16008: {
+ EnumExtension = (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) input.ReadEnum();
+ break;
+ }
+ case 16016: {
+ DynamicEnumExtension = (global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicEnumType) input.ReadEnum();
+ break;
+ }
+ case 16026: {
+ if (!HasMessageExtension) {
+ MessageExtension = new global::Google.Protobuf.TestProtos.Proto2.ForeignMessage();
+ }
+ input.ReadMessage(MessageExtension);
+ break;
+ }
+ case 16034: {
+ if (!HasDynamicMessageExtension) {
+ DynamicMessageExtension = new global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Types.DynamicMessageType();
+ }
+ input.ReadMessage(DynamicMessageExtension);
+ break;
+ }
+ case 16042: {
+ repeatedExtension_.AddEntriesFrom(input, _repeated_repeatedExtension_codec);
+ break;
+ }
+ case 16050:
+ case 16048: {
+ packedExtension_.AddEntriesFrom(input, _repeated_packedExtension_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestDynamicExtensions message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public enum DynamicEnumType {
+ [pbr::OriginalName("DYNAMIC_FOO")] DynamicFoo = 2200,
+ [pbr::OriginalName("DYNAMIC_BAR")] DynamicBar = 2201,
+ [pbr::OriginalName("DYNAMIC_BAZ")] DynamicBaz = 2202,
+ }
+
+ public sealed partial class DynamicMessageType : pb::IMessage<DynamicMessageType> {
+ private static readonly pb::MessageParser<DynamicMessageType> _parser = new pb::MessageParser<DynamicMessageType>(() => new DynamicMessageType());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<DynamicMessageType> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestDynamicExtensions.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public DynamicMessageType() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public DynamicMessageType(DynamicMessageType other) : this() {
+ _hasBits0 = other._hasBits0;
+ dynamicField_ = other.dynamicField_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public DynamicMessageType Clone() {
+ return new DynamicMessageType(this);
+ }
+
+ /// <summary>Field number for the "dynamic_field" field.</summary>
+ public const int DynamicFieldFieldNumber = 2100;
+ private readonly static int DynamicFieldDefaultValue = 0;
+
+ private int dynamicField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int DynamicField {
+ get { if ((_hasBits0 & 1) != 0) { return dynamicField_; } else { return DynamicFieldDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ dynamicField_ = value;
+ }
+ }
+ /// <summary>Gets whether the "dynamic_field" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasDynamicField {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "dynamic_field" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearDynamicField() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as DynamicMessageType);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(DynamicMessageType other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (DynamicField != other.DynamicField) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasDynamicField) hash ^= DynamicField.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasDynamicField) {
+ output.WriteRawTag(160, 131, 1);
+ output.WriteInt32(DynamicField);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasDynamicField) {
+ size += 3 + pb::CodedOutputStream.ComputeInt32Size(DynamicField);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(DynamicMessageType other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasDynamicField) {
+ DynamicField = other.DynamicField;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 16800: {
+ DynamicField = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestRepeatedScalarDifferentTagSizes : pb::IMessage<TestRepeatedScalarDifferentTagSizes> {
+ private static readonly pb::MessageParser<TestRepeatedScalarDifferentTagSizes> _parser = new pb::MessageParser<TestRepeatedScalarDifferentTagSizes>(() => new TestRepeatedScalarDifferentTagSizes());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestRepeatedScalarDifferentTagSizes> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[52]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRepeatedScalarDifferentTagSizes() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRepeatedScalarDifferentTagSizes(TestRepeatedScalarDifferentTagSizes other) : this() {
+ repeatedFixed32_ = other.repeatedFixed32_.Clone();
+ repeatedInt32_ = other.repeatedInt32_.Clone();
+ repeatedFixed64_ = other.repeatedFixed64_.Clone();
+ repeatedInt64_ = other.repeatedInt64_.Clone();
+ repeatedFloat_ = other.repeatedFloat_.Clone();
+ repeatedUint64_ = other.repeatedUint64_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestRepeatedScalarDifferentTagSizes Clone() {
+ return new TestRepeatedScalarDifferentTagSizes(this);
+ }
+
+ /// <summary>Field number for the "repeated_fixed32" field.</summary>
+ public const int RepeatedFixed32FieldNumber = 12;
+ private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec
+ = pb::FieldCodec.ForFixed32(101);
+ private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>();
+ /// <summary>
+ /// Parsing repeated fixed size values used to fail. This message needs to be
+ /// used in order to get a tag of the right size; all of the repeated fields
+ /// in TestAllTypes didn't trigger the check.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<uint> RepeatedFixed32 {
+ get { return repeatedFixed32_; }
+ }
+
+ /// <summary>Field number for the "repeated_int32" field.</summary>
+ public const int RepeatedInt32FieldNumber = 13;
+ private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
+ = pb::FieldCodec.ForInt32(104);
+ private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
+ /// <summary>
+ /// Check for a varint type, just for good measure.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> RepeatedInt32 {
+ get { return repeatedInt32_; }
+ }
+
+ /// <summary>Field number for the "repeated_fixed64" field.</summary>
+ public const int RepeatedFixed64FieldNumber = 2046;
+ private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec
+ = pb::FieldCodec.ForFixed64(16369);
+ private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>();
+ /// <summary>
+ /// These have two-byte tags.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<ulong> RepeatedFixed64 {
+ get { return repeatedFixed64_; }
+ }
+
+ /// <summary>Field number for the "repeated_int64" field.</summary>
+ public const int RepeatedInt64FieldNumber = 2047;
+ private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
+ = pb::FieldCodec.ForInt64(16376);
+ private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<long> RepeatedInt64 {
+ get { return repeatedInt64_; }
+ }
+
+ /// <summary>Field number for the "repeated_float" field.</summary>
+ public const int RepeatedFloatFieldNumber = 262142;
+ private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec
+ = pb::FieldCodec.ForFloat(2097141);
+ private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>();
+ /// <summary>
+ /// Three byte tags.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<float> RepeatedFloat {
+ get { return repeatedFloat_; }
+ }
+
+ /// <summary>Field number for the "repeated_uint64" field.</summary>
+ public const int RepeatedUint64FieldNumber = 262143;
+ private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
+ = pb::FieldCodec.ForUInt64(2097144);
+ private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<ulong> RepeatedUint64 {
+ get { return repeatedUint64_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestRepeatedScalarDifferentTagSizes);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestRepeatedScalarDifferentTagSizes other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
+ if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
+ if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
+ if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
+ if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
+ if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= repeatedFixed32_.GetHashCode();
+ hash ^= repeatedInt32_.GetHashCode();
+ hash ^= repeatedFixed64_.GetHashCode();
+ hash ^= repeatedInt64_.GetHashCode();
+ hash ^= repeatedFloat_.GetHashCode();
+ hash ^= repeatedUint64_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
+ repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
+ repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
+ repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
+ repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
+ repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
+ size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
+ size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
+ size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
+ size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
+ size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestRepeatedScalarDifferentTagSizes other) {
+ if (other == null) {
+ return;
+ }
+ repeatedFixed32_.Add(other.repeatedFixed32_);
+ repeatedInt32_.Add(other.repeatedInt32_);
+ repeatedFixed64_.Add(other.repeatedFixed64_);
+ repeatedInt64_.Add(other.repeatedInt64_);
+ repeatedFloat_.Add(other.repeatedFloat_);
+ repeatedUint64_.Add(other.repeatedUint64_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 98:
+ case 101: {
+ repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
+ break;
+ }
+ case 106:
+ case 104: {
+ repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
+ break;
+ }
+ case 16370:
+ case 16369: {
+ repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
+ break;
+ }
+ case 16378:
+ case 16376: {
+ repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
+ break;
+ }
+ case 2097138:
+ case 2097141: {
+ repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
+ break;
+ }
+ case 2097146:
+ case 2097144: {
+ repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Test that if an optional or required message/group field appears multiple
+ /// times in the input, they need to be merged.
+ /// </summary>
+ public sealed partial class TestParsingMerge : pb::IExtensionMessage<TestParsingMerge> {
+ private static readonly pb::MessageParser<TestParsingMerge> _parser = new pb::MessageParser<TestParsingMerge>(() => new TestParsingMerge());
+ private pb::UnknownFieldSet _unknownFields;
+ private pb::ExtensionSet<TestParsingMerge> _extensions;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestParsingMerge> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[53]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestParsingMerge() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestParsingMerge(TestParsingMerge other) : this() {
+ requiredAllTypes_ = other.HasRequiredAllTypes ? other.requiredAllTypes_.Clone() : null;
+ optionalAllTypes_ = other.HasOptionalAllTypes ? other.optionalAllTypes_.Clone() : null;
+ repeatedAllTypes_ = other.repeatedAllTypes_.Clone();
+ optionalGroup_ = other.HasOptionalGroup ? other.optionalGroup_.Clone() : null;
+ repeatedGroup_ = other.repeatedGroup_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ _extensions = pb::ExtensionSet.Clone(other._extensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestParsingMerge Clone() {
+ return new TestParsingMerge(this);
+ }
+
+ /// <summary>Field number for the "required_all_types" field.</summary>
+ public const int RequiredAllTypesFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes requiredAllTypes_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes RequiredAllTypes {
+ get { return requiredAllTypes_; }
+ set {
+ requiredAllTypes_ = value;
+ }
+ }
+ /// <summary>Gets whether the required_all_types field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasRequiredAllTypes {
+ get { return requiredAllTypes_ != null; }
+ }
+ /// <summary>Clears the value of the required_all_types field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearRequiredAllTypes() {
+ requiredAllTypes_ = null;
+ }
+
+ /// <summary>Field number for the "optional_all_types" field.</summary>
+ public const int OptionalAllTypesFieldNumber = 2;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes optionalAllTypes_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes OptionalAllTypes {
+ get { return optionalAllTypes_; }
+ set {
+ optionalAllTypes_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_all_types field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalAllTypes {
+ get { return optionalAllTypes_ != null; }
+ }
+ /// <summary>Clears the value of the optional_all_types field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalAllTypes() {
+ optionalAllTypes_ = null;
+ }
+
+ /// <summary>Field number for the "repeated_all_types" field.</summary>
+ public const int RepeatedAllTypesFieldNumber = 3;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> _repeated_repeatedAllTypes_codec
+ = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> repeatedAllTypes_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> RepeatedAllTypes {
+ get { return repeatedAllTypes_; }
+ }
+
+ /// <summary>Field number for the "optionalgroup" field.</summary>
+ public const int OptionalGroupFieldNumber = 10;
+ private global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.OptionalGroup optionalGroup_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.OptionalGroup OptionalGroup {
+ get { return optionalGroup_; }
+ set {
+ optionalGroup_ = value;
+ }
+ }
+ /// <summary>Gets whether the optionalgroup field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalGroup {
+ get { return optionalGroup_ != null; }
+ }
+ /// <summary>Clears the value of the optionalgroup field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalGroup() {
+ optionalGroup_ = null;
+ }
+
+ /// <summary>Field number for the "repeatedgroup" field.</summary>
+ public const int RepeatedGroupFieldNumber = 20;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedGroup> _repeated_repeatedGroup_codec
+ = pb::FieldCodec.ForGroup(163, 164, global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedGroup.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedGroup> repeatedGroup_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedGroup>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedGroup> RepeatedGroup {
+ get { return repeatedGroup_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestParsingMerge);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestParsingMerge other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(RequiredAllTypes, other.RequiredAllTypes)) return false;
+ if (!object.Equals(OptionalAllTypes, other.OptionalAllTypes)) return false;
+ if(!repeatedAllTypes_.Equals(other.repeatedAllTypes_)) return false;
+ if (!object.Equals(OptionalGroup, other.OptionalGroup)) return false;
+ if(!repeatedGroup_.Equals(other.repeatedGroup_)) return false;
+ if (!Equals(_extensions, other._extensions)) {
+ return false;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasRequiredAllTypes) hash ^= RequiredAllTypes.GetHashCode();
+ if (HasOptionalAllTypes) hash ^= OptionalAllTypes.GetHashCode();
+ hash ^= repeatedAllTypes_.GetHashCode();
+ if (HasOptionalGroup) hash ^= OptionalGroup.GetHashCode();
+ hash ^= repeatedGroup_.GetHashCode();
+ if (_extensions != null) {
+ hash ^= _extensions.GetHashCode();
+ }
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasRequiredAllTypes) {
+ output.WriteRawTag(10);
+ output.WriteMessage(RequiredAllTypes);
+ }
+ if (HasOptionalAllTypes) {
+ output.WriteRawTag(18);
+ output.WriteMessage(OptionalAllTypes);
+ }
+ repeatedAllTypes_.WriteTo(output, _repeated_repeatedAllTypes_codec);
+ if (HasOptionalGroup) {
+ output.WriteRawTag(83);
+ output.WriteGroup(OptionalGroup);
+ output.WriteRawTag(84);
+ }
+ repeatedGroup_.WriteTo(output, _repeated_repeatedGroup_codec);
+ if (_extensions != null) {
+ _extensions.WriteTo(output);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasRequiredAllTypes) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(RequiredAllTypes);
+ }
+ if (HasOptionalAllTypes) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(OptionalAllTypes);
+ }
+ size += repeatedAllTypes_.CalculateSize(_repeated_repeatedAllTypes_codec);
+ if (HasOptionalGroup) {
+ size += 2 + pb::CodedOutputStream.ComputeGroupSize(OptionalGroup);
+ }
+ size += repeatedGroup_.CalculateSize(_repeated_repeatedGroup_codec);
+ if (_extensions != null) {
+ size += _extensions.CalculateSize();
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestParsingMerge other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasRequiredAllTypes) {
+ if (!HasRequiredAllTypes) {
+ RequiredAllTypes = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ RequiredAllTypes.MergeFrom(other.RequiredAllTypes);
+ }
+ if (other.HasOptionalAllTypes) {
+ if (!HasOptionalAllTypes) {
+ OptionalAllTypes = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ OptionalAllTypes.MergeFrom(other.OptionalAllTypes);
+ }
+ repeatedAllTypes_.Add(other.repeatedAllTypes_);
+ if (other.HasOptionalGroup) {
+ if (!HasOptionalGroup) {
+ OptionalGroup = new global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.OptionalGroup();
+ }
+ OptionalGroup.MergeFrom(other.OptionalGroup);
+ }
+ repeatedGroup_.Add(other.repeatedGroup_);
+ pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ }
+ break;
+ case 10: {
+ if (!HasRequiredAllTypes) {
+ RequiredAllTypes = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ input.ReadMessage(RequiredAllTypes);
+ break;
+ }
+ case 18: {
+ if (!HasOptionalAllTypes) {
+ OptionalAllTypes = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ input.ReadMessage(OptionalAllTypes);
+ break;
+ }
+ case 26: {
+ repeatedAllTypes_.AddEntriesFrom(input, _repeated_repeatedAllTypes_codec);
+ break;
+ }
+ case 83: {
+ if (!HasOptionalGroup) {
+ OptionalGroup = new global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.OptionalGroup();
+ }
+ input.ReadGroup(OptionalGroup);
+ break;
+ }
+ case 163: {
+ repeatedGroup_.AddEntriesFrom(input, _repeated_repeatedGroup_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ public void RegisterExtension(pb::Extension extension) {
+ pb::ExtensionSet.Register(ref _extensions, extension);
+ }
+ public TValue GetExtension<TValue>(pb::Extension<TestParsingMerge, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TestParsingMerge, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public void SetExtension<TValue>(pb::Extension<TestParsingMerge, TValue> extension, TValue value) {
+ pb::ExtensionSet.Set(ref _extensions, extension, value);
+ }
+ public bool HasExtension<TValue>(pb::Extension<TestParsingMerge, TValue> extension) {
+ return pb::ExtensionSet.Has(ref _extensions, extension);
+ }
+ public void ClearExtension<TValue>(pb::Extension<TestParsingMerge, TValue> extension) {
+ pb::ExtensionSet.Clear(ref _extensions, extension);
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestParsingMerge message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ /// <summary>
+ /// RepeatedFieldsGenerator defines matching field types as TestParsingMerge,
+ /// except that all fields are repeated. In the tests, we will serialize the
+ /// RepeatedFieldsGenerator to bytes, and parse the bytes to TestParsingMerge.
+ /// Repeated fields in RepeatedFieldsGenerator are expected to be merged into
+ /// the corresponding required/optional fields in TestParsingMerge.
+ /// </summary>
+ public sealed partial class RepeatedFieldsGenerator : pb::IMessage<RepeatedFieldsGenerator> {
+ private static readonly pb::MessageParser<RepeatedFieldsGenerator> _parser = new pb::MessageParser<RepeatedFieldsGenerator>(() => new RepeatedFieldsGenerator());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<RepeatedFieldsGenerator> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedFieldsGenerator() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedFieldsGenerator(RepeatedFieldsGenerator other) : this() {
+ field1_ = other.field1_.Clone();
+ field2_ = other.field2_.Clone();
+ field3_ = other.field3_.Clone();
+ group1_ = other.group1_.Clone();
+ group2_ = other.group2_.Clone();
+ ext1_ = other.ext1_.Clone();
+ ext2_ = other.ext2_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedFieldsGenerator Clone() {
+ return new RepeatedFieldsGenerator(this);
+ }
+
+ /// <summary>Field number for the "field1" field.</summary>
+ public const int Field1FieldNumber = 1;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> _repeated_field1_codec
+ = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> field1_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> Field1 {
+ get { return field1_; }
+ }
+
+ /// <summary>Field number for the "field2" field.</summary>
+ public const int Field2FieldNumber = 2;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> _repeated_field2_codec
+ = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> field2_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> Field2 {
+ get { return field2_; }
+ }
+
+ /// <summary>Field number for the "field3" field.</summary>
+ public const int Field3FieldNumber = 3;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> _repeated_field3_codec
+ = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> field3_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> Field3 {
+ get { return field3_; }
+ }
+
+ /// <summary>Field number for the "group1" field.</summary>
+ public const int Group1FieldNumber = 10;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1> _repeated_group1_codec
+ = pb::FieldCodec.ForGroup(83, 84, global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1> group1_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1> Group1 {
+ get { return group1_; }
+ }
+
+ /// <summary>Field number for the "group2" field.</summary>
+ public const int Group2FieldNumber = 20;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2> _repeated_group2_codec
+ = pb::FieldCodec.ForGroup(163, 164, global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2> group2_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2> Group2 {
+ get { return group2_; }
+ }
+
+ /// <summary>Field number for the "ext1" field.</summary>
+ public const int Ext1FieldNumber = 1000;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> _repeated_ext1_codec
+ = pb::FieldCodec.ForMessage(8002, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> ext1_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> Ext1 {
+ get { return ext1_; }
+ }
+
+ /// <summary>Field number for the "ext2" field.</summary>
+ public const int Ext2FieldNumber = 1001;
+ private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> _repeated_ext2_codec
+ = pb::FieldCodec.ForMessage(8010, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser);
+ private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> ext2_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> Ext2 {
+ get { return ext2_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as RepeatedFieldsGenerator);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(RepeatedFieldsGenerator other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!field1_.Equals(other.field1_)) return false;
+ if(!field2_.Equals(other.field2_)) return false;
+ if(!field3_.Equals(other.field3_)) return false;
+ if(!group1_.Equals(other.group1_)) return false;
+ if(!group2_.Equals(other.group2_)) return false;
+ if(!ext1_.Equals(other.ext1_)) return false;
+ if(!ext2_.Equals(other.ext2_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= field1_.GetHashCode();
+ hash ^= field2_.GetHashCode();
+ hash ^= field3_.GetHashCode();
+ hash ^= group1_.GetHashCode();
+ hash ^= group2_.GetHashCode();
+ hash ^= ext1_.GetHashCode();
+ hash ^= ext2_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ field1_.WriteTo(output, _repeated_field1_codec);
+ field2_.WriteTo(output, _repeated_field2_codec);
+ field3_.WriteTo(output, _repeated_field3_codec);
+ group1_.WriteTo(output, _repeated_group1_codec);
+ group2_.WriteTo(output, _repeated_group2_codec);
+ ext1_.WriteTo(output, _repeated_ext1_codec);
+ ext2_.WriteTo(output, _repeated_ext2_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ size += field1_.CalculateSize(_repeated_field1_codec);
+ size += field2_.CalculateSize(_repeated_field2_codec);
+ size += field3_.CalculateSize(_repeated_field3_codec);
+ size += group1_.CalculateSize(_repeated_group1_codec);
+ size += group2_.CalculateSize(_repeated_group2_codec);
+ size += ext1_.CalculateSize(_repeated_ext1_codec);
+ size += ext2_.CalculateSize(_repeated_ext2_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(RepeatedFieldsGenerator other) {
+ if (other == null) {
+ return;
+ }
+ field1_.Add(other.field1_);
+ field2_.Add(other.field2_);
+ field3_.Add(other.field3_);
+ group1_.Add(other.group1_);
+ group2_.Add(other.group2_);
+ ext1_.Add(other.ext1_);
+ ext2_.Add(other.ext2_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ field1_.AddEntriesFrom(input, _repeated_field1_codec);
+ break;
+ }
+ case 18: {
+ field2_.AddEntriesFrom(input, _repeated_field2_codec);
+ break;
+ }
+ case 26: {
+ field3_.AddEntriesFrom(input, _repeated_field3_codec);
+ break;
+ }
+ case 83: {
+ group1_.AddEntriesFrom(input, _repeated_group1_codec);
+ break;
+ }
+ case 163: {
+ group2_.AddEntriesFrom(input, _repeated_group2_codec);
+ break;
+ }
+ case 8002: {
+ ext1_.AddEntriesFrom(input, _repeated_ext1_codec);
+ break;
+ }
+ case 8010: {
+ ext2_.AddEntriesFrom(input, _repeated_ext2_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the RepeatedFieldsGenerator message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class Group1 : pb::IMessage<Group1> {
+ private static readonly pb::MessageParser<Group1> _parser = new pb::MessageParser<Group1>(() => new Group1());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<Group1> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Group1() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Group1(Group1 other) : this() {
+ field1_ = other.HasField1 ? other.field1_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Group1 Clone() {
+ return new Group1(this);
+ }
+
+ /// <summary>Field number for the "field1" field.</summary>
+ public const int Field1FieldNumber = 11;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes field1_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes Field1 {
+ get { return field1_; }
+ set {
+ field1_ = value;
+ }
+ }
+ /// <summary>Gets whether the field1 field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasField1 {
+ get { return field1_ != null; }
+ }
+ /// <summary>Clears the value of the field1 field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearField1() {
+ field1_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Group1);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Group1 other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(Field1, other.Field1)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasField1) hash ^= Field1.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasField1) {
+ output.WriteRawTag(90);
+ output.WriteMessage(Field1);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasField1) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Field1);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Group1 other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasField1) {
+ if (!HasField1) {
+ Field1 = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ Field1.MergeFrom(other.Field1);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 84:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 90: {
+ if (!HasField1) {
+ Field1 = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ input.ReadMessage(Field1);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class Group2 : pb::IMessage<Group2> {
+ private static readonly pb::MessageParser<Group2> _parser = new pb::MessageParser<Group2>(() => new Group2());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<Group2> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Descriptor.NestedTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Group2() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Group2(Group2 other) : this() {
+ field1_ = other.HasField1 ? other.field1_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Group2 Clone() {
+ return new Group2(this);
+ }
+
+ /// <summary>Field number for the "field1" field.</summary>
+ public const int Field1FieldNumber = 21;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes field1_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes Field1 {
+ get { return field1_; }
+ set {
+ field1_ = value;
+ }
+ }
+ /// <summary>Gets whether the field1 field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasField1 {
+ get { return field1_ != null; }
+ }
+ /// <summary>Clears the value of the field1 field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearField1() {
+ field1_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Group2);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Group2 other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(Field1, other.Field1)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasField1) hash ^= Field1.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasField1) {
+ output.WriteRawTag(170, 1);
+ output.WriteMessage(Field1);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasField1) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(Field1);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Group2 other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasField1) {
+ if (!HasField1) {
+ Field1 = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ Field1.MergeFrom(other.Field1);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 164:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 170: {
+ if (!HasField1) {
+ Field1 = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ input.ReadMessage(Field1);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ public sealed partial class OptionalGroup : pb::IMessage<OptionalGroup> {
+ private static readonly pb::MessageParser<OptionalGroup> _parser = new pb::MessageParser<OptionalGroup>(() => new OptionalGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<OptionalGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Descriptor.NestedTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup(OptionalGroup other) : this() {
+ optionalGroupAllTypes_ = other.HasOptionalGroupAllTypes ? other.optionalGroupAllTypes_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup Clone() {
+ return new OptionalGroup(this);
+ }
+
+ /// <summary>Field number for the "optional_group_all_types" field.</summary>
+ public const int OptionalGroupAllTypesFieldNumber = 11;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes optionalGroupAllTypes_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes OptionalGroupAllTypes {
+ get { return optionalGroupAllTypes_; }
+ set {
+ optionalGroupAllTypes_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_group_all_types field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalGroupAllTypes {
+ get { return optionalGroupAllTypes_ != null; }
+ }
+ /// <summary>Clears the value of the optional_group_all_types field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalGroupAllTypes() {
+ optionalGroupAllTypes_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as OptionalGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(OptionalGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(OptionalGroupAllTypes, other.OptionalGroupAllTypes)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasOptionalGroupAllTypes) hash ^= OptionalGroupAllTypes.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasOptionalGroupAllTypes) {
+ output.WriteRawTag(90);
+ output.WriteMessage(OptionalGroupAllTypes);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasOptionalGroupAllTypes) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(OptionalGroupAllTypes);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(OptionalGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasOptionalGroupAllTypes) {
+ if (!HasOptionalGroupAllTypes) {
+ OptionalGroupAllTypes = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ OptionalGroupAllTypes.MergeFrom(other.OptionalGroupAllTypes);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 84:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 90: {
+ if (!HasOptionalGroupAllTypes) {
+ OptionalGroupAllTypes = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ input.ReadMessage(OptionalGroupAllTypes);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class RepeatedGroup : pb::IMessage<RepeatedGroup> {
+ private static readonly pb::MessageParser<RepeatedGroup> _parser = new pb::MessageParser<RepeatedGroup>(() => new RepeatedGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<RepeatedGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Descriptor.NestedTypes[2]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedGroup(RepeatedGroup other) : this() {
+ repeatedGroupAllTypes_ = other.HasRepeatedGroupAllTypes ? other.repeatedGroupAllTypes_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public RepeatedGroup Clone() {
+ return new RepeatedGroup(this);
+ }
+
+ /// <summary>Field number for the "repeated_group_all_types" field.</summary>
+ public const int RepeatedGroupAllTypesFieldNumber = 21;
+ private global::Google.Protobuf.TestProtos.Proto2.TestAllTypes repeatedGroupAllTypes_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes RepeatedGroupAllTypes {
+ get { return repeatedGroupAllTypes_; }
+ set {
+ repeatedGroupAllTypes_ = value;
+ }
+ }
+ /// <summary>Gets whether the repeated_group_all_types field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasRepeatedGroupAllTypes {
+ get { return repeatedGroupAllTypes_ != null; }
+ }
+ /// <summary>Clears the value of the repeated_group_all_types field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearRepeatedGroupAllTypes() {
+ repeatedGroupAllTypes_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as RepeatedGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(RepeatedGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(RepeatedGroupAllTypes, other.RepeatedGroupAllTypes)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasRepeatedGroupAllTypes) hash ^= RepeatedGroupAllTypes.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasRepeatedGroupAllTypes) {
+ output.WriteRawTag(170, 1);
+ output.WriteMessage(RepeatedGroupAllTypes);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasRepeatedGroupAllTypes) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(RepeatedGroupAllTypes);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(RepeatedGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasRepeatedGroupAllTypes) {
+ if (!HasRepeatedGroupAllTypes) {
+ RepeatedGroupAllTypes = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ RepeatedGroupAllTypes.MergeFrom(other.RepeatedGroupAllTypes);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 164:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 170: {
+ if (!HasRepeatedGroupAllTypes) {
+ RepeatedGroupAllTypes = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ input.ReadMessage(RepeatedGroupAllTypes);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ #region Extensions
+ /// <summary>Container for extensions for other messages declared in the TestParsingMerge message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Extensions {
+ public static readonly pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> OptionalExt =
+ new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes>(1000, pb::FieldCodec.ForMessage(8002, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser));
+ public static readonly pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes> RepeatedExt =
+ new pb::RepeatedExtension<global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes>(1001, pb::FieldCodec.ForMessage(8010, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser));
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestCommentInjectionMessage : pb::IMessage<TestCommentInjectionMessage> {
+ private static readonly pb::MessageParser<TestCommentInjectionMessage> _parser = new pb::MessageParser<TestCommentInjectionMessage>(() => new TestCommentInjectionMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestCommentInjectionMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[54]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestCommentInjectionMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestCommentInjectionMessage(TestCommentInjectionMessage other) : this() {
+ a_ = other.a_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestCommentInjectionMessage Clone() {
+ return new TestCommentInjectionMessage(this);
+ }
+
+ /// <summary>Field number for the "a" field.</summary>
+ public const int AFieldNumber = 1;
+ private readonly static string ADefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +Ki8gPC0gTmVpdGhlciBzaG91bGQgdGhpcy4= +"));
+
+ private string a_;
+ /// <summary>
+ /// */ <- This should not close the generated doc comment
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string A {
+ get { return a_ ?? ADefaultValue; }
+ set {
+ a_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasA {
+ get { return a_ != null; }
+ }
+ /// <summary>Clears the value of the "a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearA() {
+ a_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestCommentInjectionMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestCommentInjectionMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (A != other.A) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasA) hash ^= A.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasA) {
+ output.WriteRawTag(10);
+ output.WriteString(A);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasA) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(A);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestCommentInjectionMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasA) {
+ A = other.A;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ A = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Test that RPC services work.
+ /// </summary>
+ public sealed partial class FooRequest : pb::IMessage<FooRequest> {
+ private static readonly pb::MessageParser<FooRequest> _parser = new pb::MessageParser<FooRequest>(() => new FooRequest());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<FooRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[55]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooRequest(FooRequest other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooRequest Clone() {
+ return new FooRequest(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as FooRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(FooRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(FooRequest other) {
+ if (other == null) {
+ return;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class FooResponse : pb::IMessage<FooResponse> {
+ private static readonly pb::MessageParser<FooResponse> _parser = new pb::MessageParser<FooResponse>(() => new FooResponse());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<FooResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[56]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooResponse(FooResponse other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooResponse Clone() {
+ return new FooResponse(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as FooResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(FooResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(FooResponse other) {
+ if (other == null) {
+ return;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class FooClientMessage : pb::IMessage<FooClientMessage> {
+ private static readonly pb::MessageParser<FooClientMessage> _parser = new pb::MessageParser<FooClientMessage>(() => new FooClientMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<FooClientMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[57]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooClientMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooClientMessage(FooClientMessage other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooClientMessage Clone() {
+ return new FooClientMessage(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as FooClientMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(FooClientMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(FooClientMessage other) {
+ if (other == null) {
+ return;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class FooServerMessage : pb::IMessage<FooServerMessage> {
+ private static readonly pb::MessageParser<FooServerMessage> _parser = new pb::MessageParser<FooServerMessage>(() => new FooServerMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<FooServerMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[58]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooServerMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooServerMessage(FooServerMessage other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public FooServerMessage Clone() {
+ return new FooServerMessage(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as FooServerMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(FooServerMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(FooServerMessage other) {
+ if (other == null) {
+ return;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class BarRequest : pb::IMessage<BarRequest> {
+ private static readonly pb::MessageParser<BarRequest> _parser = new pb::MessageParser<BarRequest>(() => new BarRequest());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<BarRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[59]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public BarRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public BarRequest(BarRequest other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public BarRequest Clone() {
+ return new BarRequest(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as BarRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(BarRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(BarRequest other) {
+ if (other == null) {
+ return;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class BarResponse : pb::IMessage<BarResponse> {
+ private static readonly pb::MessageParser<BarResponse> _parser = new pb::MessageParser<BarResponse>(() => new BarResponse());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<BarResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[60]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public BarResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public BarResponse(BarResponse other) : this() {
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public BarResponse Clone() {
+ return new BarResponse(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as BarResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(BarResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(BarResponse other) {
+ if (other == null) {
+ return;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class TestJsonName : pb::IMessage<TestJsonName> {
+ private static readonly pb::MessageParser<TestJsonName> _parser = new pb::MessageParser<TestJsonName>(() => new TestJsonName());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestJsonName> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[61]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestJsonName() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestJsonName(TestJsonName other) : this() {
+ _hasBits0 = other._hasBits0;
+ fieldName1_ = other.fieldName1_;
+ fieldName2_ = other.fieldName2_;
+ fieldName3_ = other.fieldName3_;
+ FieldName4_ = other.FieldName4_;
+ fIELDNAME5_ = other.fIELDNAME5_;
+ fieldName6_ = other.fieldName6_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestJsonName Clone() {
+ return new TestJsonName(this);
+ }
+
+ /// <summary>Field number for the "field_name1" field.</summary>
+ public const int FieldName1FieldNumber = 1;
+ private readonly static int FieldName1DefaultValue = 0;
+
+ private int fieldName1_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName1 {
+ get { if ((_hasBits0 & 1) != 0) { return fieldName1_; } else { return FieldName1DefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ fieldName1_ = value;
+ }
+ }
+ /// <summary>Gets whether the "field_name1" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFieldName1 {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "field_name1" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFieldName1() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "fieldName2" field.</summary>
+ public const int FieldName2FieldNumber = 2;
+ private readonly static int FieldName2DefaultValue = 0;
+
+ private int fieldName2_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName2 {
+ get { if ((_hasBits0 & 2) != 0) { return fieldName2_; } else { return FieldName2DefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ fieldName2_ = value;
+ }
+ }
+ /// <summary>Gets whether the "fieldName2" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFieldName2 {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "fieldName2" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFieldName2() {
+ _hasBits0 &= ~2;
+ }
+
+ /// <summary>Field number for the "FieldName3" field.</summary>
+ public const int FieldName3FieldNumber = 3;
+ private readonly static int FieldName3DefaultValue = 0;
+
+ private int fieldName3_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName3 {
+ get { if ((_hasBits0 & 4) != 0) { return fieldName3_; } else { return FieldName3DefaultValue; } }
+ set {
+ _hasBits0 |= 4;
+ fieldName3_ = value;
+ }
+ }
+ /// <summary>Gets whether the "FieldName3" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFieldName3 {
+ get { return (_hasBits0 & 4) != 0; }
+ }
+ /// <summary>Clears the value of the "FieldName3" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFieldName3() {
+ _hasBits0 &= ~4;
+ }
+
+ /// <summary>Field number for the "_field_name4" field.</summary>
+ public const int FieldName4FieldNumber = 4;
+ private readonly static int FieldName4DefaultValue = 0;
+
+ private int FieldName4_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName4 {
+ get { if ((_hasBits0 & 8) != 0) { return FieldName4_; } else { return FieldName4DefaultValue; } }
+ set {
+ _hasBits0 |= 8;
+ FieldName4_ = value;
+ }
+ }
+ /// <summary>Gets whether the "_field_name4" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFieldName4 {
+ get { return (_hasBits0 & 8) != 0; }
+ }
+ /// <summary>Clears the value of the "_field_name4" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFieldName4() {
+ _hasBits0 &= ~8;
+ }
+
+ /// <summary>Field number for the "FIELD_NAME5" field.</summary>
+ public const int FIELDNAME5FieldNumber = 5;
+ private readonly static int FIELDNAME5DefaultValue = 0;
+
+ private int fIELDNAME5_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FIELDNAME5 {
+ get { if ((_hasBits0 & 16) != 0) { return fIELDNAME5_; } else { return FIELDNAME5DefaultValue; } }
+ set {
+ _hasBits0 |= 16;
+ fIELDNAME5_ = value;
+ }
+ }
+ /// <summary>Gets whether the "FIELD_NAME5" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFIELDNAME5 {
+ get { return (_hasBits0 & 16) != 0; }
+ }
+ /// <summary>Clears the value of the "FIELD_NAME5" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFIELDNAME5() {
+ _hasBits0 &= ~16;
+ }
+
+ /// <summary>Field number for the "field_name6" field.</summary>
+ public const int FieldName6FieldNumber = 6;
+ private readonly static int FieldName6DefaultValue = 0;
+
+ private int fieldName6_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FieldName6 {
+ get { if ((_hasBits0 & 32) != 0) { return fieldName6_; } else { return FieldName6DefaultValue; } }
+ set {
+ _hasBits0 |= 32;
+ fieldName6_ = value;
+ }
+ }
+ /// <summary>Gets whether the "field_name6" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFieldName6 {
+ get { return (_hasBits0 & 32) != 0; }
+ }
+ /// <summary>Clears the value of the "field_name6" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFieldName6() {
+ _hasBits0 &= ~32;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestJsonName);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestJsonName other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FieldName1 != other.FieldName1) return false;
+ if (FieldName2 != other.FieldName2) return false;
+ if (FieldName3 != other.FieldName3) return false;
+ if (FieldName4 != other.FieldName4) return false;
+ if (FIELDNAME5 != other.FIELDNAME5) return false;
+ if (FieldName6 != other.FieldName6) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasFieldName1) hash ^= FieldName1.GetHashCode();
+ if (HasFieldName2) hash ^= FieldName2.GetHashCode();
+ if (HasFieldName3) hash ^= FieldName3.GetHashCode();
+ if (HasFieldName4) hash ^= FieldName4.GetHashCode();
+ if (HasFIELDNAME5) hash ^= FIELDNAME5.GetHashCode();
+ if (HasFieldName6) hash ^= FieldName6.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasFieldName1) {
+ output.WriteRawTag(8);
+ output.WriteInt32(FieldName1);
+ }
+ if (HasFieldName2) {
+ output.WriteRawTag(16);
+ output.WriteInt32(FieldName2);
+ }
+ if (HasFieldName3) {
+ output.WriteRawTag(24);
+ output.WriteInt32(FieldName3);
+ }
+ if (HasFieldName4) {
+ output.WriteRawTag(32);
+ output.WriteInt32(FieldName4);
+ }
+ if (HasFIELDNAME5) {
+ output.WriteRawTag(40);
+ output.WriteInt32(FIELDNAME5);
+ }
+ if (HasFieldName6) {
+ output.WriteRawTag(48);
+ output.WriteInt32(FieldName6);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasFieldName1) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FieldName1);
+ }
+ if (HasFieldName2) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FieldName2);
+ }
+ if (HasFieldName3) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FieldName3);
+ }
+ if (HasFieldName4) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FieldName4);
+ }
+ if (HasFIELDNAME5) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FIELDNAME5);
+ }
+ if (HasFieldName6) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(FieldName6);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestJsonName other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasFieldName1) {
+ FieldName1 = other.FieldName1;
+ }
+ if (other.HasFieldName2) {
+ FieldName2 = other.FieldName2;
+ }
+ if (other.HasFieldName3) {
+ FieldName3 = other.FieldName3;
+ }
+ if (other.HasFieldName4) {
+ FieldName4 = other.FieldName4;
+ }
+ if (other.HasFIELDNAME5) {
+ FIELDNAME5 = other.FIELDNAME5;
+ }
+ if (other.HasFieldName6) {
+ FieldName6 = other.FieldName6;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ FieldName1 = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ FieldName2 = input.ReadInt32();
+ break;
+ }
+ case 24: {
+ FieldName3 = input.ReadInt32();
+ break;
+ }
+ case 32: {
+ FieldName4 = input.ReadInt32();
+ break;
+ }
+ case 40: {
+ FIELDNAME5 = input.ReadInt32();
+ break;
+ }
+ case 48: {
+ FieldName6 = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class TestHugeFieldNumbers : pb::IExtensionMessage<TestHugeFieldNumbers> {
+ private static readonly pb::MessageParser<TestHugeFieldNumbers> _parser = new pb::MessageParser<TestHugeFieldNumbers>(() => new TestHugeFieldNumbers());
+ private pb::UnknownFieldSet _unknownFields;
+ private pb::ExtensionSet<TestHugeFieldNumbers> _extensions;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestHugeFieldNumbers> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[62]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestHugeFieldNumbers() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestHugeFieldNumbers(TestHugeFieldNumbers other) : this() {
+ _hasBits0 = other._hasBits0;
+ optionalInt32_ = other.optionalInt32_;
+ fixed32_ = other.fixed32_;
+ repeatedInt32_ = other.repeatedInt32_.Clone();
+ packedInt32_ = other.packedInt32_.Clone();
+ optionalEnum_ = other.optionalEnum_;
+ optionalString_ = other.optionalString_;
+ optionalBytes_ = other.optionalBytes_;
+ optionalMessage_ = other.HasOptionalMessage ? other.optionalMessage_.Clone() : null;
+ optionalGroup_ = other.HasOptionalGroup ? other.optionalGroup_.Clone() : null;
+ stringStringMap_ = other.stringStringMap_.Clone();
+ switch (other.OneofFieldCase) {
+ case OneofFieldOneofCase.OneofUint32:
+ OneofUint32 = other.OneofUint32;
+ break;
+ case OneofFieldOneofCase.OneofTestAllTypes:
+ OneofTestAllTypes = other.OneofTestAllTypes.Clone();
+ break;
+ case OneofFieldOneofCase.OneofString:
+ OneofString = other.OneofString;
+ break;
+ case OneofFieldOneofCase.OneofBytes:
+ OneofBytes = other.OneofBytes;
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ _extensions = pb::ExtensionSet.Clone(other._extensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestHugeFieldNumbers Clone() {
+ return new TestHugeFieldNumbers(this);
+ }
+
+ /// <summary>Field number for the "optional_int32" field.</summary>
+ public const int OptionalInt32FieldNumber = 536870000;
+ private readonly static int OptionalInt32DefaultValue = 0;
+
+ private int optionalInt32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OptionalInt32 {
+ get { if ((_hasBits0 & 1) != 0) { return optionalInt32_; } else { return OptionalInt32DefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ optionalInt32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_int32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalInt32 {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_int32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalInt32() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "fixed_32" field.</summary>
+ public const int Fixed32FieldNumber = 536870001;
+ private readonly static int Fixed32DefaultValue = 0;
+
+ private int fixed32_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Fixed32 {
+ get { if ((_hasBits0 & 2) != 0) { return fixed32_; } else { return Fixed32DefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ fixed32_ = value;
+ }
+ }
+ /// <summary>Gets whether the "fixed_32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasFixed32 {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "fixed_32" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearFixed32() {
+ _hasBits0 &= ~2;
+ }
+
+ /// <summary>Field number for the "repeated_int32" field.</summary>
+ public const int RepeatedInt32FieldNumber = 536870002;
+ private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
+ = pb::FieldCodec.ForInt32(4294960016);
+ private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> RepeatedInt32 {
+ get { return repeatedInt32_; }
+ }
+
+ /// <summary>Field number for the "packed_int32" field.</summary>
+ public const int PackedInt32FieldNumber = 536870003;
+ private static readonly pb::FieldCodec<int> _repeated_packedInt32_codec
+ = pb::FieldCodec.ForInt32(4294960026);
+ private readonly pbc::RepeatedField<int> packedInt32_ = new pbc::RepeatedField<int>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<int> PackedInt32 {
+ get { return packedInt32_; }
+ }
+
+ /// <summary>Field number for the "optional_enum" field.</summary>
+ public const int OptionalEnumFieldNumber = 536870004;
+ private readonly static global::Google.Protobuf.TestProtos.Proto2.ForeignEnum OptionalEnumDefaultValue = global::Google.Protobuf.TestProtos.Proto2.ForeignEnum.ForeignFoo;
+
+ private global::Google.Protobuf.TestProtos.Proto2.ForeignEnum optionalEnum_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ForeignEnum OptionalEnum {
+ get { if ((_hasBits0 & 4) != 0) { return optionalEnum_; } else { return OptionalEnumDefaultValue; } }
+ set {
+ _hasBits0 |= 4;
+ optionalEnum_ = value;
+ }
+ }
+ /// <summary>Gets whether the "optional_enum" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalEnum {
+ get { return (_hasBits0 & 4) != 0; }
+ }
+ /// <summary>Clears the value of the "optional_enum" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalEnum() {
+ _hasBits0 &= ~4;
+ }
+
+ /// <summary>Field number for the "optional_string" field.</summary>
+ public const int OptionalStringFieldNumber = 536870005;
+ private readonly static string OptionalStringDefaultValue = "";
+
+ private string optionalString_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string OptionalString {
+ get { return optionalString_ ?? OptionalStringDefaultValue; }
+ set {
+ optionalString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "optional_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalString {
+ get { return optionalString_ != null; }
+ }
+ /// <summary>Clears the value of the "optional_string" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalString() {
+ optionalString_ = null;
+ }
+
+ /// <summary>Field number for the "optional_bytes" field.</summary>
+ public const int OptionalBytesFieldNumber = 536870006;
+ private readonly static pb::ByteString OptionalBytesDefaultValue = pb::ByteString.Empty;
+
+ private pb::ByteString optionalBytes_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString OptionalBytes {
+ get { return optionalBytes_ ?? OptionalBytesDefaultValue; }
+ set {
+ optionalBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// <summary>Gets whether the "optional_bytes" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalBytes {
+ get { return optionalBytes_ != null; }
+ }
+ /// <summary>Clears the value of the "optional_bytes" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalBytes() {
+ optionalBytes_ = null;
+ }
+
+ /// <summary>Field number for the "optional_message" field.</summary>
+ public const int OptionalMessageFieldNumber = 536870007;
+ private global::Google.Protobuf.TestProtos.Proto2.ForeignMessage optionalMessage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.ForeignMessage OptionalMessage {
+ get { return optionalMessage_; }
+ set {
+ optionalMessage_ = value;
+ }
+ }
+ /// <summary>Gets whether the optional_message field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalMessage {
+ get { return optionalMessage_ != null; }
+ }
+ /// <summary>Clears the value of the optional_message field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalMessage() {
+ optionalMessage_ = null;
+ }
+
+ /// <summary>Field number for the "optionalgroup" field.</summary>
+ public const int OptionalGroupFieldNumber = 536870008;
+ private global::Google.Protobuf.TestProtos.Proto2.TestHugeFieldNumbers.Types.OptionalGroup optionalGroup_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestHugeFieldNumbers.Types.OptionalGroup OptionalGroup {
+ get { return optionalGroup_; }
+ set {
+ optionalGroup_ = value;
+ }
+ }
+ /// <summary>Gets whether the optionalgroup field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOptionalGroup {
+ get { return optionalGroup_ != null; }
+ }
+ /// <summary>Clears the value of the optionalgroup field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOptionalGroup() {
+ optionalGroup_ = null;
+ }
+
+ /// <summary>Field number for the "string_string_map" field.</summary>
+ public const int StringStringMapFieldNumber = 536870010;
+ private static readonly pbc::MapField<string, string>.Codec _map_stringStringMap_codec
+ = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 4294960082);
+ private readonly pbc::MapField<string, string> stringStringMap_ = new pbc::MapField<string, string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField<string, string> StringStringMap {
+ get { return stringStringMap_; }
+ }
+
+ /// <summary>Field number for the "oneof_uint32" field.</summary>
+ public const int OneofUint32FieldNumber = 536870011;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint OneofUint32 {
+ get { return HasOneofUint32 ? (uint) oneofField_ : 0; }
+ set {
+ oneofField_ = value;
+ oneofFieldCase_ = OneofFieldOneofCase.OneofUint32;
+ }
+ }
+ /// <summary>Gets whether the "oneof_uint32" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOneofUint32 {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "oneof_uint32" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofUint32() {
+ if (HasOneofUint32) {
+ ClearOneofField();
+ }
+ }
+
+ /// <summary>Field number for the "oneof_test_all_types" field.</summary>
+ public const int OneofTestAllTypesFieldNumber = 536870012;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Google.Protobuf.TestProtos.Proto2.TestAllTypes OneofTestAllTypes {
+ get { return HasOneofTestAllTypes ? (global::Google.Protobuf.TestProtos.Proto2.TestAllTypes) oneofField_ : null; }
+ set {
+ oneofField_ = value;
+ oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofTestAllTypes;
+ }
+ }
+ /// <summary>Gets whether the "oneof_test_all_types" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOneofTestAllTypes {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofTestAllTypes; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "oneof_test_all_types" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofTestAllTypes() {
+ if (HasOneofTestAllTypes) {
+ ClearOneofField();
+ }
+ }
+
+ /// <summary>Field number for the "oneof_string" field.</summary>
+ public const int OneofStringFieldNumber = 536870013;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string OneofString {
+ get { return HasOneofString ? (string) oneofField_ : ""; }
+ set {
+ oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ oneofFieldCase_ = OneofFieldOneofCase.OneofString;
+ }
+ }
+ /// <summary>Gets whether the "oneof_string" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOneofString {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "oneof_string" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofString() {
+ if (HasOneofString) {
+ ClearOneofField();
+ }
+ }
+
+ /// <summary>Field number for the "oneof_bytes" field.</summary>
+ public const int OneofBytesFieldNumber = 536870014;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString OneofBytes {
+ get { return HasOneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; }
+ set {
+ oneofField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ oneofFieldCase_ = OneofFieldOneofCase.OneofBytes;
+ }
+ }
+ /// <summary>Gets whether the "oneof_bytes" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasOneofBytes {
+ get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes; }
+ }
+ /// <summary> Clears the value of the oneof if it's currently set to "oneof_bytes" </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofBytes() {
+ if (HasOneofBytes) {
+ ClearOneofField();
+ }
+ }
+
+ private object oneofField_;
+ /// <summary>Enum of possible cases for the "oneof_field" oneof.</summary>
+ public enum OneofFieldOneofCase {
+ None = 0,
+ OneofUint32 = 536870011,
+ OneofTestAllTypes = 536870012,
+ OneofString = 536870013,
+ OneofBytes = 536870014,
+ }
+ private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OneofFieldOneofCase OneofFieldCase {
+ get { return oneofFieldCase_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearOneofField() {
+ oneofFieldCase_ = OneofFieldOneofCase.None;
+ oneofField_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestHugeFieldNumbers);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestHugeFieldNumbers other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (OptionalInt32 != other.OptionalInt32) return false;
+ if (Fixed32 != other.Fixed32) return false;
+ if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
+ if(!packedInt32_.Equals(other.packedInt32_)) return false;
+ if (OptionalEnum != other.OptionalEnum) return false;
+ if (OptionalString != other.OptionalString) return false;
+ if (OptionalBytes != other.OptionalBytes) return false;
+ if (!object.Equals(OptionalMessage, other.OptionalMessage)) return false;
+ if (!object.Equals(OptionalGroup, other.OptionalGroup)) return false;
+ if (!StringStringMap.Equals(other.StringStringMap)) return false;
+ if (OneofUint32 != other.OneofUint32) return false;
+ if (!object.Equals(OneofTestAllTypes, other.OneofTestAllTypes)) return false;
+ if (OneofString != other.OneofString) return false;
+ if (OneofBytes != other.OneofBytes) return false;
+ if (OneofFieldCase != other.OneofFieldCase) return false;
+ if (!Equals(_extensions, other._extensions)) {
+ return false;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasOptionalInt32) hash ^= OptionalInt32.GetHashCode();
+ if (HasFixed32) hash ^= Fixed32.GetHashCode();
+ hash ^= repeatedInt32_.GetHashCode();
+ hash ^= packedInt32_.GetHashCode();
+ if (HasOptionalEnum) hash ^= OptionalEnum.GetHashCode();
+ if (HasOptionalString) hash ^= OptionalString.GetHashCode();
+ if (HasOptionalBytes) hash ^= OptionalBytes.GetHashCode();
+ if (HasOptionalMessage) hash ^= OptionalMessage.GetHashCode();
+ if (HasOptionalGroup) hash ^= OptionalGroup.GetHashCode();
+ hash ^= StringStringMap.GetHashCode();
+ if (HasOneofUint32) hash ^= OneofUint32.GetHashCode();
+ if (HasOneofTestAllTypes) hash ^= OneofTestAllTypes.GetHashCode();
+ if (HasOneofString) hash ^= OneofString.GetHashCode();
+ if (HasOneofBytes) hash ^= OneofBytes.GetHashCode();
+ hash ^= (int) oneofFieldCase_;
+ if (_extensions != null) {
+ hash ^= _extensions.GetHashCode();
+ }
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasOptionalInt32) {
+ output.WriteRawTag(128, 199, 255, 255, 15);
+ output.WriteInt32(OptionalInt32);
+ }
+ if (HasFixed32) {
+ output.WriteRawTag(136, 199, 255, 255, 15);
+ output.WriteInt32(Fixed32);
+ }
+ repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
+ packedInt32_.WriteTo(output, _repeated_packedInt32_codec);
+ if (HasOptionalEnum) {
+ output.WriteRawTag(160, 199, 255, 255, 15);
+ output.WriteEnum((int) OptionalEnum);
+ }
+ if (HasOptionalString) {
+ output.WriteRawTag(170, 199, 255, 255, 15);
+ output.WriteString(OptionalString);
+ }
+ if (HasOptionalBytes) {
+ output.WriteRawTag(178, 199, 255, 255, 15);
+ output.WriteBytes(OptionalBytes);
+ }
+ if (HasOptionalMessage) {
+ output.WriteRawTag(186, 199, 255, 255, 15);
+ output.WriteMessage(OptionalMessage);
+ }
+ if (HasOptionalGroup) {
+ output.WriteRawTag(195, 199, 255, 255, 15);
+ output.WriteGroup(OptionalGroup);
+ output.WriteRawTag(196, 199, 255, 255, 15);
+ }
+ stringStringMap_.WriteTo(output, _map_stringStringMap_codec);
+ if (HasOneofUint32) {
+ output.WriteRawTag(216, 199, 255, 255, 15);
+ output.WriteUInt32(OneofUint32);
+ }
+ if (HasOneofTestAllTypes) {
+ output.WriteRawTag(226, 199, 255, 255, 15);
+ output.WriteMessage(OneofTestAllTypes);
+ }
+ if (HasOneofString) {
+ output.WriteRawTag(234, 199, 255, 255, 15);
+ output.WriteString(OneofString);
+ }
+ if (HasOneofBytes) {
+ output.WriteRawTag(242, 199, 255, 255, 15);
+ output.WriteBytes(OneofBytes);
+ }
+ if (_extensions != null) {
+ _extensions.WriteTo(output);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasOptionalInt32) {
+ size += 5 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32);
+ }
+ if (HasFixed32) {
+ size += 5 + pb::CodedOutputStream.ComputeInt32Size(Fixed32);
+ }
+ size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
+ size += packedInt32_.CalculateSize(_repeated_packedInt32_codec);
+ if (HasOptionalEnum) {
+ size += 5 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalEnum);
+ }
+ if (HasOptionalString) {
+ size += 5 + pb::CodedOutputStream.ComputeStringSize(OptionalString);
+ }
+ if (HasOptionalBytes) {
+ size += 5 + pb::CodedOutputStream.ComputeBytesSize(OptionalBytes);
+ }
+ if (HasOptionalMessage) {
+ size += 5 + pb::CodedOutputStream.ComputeMessageSize(OptionalMessage);
+ }
+ if (HasOptionalGroup) {
+ size += 10 + pb::CodedOutputStream.ComputeGroupSize(OptionalGroup);
+ }
+ size += stringStringMap_.CalculateSize(_map_stringStringMap_codec);
+ if (HasOneofUint32) {
+ size += 5 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32);
+ }
+ if (HasOneofTestAllTypes) {
+ size += 5 + pb::CodedOutputStream.ComputeMessageSize(OneofTestAllTypes);
+ }
+ if (HasOneofString) {
+ size += 5 + pb::CodedOutputStream.ComputeStringSize(OneofString);
+ }
+ if (HasOneofBytes) {
+ size += 5 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes);
+ }
+ if (_extensions != null) {
+ size += _extensions.CalculateSize();
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestHugeFieldNumbers other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasOptionalInt32) {
+ OptionalInt32 = other.OptionalInt32;
+ }
+ if (other.HasFixed32) {
+ Fixed32 = other.Fixed32;
+ }
+ repeatedInt32_.Add(other.repeatedInt32_);
+ packedInt32_.Add(other.packedInt32_);
+ if (other.HasOptionalEnum) {
+ OptionalEnum = other.OptionalEnum;
+ }
+ if (other.HasOptionalString) {
+ OptionalString = other.OptionalString;
+ }
+ if (other.HasOptionalBytes) {
+ OptionalBytes = other.OptionalBytes;
+ }
+ if (other.HasOptionalMessage) {
+ if (!HasOptionalMessage) {
+ OptionalMessage = new global::Google.Protobuf.TestProtos.Proto2.ForeignMessage();
+ }
+ OptionalMessage.MergeFrom(other.OptionalMessage);
+ }
+ if (other.HasOptionalGroup) {
+ if (!HasOptionalGroup) {
+ OptionalGroup = new global::Google.Protobuf.TestProtos.Proto2.TestHugeFieldNumbers.Types.OptionalGroup();
+ }
+ OptionalGroup.MergeFrom(other.OptionalGroup);
+ }
+ stringStringMap_.Add(other.stringStringMap_);
+ switch (other.OneofFieldCase) {
+ case OneofFieldOneofCase.OneofUint32:
+ OneofUint32 = other.OneofUint32;
+ break;
+ case OneofFieldOneofCase.OneofTestAllTypes:
+ if (OneofTestAllTypes == null) {
+ OneofTestAllTypes = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ }
+ OneofTestAllTypes.MergeFrom(other.OneofTestAllTypes);
+ break;
+ case OneofFieldOneofCase.OneofString:
+ OneofString = other.OneofString;
+ break;
+ case OneofFieldOneofCase.OneofBytes:
+ OneofBytes = other.OneofBytes;
+ break;
+ }
+
+ pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ }
+ break;
+ case 4294960000: {
+ OptionalInt32 = input.ReadInt32();
+ break;
+ }
+ case 4294960008: {
+ Fixed32 = input.ReadInt32();
+ break;
+ }
+ case 4294960018:
+ case 4294960016: {
+ repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
+ break;
+ }
+ case 4294960026:
+ case 4294960024: {
+ packedInt32_.AddEntriesFrom(input, _repeated_packedInt32_codec);
+ break;
+ }
+ case 4294960032: {
+ OptionalEnum = (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) input.ReadEnum();
+ break;
+ }
+ case 4294960042: {
+ OptionalString = input.ReadString();
+ break;
+ }
+ case 4294960050: {
+ OptionalBytes = input.ReadBytes();
+ break;
+ }
+ case 4294960058: {
+ if (!HasOptionalMessage) {
+ OptionalMessage = new global::Google.Protobuf.TestProtos.Proto2.ForeignMessage();
+ }
+ input.ReadMessage(OptionalMessage);
+ break;
+ }
+ case 4294960067: {
+ if (!HasOptionalGroup) {
+ OptionalGroup = new global::Google.Protobuf.TestProtos.Proto2.TestHugeFieldNumbers.Types.OptionalGroup();
+ }
+ input.ReadGroup(OptionalGroup);
+ break;
+ }
+ case 4294960082: {
+ stringStringMap_.AddEntriesFrom(input, _map_stringStringMap_codec);
+ break;
+ }
+ case 4294960088: {
+ OneofUint32 = input.ReadUInt32();
+ break;
+ }
+ case 4294960098: {
+ global::Google.Protobuf.TestProtos.Proto2.TestAllTypes subBuilder = new global::Google.Protobuf.TestProtos.Proto2.TestAllTypes();
+ if (HasOneofTestAllTypes) {
+ subBuilder.MergeFrom(OneofTestAllTypes);
+ }
+ input.ReadMessage(subBuilder);
+ OneofTestAllTypes = subBuilder;
+ break;
+ }
+ case 4294960106: {
+ OneofString = input.ReadString();
+ break;
+ }
+ case 4294960114: {
+ OneofBytes = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+
+ public void RegisterExtension(pb::Extension extension) {
+ pb::ExtensionSet.Register(ref _extensions, extension);
+ }
+ public TValue GetExtension<TValue>(pb::Extension<TestHugeFieldNumbers, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TestHugeFieldNumbers, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public void SetExtension<TValue>(pb::Extension<TestHugeFieldNumbers, TValue> extension, TValue value) {
+ pb::ExtensionSet.Set(ref _extensions, extension, value);
+ }
+ public bool HasExtension<TValue>(pb::Extension<TestHugeFieldNumbers, TValue> extension) {
+ return pb::ExtensionSet.Has(ref _extensions, extension);
+ }
+ public void ClearExtension<TValue>(pb::Extension<TestHugeFieldNumbers, TValue> extension) {
+ pb::ExtensionSet.Clear(ref _extensions, extension);
+ }
+
+ #region Nested types
+ /// <summary>Container for nested types declared in the TestHugeFieldNumbers message type.</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ public sealed partial class OptionalGroup : pb::IMessage<OptionalGroup> {
+ private static readonly pb::MessageParser<OptionalGroup> _parser = new pb::MessageParser<OptionalGroup>(() => new OptionalGroup());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<OptionalGroup> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.TestHugeFieldNumbers.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup(OptionalGroup other) : this() {
+ _hasBits0 = other._hasBits0;
+ groupA_ = other.groupA_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public OptionalGroup Clone() {
+ return new OptionalGroup(this);
+ }
+
+ /// <summary>Field number for the "group_a" field.</summary>
+ public const int GroupAFieldNumber = 536870009;
+ private readonly static int GroupADefaultValue = 0;
+
+ private int groupA_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int GroupA {
+ get { if ((_hasBits0 & 1) != 0) { return groupA_; } else { return GroupADefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ groupA_ = value;
+ }
+ }
+ /// <summary>Gets whether the "group_a" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasGroupA {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "group_a" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearGroupA() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as OptionalGroup);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(OptionalGroup other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (GroupA != other.GroupA) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasGroupA) hash ^= GroupA.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasGroupA) {
+ output.WriteRawTag(200, 199, 255, 255, 15);
+ output.WriteInt32(GroupA);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasGroupA) {
+ size += 5 + pb::CodedOutputStream.ComputeInt32Size(GroupA);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(OptionalGroup other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasGroupA) {
+ GroupA = other.GroupA;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ case 4294960068:
+ return;
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 4294960072: {
+ GroupA = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ public sealed partial class TestExtensionInsideTable : pb::IExtensionMessage<TestExtensionInsideTable> {
+ private static readonly pb::MessageParser<TestExtensionInsideTable> _parser = new pb::MessageParser<TestExtensionInsideTable>(() => new TestExtensionInsideTable());
+ private pb::UnknownFieldSet _unknownFields;
+ private pb::ExtensionSet<TestExtensionInsideTable> _extensions;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<TestExtensionInsideTable> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[63]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionInsideTable() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionInsideTable(TestExtensionInsideTable other) : this() {
+ _hasBits0 = other._hasBits0;
+ field1_ = other.field1_;
+ field2_ = other.field2_;
+ field3_ = other.field3_;
+ field4_ = other.field4_;
+ field6_ = other.field6_;
+ field7_ = other.field7_;
+ field8_ = other.field8_;
+ field9_ = other.field9_;
+ field10_ = other.field10_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ _extensions = pb::ExtensionSet.Clone(other._extensions);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public TestExtensionInsideTable Clone() {
+ return new TestExtensionInsideTable(this);
+ }
+
+ /// <summary>Field number for the "field1" field.</summary>
+ public const int Field1FieldNumber = 1;
+ private readonly static int Field1DefaultValue = 0;
+
+ private int field1_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Field1 {
+ get { if ((_hasBits0 & 1) != 0) { return field1_; } else { return Field1DefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ field1_ = value;
+ }
+ }
+ /// <summary>Gets whether the "field1" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasField1 {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "field1" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearField1() {
+ _hasBits0 &= ~1;
+ }
+
+ /// <summary>Field number for the "field2" field.</summary>
+ public const int Field2FieldNumber = 2;
+ private readonly static int Field2DefaultValue = 0;
+
+ private int field2_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Field2 {
+ get { if ((_hasBits0 & 2) != 0) { return field2_; } else { return Field2DefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ field2_ = value;
+ }
+ }
+ /// <summary>Gets whether the "field2" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasField2 {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// <summary>Clears the value of the "field2" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearField2() {
+ _hasBits0 &= ~2;
+ }
+
+ /// <summary>Field number for the "field3" field.</summary>
+ public const int Field3FieldNumber = 3;
+ private readonly static int Field3DefaultValue = 0;
+
+ private int field3_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Field3 {
+ get { if ((_hasBits0 & 4) != 0) { return field3_; } else { return Field3DefaultValue; } }
+ set {
+ _hasBits0 |= 4;
+ field3_ = value;
+ }
+ }
+ /// <summary>Gets whether the "field3" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasField3 {
+ get { return (_hasBits0 & 4) != 0; }
+ }
+ /// <summary>Clears the value of the "field3" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearField3() {
+ _hasBits0 &= ~4;
+ }
+
+ /// <summary>Field number for the "field4" field.</summary>
+ public const int Field4FieldNumber = 4;
+ private readonly static int Field4DefaultValue = 0;
+
+ private int field4_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Field4 {
+ get { if ((_hasBits0 & 8) != 0) { return field4_; } else { return Field4DefaultValue; } }
+ set {
+ _hasBits0 |= 8;
+ field4_ = value;
+ }
+ }
+ /// <summary>Gets whether the "field4" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasField4 {
+ get { return (_hasBits0 & 8) != 0; }
+ }
+ /// <summary>Clears the value of the "field4" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearField4() {
+ _hasBits0 &= ~8;
+ }
+
+ /// <summary>Field number for the "field6" field.</summary>
+ public const int Field6FieldNumber = 6;
+ private readonly static int Field6DefaultValue = 0;
+
+ private int field6_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Field6 {
+ get { if ((_hasBits0 & 16) != 0) { return field6_; } else { return Field6DefaultValue; } }
+ set {
+ _hasBits0 |= 16;
+ field6_ = value;
+ }
+ }
+ /// <summary>Gets whether the "field6" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasField6 {
+ get { return (_hasBits0 & 16) != 0; }
+ }
+ /// <summary>Clears the value of the "field6" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearField6() {
+ _hasBits0 &= ~16;
+ }
+
+ /// <summary>Field number for the "field7" field.</summary>
+ public const int Field7FieldNumber = 7;
+ private readonly static int Field7DefaultValue = 0;
+
+ private int field7_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Field7 {
+ get { if ((_hasBits0 & 32) != 0) { return field7_; } else { return Field7DefaultValue; } }
+ set {
+ _hasBits0 |= 32;
+ field7_ = value;
+ }
+ }
+ /// <summary>Gets whether the "field7" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasField7 {
+ get { return (_hasBits0 & 32) != 0; }
+ }
+ /// <summary>Clears the value of the "field7" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearField7() {
+ _hasBits0 &= ~32;
+ }
+
+ /// <summary>Field number for the "field8" field.</summary>
+ public const int Field8FieldNumber = 8;
+ private readonly static int Field8DefaultValue = 0;
+
+ private int field8_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Field8 {
+ get { if ((_hasBits0 & 64) != 0) { return field8_; } else { return Field8DefaultValue; } }
+ set {
+ _hasBits0 |= 64;
+ field8_ = value;
+ }
+ }
+ /// <summary>Gets whether the "field8" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasField8 {
+ get { return (_hasBits0 & 64) != 0; }
+ }
+ /// <summary>Clears the value of the "field8" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearField8() {
+ _hasBits0 &= ~64;
+ }
+
+ /// <summary>Field number for the "field9" field.</summary>
+ public const int Field9FieldNumber = 9;
+ private readonly static int Field9DefaultValue = 0;
+
+ private int field9_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Field9 {
+ get { if ((_hasBits0 & 128) != 0) { return field9_; } else { return Field9DefaultValue; } }
+ set {
+ _hasBits0 |= 128;
+ field9_ = value;
+ }
+ }
+ /// <summary>Gets whether the "field9" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasField9 {
+ get { return (_hasBits0 & 128) != 0; }
+ }
+ /// <summary>Clears the value of the "field9" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearField9() {
+ _hasBits0 &= ~128;
+ }
+
+ /// <summary>Field number for the "field10" field.</summary>
+ public const int Field10FieldNumber = 10;
+ private readonly static int Field10DefaultValue = 0;
+
+ private int field10_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Field10 {
+ get { if ((_hasBits0 & 256) != 0) { return field10_; } else { return Field10DefaultValue; } }
+ set {
+ _hasBits0 |= 256;
+ field10_ = value;
+ }
+ }
+ /// <summary>Gets whether the "field10" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasField10 {
+ get { return (_hasBits0 & 256) != 0; }
+ }
+ /// <summary>Clears the value of the "field10" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearField10() {
+ _hasBits0 &= ~256;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as TestExtensionInsideTable);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(TestExtensionInsideTable other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Field1 != other.Field1) return false;
+ if (Field2 != other.Field2) return false;
+ if (Field3 != other.Field3) return false;
+ if (Field4 != other.Field4) return false;
+ if (Field6 != other.Field6) return false;
+ if (Field7 != other.Field7) return false;
+ if (Field8 != other.Field8) return false;
+ if (Field9 != other.Field9) return false;
+ if (Field10 != other.Field10) return false;
+ if (!Equals(_extensions, other._extensions)) {
+ return false;
+ }
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasField1) hash ^= Field1.GetHashCode();
+ if (HasField2) hash ^= Field2.GetHashCode();
+ if (HasField3) hash ^= Field3.GetHashCode();
+ if (HasField4) hash ^= Field4.GetHashCode();
+ if (HasField6) hash ^= Field6.GetHashCode();
+ if (HasField7) hash ^= Field7.GetHashCode();
+ if (HasField8) hash ^= Field8.GetHashCode();
+ if (HasField9) hash ^= Field9.GetHashCode();
+ if (HasField10) hash ^= Field10.GetHashCode();
+ if (_extensions != null) {
+ hash ^= _extensions.GetHashCode();
+ }
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasField1) {
+ output.WriteRawTag(8);
+ output.WriteInt32(Field1);
+ }
+ if (HasField2) {
+ output.WriteRawTag(16);
+ output.WriteInt32(Field2);
+ }
+ if (HasField3) {
+ output.WriteRawTag(24);
+ output.WriteInt32(Field3);
+ }
+ if (HasField4) {
+ output.WriteRawTag(32);
+ output.WriteInt32(Field4);
+ }
+ if (HasField6) {
+ output.WriteRawTag(48);
+ output.WriteInt32(Field6);
+ }
+ if (HasField7) {
+ output.WriteRawTag(56);
+ output.WriteInt32(Field7);
+ }
+ if (HasField8) {
+ output.WriteRawTag(64);
+ output.WriteInt32(Field8);
+ }
+ if (HasField9) {
+ output.WriteRawTag(72);
+ output.WriteInt32(Field9);
+ }
+ if (HasField10) {
+ output.WriteRawTag(80);
+ output.WriteInt32(Field10);
+ }
+ if (_extensions != null) {
+ _extensions.WriteTo(output);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasField1) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field1);
+ }
+ if (HasField2) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field2);
+ }
+ if (HasField3) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field3);
+ }
+ if (HasField4) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field4);
+ }
+ if (HasField6) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field6);
+ }
+ if (HasField7) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field7);
+ }
+ if (HasField8) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field8);
+ }
+ if (HasField9) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field9);
+ }
+ if (HasField10) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Field10);
+ }
+ if (_extensions != null) {
+ size += _extensions.CalculateSize();
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(TestExtensionInsideTable other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasField1) {
+ Field1 = other.Field1;
+ }
+ if (other.HasField2) {
+ Field2 = other.Field2;
+ }
+ if (other.HasField3) {
+ Field3 = other.Field3;
+ }
+ if (other.HasField4) {
+ Field4 = other.Field4;
+ }
+ if (other.HasField6) {
+ Field6 = other.Field6;
+ }
+ if (other.HasField7) {
+ Field7 = other.Field7;
+ }
+ if (other.HasField8) {
+ Field8 = other.Field8;
+ }
+ if (other.HasField9) {
+ Field9 = other.Field9;
+ }
+ if (other.HasField10) {
+ Field10 = other.Field10;
+ }
+ pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ }
+ break;
+ case 8: {
+ Field1 = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ Field2 = input.ReadInt32();
+ break;
+ }
+ case 24: {
+ Field3 = input.ReadInt32();
+ break;
+ }
+ case 32: {
+ Field4 = input.ReadInt32();
+ break;
+ }
+ case 48: {
+ Field6 = input.ReadInt32();
+ break;
+ }
+ case 56: {
+ Field7 = input.ReadInt32();
+ break;
+ }
+ case 64: {
+ Field8 = input.ReadInt32();
+ break;
+ }
+ case 72: {
+ Field9 = input.ReadInt32();
+ break;
+ }
+ case 80: {
+ Field10 = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ public void RegisterExtension(pb::Extension extension) {
+ pb::ExtensionSet.Register(ref _extensions, extension);
+ }
+ public TValue GetExtension<TValue>(pb::Extension<TestExtensionInsideTable, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TestExtensionInsideTable, TValue> extension) {
+ return pb::ExtensionSet.Get(ref _extensions, extension);
+ }
+ public void SetExtension<TValue>(pb::Extension<TestExtensionInsideTable, TValue> extension, TValue value) {
+ pb::ExtensionSet.Set(ref _extensions, extension, value);
+ }
+ public bool HasExtension<TValue>(pb::Extension<TestExtensionInsideTable, TValue> extension) {
+ return pb::ExtensionSet.Has(ref _extensions, extension);
+ }
+ public void ClearExtension<TValue>(pb::Extension<TestExtensionInsideTable, TValue> extension) {
+ pb::ExtensionSet.Clear(ref _extensions, extension);
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs
new file mode 100644
index 0000000..d5f8589
--- /dev/null
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs
@@ -0,0 +1,210 @@
+// <auto-generated>
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: unittest_import.proto
+// </auto-generated>
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Google.Protobuf.TestProtos.Proto2 {
+
+ /// <summary>Holder for reflection information generated from unittest_import.proto</summary>
+ public static partial class UnittestImportReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for unittest_import.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static UnittestImportReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChV1bml0dGVzdF9pbXBvcnQucHJvdG8SH3Byb3RvYnVmX3VuaXR0ZXN0X2lt",
+ "cG9ydF9wcm90bzIaHHVuaXR0ZXN0X2ltcG9ydF9wdWJsaWMucHJvdG8iGgoN",
+ "SW1wb3J0TWVzc2FnZRIJCgFkGAEgASgFKjwKCkltcG9ydEVudW0SDgoKSU1Q",
+ "T1JUX0ZPTxAHEg4KCklNUE9SVF9CQVIQCBIOCgpJTVBPUlRfQkFaEAkqMQoQ",
+ "SW1wb3J0RW51bUZvck1hcBILCgdVTktOT1dOEAASBwoDRk9PEAESBwoDQkFS",
+ "EAJCKUgB+AEBqgIhR29vZ2xlLlByb3RvYnVmLlRlc3RQcm90b3MuUHJvdG8y",
+ "UAA="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.Proto2.UnittestImportPublicReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.Proto2.ImportEnum), typeof(global::Google.Protobuf.TestProtos.Proto2.ImportEnumForMap), }, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.ImportMessage), global::Google.Protobuf.TestProtos.Proto2.ImportMessage.Parser, new[]{ "D" }, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum ImportEnum {
+ [pbr::OriginalName("IMPORT_FOO")] ImportFoo = 7,
+ [pbr::OriginalName("IMPORT_BAR")] ImportBar = 8,
+ [pbr::OriginalName("IMPORT_BAZ")] ImportBaz = 9,
+ }
+
+ /// <summary>
+ /// To use an enum in a map, it must has the first value as 0.
+ /// </summary>
+ public enum ImportEnumForMap {
+ [pbr::OriginalName("UNKNOWN")] Unknown = 0,
+ [pbr::OriginalName("FOO")] Foo = 1,
+ [pbr::OriginalName("BAR")] Bar = 2,
+ }
+
+ #endregion
+
+ #region Messages
+ public sealed partial class ImportMessage : pb::IMessage<ImportMessage> {
+ private static readonly pb::MessageParser<ImportMessage> _parser = new pb::MessageParser<ImportMessage>(() => new ImportMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<ImportMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestImportReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ImportMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ImportMessage(ImportMessage other) : this() {
+ _hasBits0 = other._hasBits0;
+ d_ = other.d_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ImportMessage Clone() {
+ return new ImportMessage(this);
+ }
+
+ /// <summary>Field number for the "d" field.</summary>
+ public const int DFieldNumber = 1;
+ private readonly static int DDefaultValue = 0;
+
+ private int d_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int D {
+ get { if ((_hasBits0 & 1) != 0) { return d_; } else { return DDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ d_ = value;
+ }
+ }
+ /// <summary>Gets whether the "d" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasD {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "d" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearD() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ImportMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ImportMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (D != other.D) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasD) hash ^= D.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasD) {
+ output.WriteRawTag(8);
+ output.WriteInt32(D);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasD) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(D);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ImportMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasD) {
+ D = other.D;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ D = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs
new file mode 100644
index 0000000..77f2121
--- /dev/null
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs
@@ -0,0 +1,188 @@
+// <auto-generated>
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: unittest_import_public.proto
+// </auto-generated>
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Google.Protobuf.TestProtos.Proto2 {
+
+ /// <summary>Holder for reflection information generated from unittest_import_public.proto</summary>
+ public static partial class UnittestImportPublicReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for unittest_import_public.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static UnittestImportPublicReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Chx1bml0dGVzdF9pbXBvcnRfcHVibGljLnByb3RvEh9wcm90b2J1Zl91bml0",
+ "dGVzdF9pbXBvcnRfcHJvdG8yIiAKE1B1YmxpY0ltcG9ydE1lc3NhZ2USCQoB",
+ "ZRgBIAEoBUIkqgIhR29vZ2xlLlByb3RvYnVmLlRlc3RQcm90b3MuUHJvdG8y"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage), global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage.Parser, new[]{ "E" }, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class PublicImportMessage : pb::IMessage<PublicImportMessage> {
+ private static readonly pb::MessageParser<PublicImportMessage> _parser = new pb::MessageParser<PublicImportMessage>(() => new PublicImportMessage());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<PublicImportMessage> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.Proto2.UnittestImportPublicReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public PublicImportMessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public PublicImportMessage(PublicImportMessage other) : this() {
+ _hasBits0 = other._hasBits0;
+ e_ = other.e_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public PublicImportMessage Clone() {
+ return new PublicImportMessage(this);
+ }
+
+ /// <summary>Field number for the "e" field.</summary>
+ public const int EFieldNumber = 1;
+ private readonly static int EDefaultValue = 0;
+
+ private int e_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int E {
+ get { if ((_hasBits0 & 1) != 0) { return e_; } else { return EDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ e_ = value;
+ }
+ }
+ /// <summary>Gets whether the "e" field is set</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool HasE {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// <summary>Clears the value of the "e" field</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void ClearE() {
+ _hasBits0 &= ~1;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as PublicImportMessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(PublicImportMessage other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (E != other.E) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasE) hash ^= E.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HasE) {
+ output.WriteRawTag(8);
+ output.WriteInt32(E);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasE) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(E);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(PublicImportMessage other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasE) {
+ E = other.E;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ E = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/src/google/protobuf/compiler/csharp/csharp_field_base.cc b/src/google/protobuf/compiler/csharp/csharp_field_base.cc
index 9be7b70..c5c2f38 100644
--- a/src/google/protobuf/compiler/csharp/csharp_field_base.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_field_base.cc
@@ -306,7 +306,7 @@
if (descriptor->default_value_string().empty())
return "\"\"";
else
- return "global::System.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(\" +" + StringToBase64(descriptor->default_value_string()) + " +\"))";
+ return "global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(\" +" + StringToBase64(descriptor->default_value_string()) + " +\"))";
}
std::string FieldGeneratorBase::GetBytesDefaultValueInternal(const FieldDescriptor* descriptor) {
diff --git a/src/google/protobuf/compiler/csharp/csharp_helpers.cc b/src/google/protobuf/compiler/csharp/csharp_helpers.cc
index 50c2c97..4042512 100644
--- a/src/google/protobuf/compiler/csharp/csharp_helpers.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_helpers.cc
@@ -287,12 +287,14 @@
if (containing_type == NULL) {
return 0;
}
- const FieldDescriptor* field = containing_type->FindFieldByName(descriptor->name());
- if (field != NULL && field->type() == FieldDescriptor::Type::TYPE_GROUP) {
- return internal::WireFormatLite::MakeTag(field->number(), internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED);
- } else {
- return 0;
+ const FieldDescriptor* field;
+ for (int i = 0; i < containing_type->field_count(); i++) {
+ field = containing_type->field(i);
+ if (field->type() == FieldDescriptor::Type::TYPE_GROUP && field->message_type() == descriptor) {
+ return internal::WireFormatLite::MakeTag(field->number(), internal::WireFormatLite::WIRETYPE_END_GROUP);
+ }
}
+ return 0;
}
std::string ToCSharpName(const std::string& name, const FileDescriptor* file) {
diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc
index 0ddc38e..73cc2a4 100644
--- a/src/google/protobuf/compiler/csharp/csharp_message.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_message.cc
@@ -625,7 +625,7 @@
printer->Indent();
if (end_tag_ != 0) {
printer->Print(
- "$end_tag$:\n"
+ "case $end_tag$:\n"
" return;\n",
"end_tag", StrCat(end_tag_));
}
@@ -681,7 +681,7 @@
// it's a waste of space to track presence for all values, so we only track them if they're not nullable
int MessageGenerator::GetPresenceIndex(const FieldDescriptor* descriptor) {
- if (IsNullable(descriptor) || !IsProto2(descriptor_->file())) {
+ if (IsNullable(descriptor) || !IsProto2(descriptor->file()) || descriptor->is_extension()) {
return -1;
}