From 5caa44e0564bae42e00900c73c20e0ec2c76b058 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Fri, 15 Mar 2019 00:25:32 -0500 Subject: [PATCH 01/34] Remove internal constraint on descriptor proto --- .../Google.Protobuf/Reflection/Descriptor.cs | 50 +++++++++---------- .../compiler/csharp/csharp_generator.cc | 6 --- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs index 162f17512e62..75e9ee4d5415 100644 --- a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs @@ -12,7 +12,7 @@ namespace Google.Protobuf.Reflection { /// Holder for reflection information generated from google/protobuf/descriptor.proto - internal static partial class DescriptorReflection { + public static partial class DescriptorReflection { #region Descriptor /// File descriptor for google/protobuf/descriptor.proto @@ -193,7 +193,7 @@ internal static partial class DescriptorReflection { /// The protocol compiler can output a FileDescriptorSet containing the .proto /// files it parses. /// - internal sealed partial class FileDescriptorSet : pb::IMessage { + public sealed partial class FileDescriptorSet : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileDescriptorSet()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -317,7 +317,7 @@ internal sealed partial class FileDescriptorSet : pb::IMessage /// Describes a complete .proto file. /// - internal sealed partial class FileDescriptorProto : pb::IMessage { + public sealed partial class FileDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileDescriptorProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -800,7 +800,7 @@ internal sealed partial class FileDescriptorProto : pb::IMessage /// Describes a message type. /// - internal sealed partial class DescriptorProto : pb::IMessage { + public sealed partial class DescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DescriptorProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1151,7 +1151,7 @@ internal sealed partial class DescriptorProto : pb::IMessage { /// Container for nested types declared in the DescriptorProto message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static partial class Types { - internal sealed partial class ExtensionRange : pb::IMessage { + public sealed partial class ExtensionRange : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ExtensionRange()); private pb::UnknownFieldSet _unknownFields; private int _hasBits0; @@ -1391,7 +1391,7 @@ internal sealed partial class ExtensionRange : pb::IMessage { /// fields or extension ranges in the same message. Reserved ranges may /// not overlap. /// - internal sealed partial class ReservedRange : pb::IMessage { + public sealed partial class ReservedRange : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReservedRange()); private pb::UnknownFieldSet _unknownFields; private int _hasBits0; @@ -1753,7 +1753,7 @@ internal sealed partial class ExtensionRangeOptions : pb::IExtendableMessage /// Describes a field within a message. /// - internal sealed partial class FieldDescriptorProto : pb::IMessage { + public sealed partial class FieldDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldDescriptorProto()); private pb::UnknownFieldSet _unknownFields; private int _hasBits0; @@ -2298,7 +2298,7 @@ internal sealed partial class FieldDescriptorProto : pb::IMessageContainer for nested types declared in the FieldDescriptorProto message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static partial class Types { - internal enum Type { + public enum Type { /// /// 0 is reserved for errors. /// Order is weird for historical reasons. @@ -2349,7 +2349,7 @@ internal enum Type { [pbr::OriginalName("TYPE_SINT64")] Sint64 = 18, } - internal enum Label { + public enum Label { /// /// 0 is reserved for errors /// @@ -2366,7 +2366,7 @@ internal enum Label { /// /// Describes a oneof. /// - internal sealed partial class OneofDescriptorProto : pb::IMessage { + public sealed partial class OneofDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OneofDescriptorProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2554,7 +2554,7 @@ internal sealed partial class OneofDescriptorProto : pb::IMessage /// Describes an enum type. /// - internal sealed partial class EnumDescriptorProto : pb::IMessage { + public sealed partial class EnumDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumDescriptorProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2818,7 +2818,7 @@ public static partial class Types { /// is inclusive such that it can appropriately represent the entire int32 /// domain. /// - internal sealed partial class EnumReservedRange : pb::IMessage { + public sealed partial class EnumReservedRange : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumReservedRange()); private pb::UnknownFieldSet _unknownFields; private int _hasBits0; @@ -3017,7 +3017,7 @@ internal sealed partial class EnumReservedRange : pb::IMessage /// Describes a value within an enum. /// - internal sealed partial class EnumValueDescriptorProto : pb::IMessage { + public sealed partial class EnumValueDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumValueDescriptorProto()); private pb::UnknownFieldSet _unknownFields; private int _hasBits0; @@ -3248,7 +3248,7 @@ internal sealed partial class EnumValueDescriptorProto : pb::IMessage /// Describes a service. /// - internal sealed partial class ServiceDescriptorProto : pb::IMessage { + public sealed partial class ServiceDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServiceDescriptorProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -3456,7 +3456,7 @@ internal sealed partial class ServiceDescriptorProto : pb::IMessage /// Describes a method of a service. /// - internal sealed partial class MethodDescriptorProto : pb::IMessage { + public sealed partial class MethodDescriptorProto : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MethodDescriptorProto()); private pb::UnknownFieldSet _unknownFields; private int _hasBits0; @@ -4892,7 +4892,7 @@ public static partial class Types { /// /// Generated classes can be optimized for speed or code size. /// - internal enum OptimizeMode { + public enum OptimizeMode { /// /// Generate complete code for parsing, serialization, /// @@ -5772,7 +5772,7 @@ internal sealed partial class FieldOptions : pb::IExtendableMessageContainer for nested types declared in the FieldOptions message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static partial class Types { - internal enum CType { + public enum CType { /// /// Default mode. /// @@ -5781,7 +5781,7 @@ internal enum CType { [pbr::OriginalName("STRING_PIECE")] StringPiece = 2, } - internal enum JSType { + public enum JSType { /// /// Use the default type. /// @@ -6905,7 +6905,7 @@ public static partial class Types { /// or neither? HTTP based RPC implementation may choose GET verb for safe /// methods, and PUT verb for idempotent methods instead of the default POST. /// - internal enum IdempotencyLevel { + public enum IdempotencyLevel { [pbr::OriginalName("IDEMPOTENCY_UNKNOWN")] IdempotencyUnknown = 0, /// /// implies idempotent @@ -6930,7 +6930,7 @@ internal enum IdempotencyLevel { /// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions /// in them. /// - internal sealed partial class UninterpretedOption : pb::IMessage { + public sealed partial class UninterpretedOption : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UninterpretedOption()); private pb::UnknownFieldSet _unknownFields; private int _hasBits0; @@ -7309,7 +7309,7 @@ public static partial class Types { /// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents /// "foo.(bar.baz).qux". /// - internal sealed partial class NamePart : pb::IMessage { + public sealed partial class NamePart : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NamePart()); private pb::UnknownFieldSet _unknownFields; private int _hasBits0; @@ -7502,7 +7502,7 @@ internal sealed partial class NamePart : pb::IMessage { /// Encapsulates information about the original source file from which a /// FileDescriptorProto was generated. /// - internal sealed partial class SourceCodeInfo : pb::IMessage { + public sealed partial class SourceCodeInfo : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SourceCodeInfo()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -7670,7 +7670,7 @@ internal sealed partial class SourceCodeInfo : pb::IMessage { /// Container for nested types declared in the SourceCodeInfo message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static partial class Types { - internal sealed partial class Location : pb::IMessage { + public sealed partial class Location : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Location()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -8004,7 +8004,7 @@ internal sealed partial class Location : pb::IMessage { /// file. A GeneratedCodeInfo message is associated with only one generated /// source file, but may contain references to different source .proto files. /// - internal sealed partial class GeneratedCodeInfo : pb::IMessage { + public sealed partial class GeneratedCodeInfo : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GeneratedCodeInfo()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -8131,7 +8131,7 @@ internal sealed partial class GeneratedCodeInfo : pb::IMessageContainer for nested types declared in the GeneratedCodeInfo message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static partial class Types { - internal sealed partial class Annotation : pb::IMessage { + public sealed partial class Annotation : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Annotation()); private pb::UnknownFieldSet _unknownFields; private int _hasBits0; diff --git a/src/google/protobuf/compiler/csharp/csharp_generator.cc b/src/google/protobuf/compiler/csharp/csharp_generator.cc index 2b353b341384..b335522032f3 100644 --- a/src/google/protobuf/compiler/csharp/csharp_generator.cc +++ b/src/google/protobuf/compiler/csharp/csharp_generator.cc @@ -63,12 +63,6 @@ bool Generator::Generate( std::vector > options; ParseGeneratorParameter(parameter, &options); - // We only support proto3 - but we make an exception for descriptor.proto. - if (file->syntax() != FileDescriptor::SYNTAX_PROTO3 && !IsDescriptorProto(file)) { - *error = "C# code generation only supports proto3 syntax"; - return false; - } - struct Options cli_options; for (int i = 0; i < options.size(); i++) { From 4be0394686c5bb7440e73d8d55de9910df273618 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Fri, 15 Mar 2019 00:25:43 -0500 Subject: [PATCH 02/34] Remove proto2 check from generator --- .../protobuf/compiler/csharp/csharp_source_generator_base.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc b/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc index 68209cc82530..ee7502fb0481 100644 --- a/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc +++ b/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc @@ -59,7 +59,7 @@ void SourceGeneratorBase::WriteGeneratedCodeAttributes(io::Printer* printer) { } std::string SourceGeneratorBase::class_access_level() { - return (IsDescriptorProto(descriptor_) || this->options()->internal_access) ? "internal" : "public"; + return this->options()->internal_access ? "internal" : "public"; } const Options* SourceGeneratorBase::options() { From 05712c6791d959c73d059d255ec3ab316d8ab922 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Fri, 15 Mar 2019 21:28:59 -0500 Subject: [PATCH 03/34] Reapply custom option accessors from previous PR along with CustomOptions accessor deprecations --- .../Google.Protobuf.Test/Reflection/CustomOptionsTest.cs | 2 ++ csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs | 6 ++---- .../src/Google.Protobuf/Reflection/EnumValueDescriptor.cs | 6 ++---- csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs | 6 ++---- csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs | 6 ++---- csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs | 6 ++---- csharp/src/Google.Protobuf/Reflection/MethodDescriptor.cs | 6 ++---- csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs | 6 ++---- 8 files changed, 16 insertions(+), 28 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs index ff4e9a7ffd05..7aa2077778b0 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs @@ -41,6 +41,8 @@ using static UnitTest.Issues.TestProtos.DummyMessageContainingEnum.Types; using static Google.Protobuf.Test.Reflection.CustomOptionNumber; +#pragma warning disable CS0618 + namespace Google.Protobuf.Test.Reflection { // Internal enum to allow us to use "using static" for convenience. diff --git a/csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs index 36a1d0a5ecd9..33be96198deb 100644 --- a/csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/EnumDescriptor.cs @@ -128,17 +128,16 @@ public EnumValueDescriptor FindValueByName(string name) /// /// The (possibly empty) set of custom options for this enum. /// - //[Obsolete("CustomOptions are obsolete. Use GetOption")] + [Obsolete("CustomOptions are obsolete. Use GetOption")] public CustomOptions CustomOptions => new CustomOptions(Proto.Options._extensions?.ValuesByNumber); - /* // uncomment this in the full proto2 support PR /// /// Gets a single value enum option for this descriptor /// public T GetOption(Extension extension) { var value = Proto.Options.GetExtension(extension); - return value is IDeepCloneable clonable ? clonable.Clone() : value; + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; } /// @@ -148,6 +147,5 @@ public RepeatedField GetOption(RepeatedExtension extension { return Proto.Options.GetExtension(extension).Clone(); } - */ } } \ No newline at end of file diff --git a/csharp/src/Google.Protobuf/Reflection/EnumValueDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/EnumValueDescriptor.cs index 99c989130c8e..3936aa4e268d 100644 --- a/csharp/src/Google.Protobuf/Reflection/EnumValueDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/EnumValueDescriptor.cs @@ -73,17 +73,16 @@ public sealed class EnumValueDescriptor : DescriptorBase /// /// The (possibly empty) set of custom options for this enum value. /// - //[Obsolete("CustomOptions are obsolete. Use GetOption")] + [Obsolete("CustomOptions are obsolete. Use GetOption")] public CustomOptions CustomOptions => new CustomOptions(Proto.Options._extensions?.ValuesByNumber); - /* // uncomment this in the full proto2 support PR /// /// Gets a single value enum option for this descriptor /// public T GetOption(Extension extension) { var value = Proto.Options.GetExtension(extension); - return value is IDeepCloneable clonable ? clonable.Clone() : value; + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; } /// @@ -93,7 +92,6 @@ public RepeatedField GetOption(RepeatedExtension exte { return Proto.Options.GetExtension(extension).Clone(); } - */ } } \ No newline at end of file diff --git a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs index 5a2f7f3d8e1f..c06328f99ce9 100644 --- a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs @@ -277,17 +277,16 @@ public MessageDescriptor ExtendeeType /// /// The (possibly empty) set of custom options for this field. /// - //[Obsolete("CustomOptions are obsolete. Use GetOption")] + [Obsolete("CustomOptions are obsolete. Use GetOption")] public CustomOptions CustomOptions => new CustomOptions(Proto.Options._extensions?.ValuesByNumber); - /* // uncomment this in the full proto2 support PR /// /// Gets a single value enum option for this descriptor /// public T GetOption(Extension extension) { var value = Proto.Options.GetExtension(extension); - return value is IDeepCloneable clonable ? clonable.Clone() : value; + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; } /// @@ -297,7 +296,6 @@ public RepeatedField GetOption(RepeatedExtension extensio { return Proto.Options.GetExtension(extension).Clone(); } - */ /// /// Look up and cross-link all field types etc. diff --git a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs index 9b20e3d22ad6..13266f725dd9 100644 --- a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs @@ -504,17 +504,16 @@ public override string ToString() /// /// The (possibly empty) set of custom options for this file. /// - //[Obsolete("CustomOptions are obsolete. Use GetOption")] + [Obsolete("CustomOptions are obsolete. Use GetOption")] public CustomOptions CustomOptions => new CustomOptions(Proto.Options._extensions?.ValuesByNumber); - /* // uncomment this in the full proto2 support PR /// /// Gets a single value enum option for this descriptor /// public T GetOption(Extension extension) { var value = Proto.Options.GetExtension(extension); - return value is IDeepCloneable clonable ? clonable.Clone() : value; + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; } /// @@ -524,7 +523,6 @@ public RepeatedField GetOption(RepeatedExtension extension { return Proto.Options.GetExtension(extension).Clone(); } - */ /// /// Performs initialization for the given generic type argument. diff --git a/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs index 15bfbfadd04e..4ca9e369894a 100644 --- a/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs @@ -243,17 +243,16 @@ internal override IReadOnlyList GetNestedDescriptorListForField( /// /// The (possibly empty) set of custom options for this message. /// - //[Obsolete("CustomOptions are obsolete. Use GetOption")] + [Obsolete("CustomOptions are obsolete. Use GetOption")] public CustomOptions CustomOptions => new CustomOptions(Proto.Options._extensions?.ValuesByNumber); - /* // uncomment this in the full proto2 support PR /// /// Gets a single value enum option for this descriptor /// public T GetOption(Extension extension) { var value = Proto.Options.GetExtension(extension); - return value is IDeepCloneable clonable ? clonable.Clone() : value; + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; } /// @@ -263,7 +262,6 @@ public Collections.RepeatedField GetOption(RepeatedExtension /// Looks up and cross-links all fields and nested types. diff --git a/csharp/src/Google.Protobuf/Reflection/MethodDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/MethodDescriptor.cs index 1b37d9b17226..c138576b3270 100644 --- a/csharp/src/Google.Protobuf/Reflection/MethodDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/MethodDescriptor.cs @@ -73,17 +73,16 @@ public sealed class MethodDescriptor : DescriptorBase /// /// The (possibly empty) set of custom options for this method. /// - //[Obsolete("CustomOptions are obsolete. Use GetOption")] + [Obsolete("CustomOptions are obsolete. Use GetOption")] public CustomOptions CustomOptions => new CustomOptions(Proto.Options._extensions?.ValuesByNumber); - /* // uncomment this in the full proto2 support PR /// /// Gets a single value enum option for this descriptor /// public T GetOption(Extension extension) { var value = Proto.Options.GetExtension(extension); - return value is IDeepCloneable clonable ? clonable.Clone() : value; + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; } /// @@ -93,7 +92,6 @@ public RepeatedField GetOption(RepeatedExtension extensi { return Proto.Options.GetExtension(extension).Clone(); } - */ internal MethodDescriptor(MethodDescriptorProto proto, FileDescriptor file, ServiceDescriptor parent, int index) diff --git a/csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs index 54f4df7298a0..215aff5d44ef 100644 --- a/csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/ServiceDescriptor.cs @@ -94,17 +94,16 @@ public MethodDescriptor FindMethodByName(String name) /// /// The (possibly empty) set of custom options for this service. /// - //[Obsolete("CustomOptions are obsolete. Use GetOption")] + [Obsolete("CustomOptions are obsolete. Use GetOption")] public CustomOptions CustomOptions => new CustomOptions(Proto.Options._extensions?.ValuesByNumber); - /* // uncomment this in the full proto2 support PR /// /// Gets a single value enum option for this descriptor /// public T GetOption(Extension extension) { var value = Proto.Options.GetExtension(extension); - return value is IDeepCloneable clonable ? clonable.Clone() : value; + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; } /// @@ -114,7 +113,6 @@ public RepeatedField GetOption(RepeatedExtension extens { return Proto.Options.GetExtension(extension).Clone(); } - */ internal void CrossLink() { From 03872044b1bab86be556bb1d5a5a5dddda2ead76 Mon Sep 17 00:00:00 2001 From: ObsidianMinor Date: Sat, 16 Mar 2019 08:59:00 -0500 Subject: [PATCH 04/34] Make extension container classes public and modify conformance to test proto2 messages --- csharp/generate_protos.sh | 3 +- .../Google.Protobuf.Conformance/Program.cs | 14 +- .../TestProtos/TestMessagesProto2.cs | 4282 +++++++++++++++++ .../TestProtos/UnittestCustomOptionsProto3.cs | 4 +- .../compiler/csharp/csharp_message.cc | 2 +- .../csharp/csharp_reflection_class.cc | 2 +- 6 files changed, 4299 insertions(+), 8 deletions(-) create mode 100644 csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh index 5d3f5b7759ad..55e87d3337be 100755 --- a/csharp/generate_protos.sh +++ b/csharp/generate_protos.sh @@ -53,7 +53,8 @@ $PROTOC -Isrc -Icsharp/protos \ csharp/protos/unittest_import_proto3.proto \ csharp/protos/unittest_import_public_proto3.proto \ src/google/protobuf/unittest_well_known_types.proto \ - src/google/protobuf/test_messages_proto3.proto + src/google/protobuf/test_messages_proto3.proto \ + src/google/protobuf/test_messages_proto2.proto # AddressBook sample protos $PROTOC -Iexamples -Isrc --csharp_out=csharp/src/AddressBook \ diff --git a/csharp/src/Google.Protobuf.Conformance/Program.cs b/csharp/src/Google.Protobuf.Conformance/Program.cs index f5e1dad17e39..728a3b968238 100644 --- a/csharp/src/Google.Protobuf.Conformance/Program.cs +++ b/csharp/src/Google.Protobuf.Conformance/Program.cs @@ -48,7 +48,9 @@ private static void Main(string[] args) // This way we get the binary streams instead of readers/writers. var input = new BinaryReader(Console.OpenStandardInput()); var output = new BinaryWriter(Console.OpenStandardOutput()); - var typeRegistry = TypeRegistry.FromMessages(ProtobufTestMessages.Proto3.TestAllTypesProto3.Descriptor); + var typeRegistry = TypeRegistry.FromMessages( + ProtobufTestMessages.Proto3.TestAllTypesProto3.Descriptor, + ProtobufTestMessages.Proto2.TestAllTypesProto2.Descriptor); int count = 0; while (RunTest(input, output, typeRegistry)) @@ -81,7 +83,7 @@ private static bool RunTest(BinaryReader input, BinaryWriter output, TypeRegistr private static ConformanceResponse PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) { - ProtobufTestMessages.Proto3.TestAllTypesProto3 message; + IMessage message; try { switch (request.PayloadCase) @@ -101,7 +103,13 @@ private static ConformanceResponse PerformRequest(ConformanceRequest request, Ty } else if (request.MessageType.Equals("protobuf_test_messages.proto2.TestAllTypesProto2")) { - return new ConformanceResponse { Skipped = "CSharp doesn't support proto2" }; + ExtensionRegistry registry = new ExtensionRegistry() + { + ProtobufTestMessages.Proto2.TestMessagesProto2Extensions.ExtensionInt32, + ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension1.Extensions.MessageSetExtension, + ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension2.Extensions.MessageSetExtension + }; + message = ProtobufTestMessages.Proto2.TestAllTypesProto2.Parser.WithExtensionRegistry(registry).ParseFrom(request.ProtobufPayload); } else { diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs new file mode 100644 index 000000000000..c9c063fb40c9 --- /dev/null +++ b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs @@ -0,0 +1,4282 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/test_messages_proto2.proto +// +#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 ProtobufTestMessages.Proto2 { + + /// Holder for reflection information generated from google/protobuf/test_messages_proto2.proto + public static partial class TestMessagesProto2Reflection { + + #region Descriptor + /// File descriptor for google/protobuf/test_messages_proto2.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static TestMessagesProto2Reflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cip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FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ProtobufTestMessages.Proto2.ForeignEnumProto2), }, new pb::Extension[] { TestMessagesProto2Extensions.ExtensionInt32 }, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalStringPiece", "OptionalCord", "RecursiveMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedStringPiece", "RepeatedCord", "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapStringBytes", "MapStringNestedMessage", "MapStringForeignMessage", "MapStringNestedEnum", "MapStringForeignEnum", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes", "OneofBool", "OneofUint64", "OneofFloat", "OneofDouble", "OneofEnum", "Data", "Fieldname1", "FieldName2", "FieldName3", "FieldName4", "Field0Name5", "Field0Name6", "FieldName7", "FieldName8", "FieldName9", "FieldName10", "FIELDNAME11", "FIELDName12", "FieldName13", "FieldName14", "FieldName15", "FieldName16", "FieldName17", "FieldName18" }, new[]{ "OneofField" }, new[]{ typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage.Parser, new[]{ "A", "Corecursive" }, null, null, null, null), + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.Data), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.Data.Parser, new[]{ "GroupInt32", "GroupUint32" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrect), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrect.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension1), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension1.Parser, new[]{ "Str" }, null, null, new pb::Extension[] { global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension1.Extensions.MessageSetExtension }, null), + new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension2), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension2.Parser, new[]{ "I" }, null, null, new pb::Extension[] { global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension2.Extensions.MessageSetExtension }, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.ForeignMessageProto2), global::ProtobufTestMessages.Proto2.ForeignMessageProto2.Parser, new[]{ "C" }, null, null, null, null) + })); + } + #endregion + + } + /// Holder for extension identifiers generated from the top level of google/protobuf/test_messages_proto2.proto + public static partial class TestMessagesProto2Extensions { + public static readonly pb::Extension ExtensionInt32 = + new pb::Extension(120, pb::FieldCodec.ForInt32(960, 0)); + } + + #region Enums + public enum ForeignEnumProto2 { + [pbr::OriginalName("FOREIGN_FOO")] ForeignFoo = 0, + [pbr::OriginalName("FOREIGN_BAR")] ForeignBar = 1, + [pbr::OriginalName("FOREIGN_BAZ")] ForeignBaz = 2, + } + + #endregion + + #region Messages + /// + /// This proto includes every type of field in both singular and repeated + /// forms. + /// + /// Also, crucially, all messages and enums in this file are eventually + /// submessages of this message. So for example, a fuzz test of TestAllTypes + /// could trigger bugs that occur in any message type in this file. We verify + /// this stays true in a unit test. + /// + public sealed partial class TestAllTypesProto2 : pb::IExtensionMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestAllTypesProto2()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + private int _hasBits0; + private int _hasBits1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::ProtobufTestMessages.Proto2.TestMessagesProto2Reflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TestAllTypesProto2() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TestAllTypesProto2(TestAllTypesProto2 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_; + optionalNestedMessage_ = other.HasOptionalNestedMessage ? other.optionalNestedMessage_.Clone() : null; + optionalForeignMessage_ = other.HasOptionalForeignMessage ? other.optionalForeignMessage_.Clone() : null; + optionalNestedEnum_ = other.optionalNestedEnum_; + optionalForeignEnum_ = other.optionalForeignEnum_; + optionalStringPiece_ = other.optionalStringPiece_; + optionalCord_ = other.optionalCord_; + recursiveMessage_ = other.HasRecursiveMessage ? other.recursiveMessage_.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(); + repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone(); + repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone(); + repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone(); + repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone(); + repeatedStringPiece_ = other.repeatedStringPiece_.Clone(); + repeatedCord_ = other.repeatedCord_.Clone(); + mapInt32Int32_ = other.mapInt32Int32_.Clone(); + mapInt64Int64_ = other.mapInt64Int64_.Clone(); + mapUint32Uint32_ = other.mapUint32Uint32_.Clone(); + mapUint64Uint64_ = other.mapUint64Uint64_.Clone(); + mapSint32Sint32_ = other.mapSint32Sint32_.Clone(); + mapSint64Sint64_ = other.mapSint64Sint64_.Clone(); + mapFixed32Fixed32_ = other.mapFixed32Fixed32_.Clone(); + mapFixed64Fixed64_ = other.mapFixed64Fixed64_.Clone(); + mapSfixed32Sfixed32_ = other.mapSfixed32Sfixed32_.Clone(); + mapSfixed64Sfixed64_ = other.mapSfixed64Sfixed64_.Clone(); + mapInt32Float_ = other.mapInt32Float_.Clone(); + mapInt32Double_ = other.mapInt32Double_.Clone(); + mapBoolBool_ = other.mapBoolBool_.Clone(); + mapStringString_ = other.mapStringString_.Clone(); + mapStringBytes_ = other.mapStringBytes_.Clone(); + mapStringNestedMessage_ = other.mapStringNestedMessage_.Clone(); + mapStringForeignMessage_ = other.mapStringForeignMessage_.Clone(); + mapStringNestedEnum_ = other.mapStringNestedEnum_.Clone(); + mapStringForeignEnum_ = other.mapStringForeignEnum_.Clone(); + data_ = other.HasData ? other.data_.Clone() : null; + fieldname1_ = other.fieldname1_; + fieldName2_ = other.fieldName2_; + FieldName3_ = other.FieldName3_; + fieldName4_ = other.fieldName4_; + field0Name5_ = other.field0Name5_; + field0Name6_ = other.field0Name6_; + fieldName7_ = other.fieldName7_; + fieldName8_ = other.fieldName8_; + fieldName9_ = other.fieldName9_; + fieldName10_ = other.fieldName10_; + fIELDNAME11_ = other.fIELDNAME11_; + fIELDName12_ = other.fIELDName12_; + FieldName13_ = other.FieldName13_; + FieldName14_ = other.FieldName14_; + fieldName15_ = other.fieldName15_; + fieldName16_ = other.fieldName16_; + fieldName17_ = other.fieldName17_; + fieldName18_ = other.fieldName18_; + 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; + case OneofFieldOneofCase.OneofBool: + OneofBool = other.OneofBool; + break; + case OneofFieldOneofCase.OneofUint64: + OneofUint64 = other.OneofUint64; + break; + case OneofFieldOneofCase.OneofFloat: + OneofFloat = other.OneofFloat; + break; + case OneofFieldOneofCase.OneofDouble: + OneofDouble = other.OneofDouble; + break; + case OneofFieldOneofCase.OneofEnum: + OneofEnum = other.OneofEnum; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TestAllTypesProto2 Clone() { + return new TestAllTypesProto2(this); + } + + /// Field number for the "optional_int32" field. + public const int OptionalInt32FieldNumber = 1; + private readonly static int OptionalInt32DefaultValue = 0; + + private int optionalInt32_; + /// + /// Singular + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int OptionalInt32 { + get { if ((_hasBits0 & 1) != 0) { return optionalInt32_; } else { return OptionalInt32DefaultValue; } } + set { + _hasBits0 |= 1; + optionalInt32_ = value; + } + } + /// Gets whether the "optional_int32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalInt32 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "optional_int32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalInt32() { + _hasBits0 &= ~1; + } + + /// Field number for the "optional_int64" field. + 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; + } + } + /// Gets whether the "optional_int64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalInt64 { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "optional_int64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalInt64() { + _hasBits0 &= ~2; + } + + /// Field number for the "optional_uint32" field. + 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; + } + } + /// Gets whether the "optional_uint32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalUint32 { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "optional_uint32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalUint32() { + _hasBits0 &= ~4; + } + + /// Field number for the "optional_uint64" field. + 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; + } + } + /// Gets whether the "optional_uint64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalUint64 { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "optional_uint64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalUint64() { + _hasBits0 &= ~8; + } + + /// Field number for the "optional_sint32" field. + 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; + } + } + /// Gets whether the "optional_sint32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalSint32 { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "optional_sint32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalSint32() { + _hasBits0 &= ~16; + } + + /// Field number for the "optional_sint64" field. + 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; + } + } + /// Gets whether the "optional_sint64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalSint64 { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "optional_sint64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalSint64() { + _hasBits0 &= ~32; + } + + /// Field number for the "optional_fixed32" field. + 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; + } + } + /// Gets whether the "optional_fixed32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalFixed32 { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "optional_fixed32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalFixed32() { + _hasBits0 &= ~64; + } + + /// Field number for the "optional_fixed64" field. + 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; + } + } + /// Gets whether the "optional_fixed64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalFixed64 { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "optional_fixed64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalFixed64() { + _hasBits0 &= ~128; + } + + /// Field number for the "optional_sfixed32" field. + 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; + } + } + /// Gets whether the "optional_sfixed32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalSfixed32 { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "optional_sfixed32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalSfixed32() { + _hasBits0 &= ~256; + } + + /// Field number for the "optional_sfixed64" field. + 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; + } + } + /// Gets whether the "optional_sfixed64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalSfixed64 { + get { return (_hasBits0 & 512) != 0; } + } + /// Clears the value of the "optional_sfixed64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalSfixed64() { + _hasBits0 &= ~512; + } + + /// Field number for the "optional_float" field. + 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; + } + } + /// Gets whether the "optional_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalFloat { + get { return (_hasBits0 & 1024) != 0; } + } + /// Clears the value of the "optional_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalFloat() { + _hasBits0 &= ~1024; + } + + /// Field number for the "optional_double" field. + 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; + } + } + /// Gets whether the "optional_double" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalDouble { + get { return (_hasBits0 & 2048) != 0; } + } + /// Clears the value of the "optional_double" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalDouble() { + _hasBits0 &= ~2048; + } + + /// Field number for the "optional_bool" field. + 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; + } + } + /// Gets whether the "optional_bool" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalBool { + get { return (_hasBits0 & 4096) != 0; } + } + /// Clears the value of the "optional_bool" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalBool() { + _hasBits0 &= ~4096; + } + + /// Field number for the "optional_string" field. + 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"); + } + } + /// Gets whether the "optional_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalString { + get { return optionalString_ != null; } + } + /// Clears the value of the "optional_string" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalString() { + optionalString_ = null; + } + + /// Field number for the "optional_bytes" field. + 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"); + } + } + /// Gets whether the "optional_bytes" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalBytes { + get { return optionalBytes_ != null; } + } + /// Clears the value of the "optional_bytes" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalBytes() { + optionalBytes_ = null; + } + + /// Field number for the "optional_nested_message" field. + public const int OptionalNestedMessageFieldNumber = 18; + private global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage optionalNestedMessage_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage OptionalNestedMessage { + get { return optionalNestedMessage_; } + set { + optionalNestedMessage_ = value; + } + } + /// Gets whether the optional_nested_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalNestedMessage { + get { return optionalNestedMessage_ != null; } + } + /// Clears the value of the optional_nested_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalNestedMessage() { + optionalNestedMessage_ = null; + } + + /// Field number for the "optional_foreign_message" field. + public const int OptionalForeignMessageFieldNumber = 19; + private global::ProtobufTestMessages.Proto2.ForeignMessageProto2 optionalForeignMessage_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::ProtobufTestMessages.Proto2.ForeignMessageProto2 OptionalForeignMessage { + get { return optionalForeignMessage_; } + set { + optionalForeignMessage_ = value; + } + } + /// Gets whether the optional_foreign_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalForeignMessage { + get { return optionalForeignMessage_ != null; } + } + /// Clears the value of the optional_foreign_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalForeignMessage() { + optionalForeignMessage_ = null; + } + + /// Field number for the "optional_nested_enum" field. + public const int OptionalNestedEnumFieldNumber = 21; + private readonly static global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum OptionalNestedEnumDefaultValue = global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum.Foo; + + private global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum optionalNestedEnum_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum OptionalNestedEnum { + get { if ((_hasBits0 & 8192) != 0) { return optionalNestedEnum_; } else { return OptionalNestedEnumDefaultValue; } } + set { + _hasBits0 |= 8192; + optionalNestedEnum_ = value; + } + } + /// Gets whether the "optional_nested_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalNestedEnum { + get { return (_hasBits0 & 8192) != 0; } + } + /// Clears the value of the "optional_nested_enum" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalNestedEnum() { + _hasBits0 &= ~8192; + } + + /// Field number for the "optional_foreign_enum" field. + public const int OptionalForeignEnumFieldNumber = 22; + private readonly static global::ProtobufTestMessages.Proto2.ForeignEnumProto2 OptionalForeignEnumDefaultValue = global::ProtobufTestMessages.Proto2.ForeignEnumProto2.ForeignFoo; + + private global::ProtobufTestMessages.Proto2.ForeignEnumProto2 optionalForeignEnum_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::ProtobufTestMessages.Proto2.ForeignEnumProto2 OptionalForeignEnum { + get { if ((_hasBits0 & 16384) != 0) { return optionalForeignEnum_; } else { return OptionalForeignEnumDefaultValue; } } + set { + _hasBits0 |= 16384; + optionalForeignEnum_ = value; + } + } + /// Gets whether the "optional_foreign_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalForeignEnum { + get { return (_hasBits0 & 16384) != 0; } + } + /// Clears the value of the "optional_foreign_enum" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalForeignEnum() { + _hasBits0 &= ~16384; + } + + /// Field number for the "optional_string_piece" field. + 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"); + } + } + /// Gets whether the "optional_string_piece" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalStringPiece { + get { return optionalStringPiece_ != null; } + } + /// Clears the value of the "optional_string_piece" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalStringPiece() { + optionalStringPiece_ = null; + } + + /// Field number for the "optional_cord" field. + 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"); + } + } + /// Gets whether the "optional_cord" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalCord { + get { return optionalCord_ != null; } + } + /// Clears the value of the "optional_cord" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalCord() { + optionalCord_ = null; + } + + /// Field number for the "recursive_message" field. + public const int RecursiveMessageFieldNumber = 27; + private global::ProtobufTestMessages.Proto2.TestAllTypesProto2 recursiveMessage_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::ProtobufTestMessages.Proto2.TestAllTypesProto2 RecursiveMessage { + get { return recursiveMessage_; } + set { + recursiveMessage_ = value; + } + } + /// Gets whether the recursive_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasRecursiveMessage { + get { return recursiveMessage_ != null; } + } + /// Clears the value of the recursive_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearRecursiveMessage() { + recursiveMessage_ = null; + } + + /// Field number for the "repeated_int32" field. + public const int RepeatedInt32FieldNumber = 31; + private static readonly pb::FieldCodec _repeated_repeatedInt32_codec + = pb::FieldCodec.ForInt32(248); + private readonly pbc::RepeatedField repeatedInt32_ = new pbc::RepeatedField(); + /// + /// Repeated + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedInt32 { + get { return repeatedInt32_; } + } + + /// Field number for the "repeated_int64" field. + public const int RepeatedInt64FieldNumber = 32; + private static readonly pb::FieldCodec _repeated_repeatedInt64_codec + = pb::FieldCodec.ForInt64(256); + private readonly pbc::RepeatedField repeatedInt64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedInt64 { + get { return repeatedInt64_; } + } + + /// Field number for the "repeated_uint32" field. + public const int RepeatedUint32FieldNumber = 33; + private static readonly pb::FieldCodec _repeated_repeatedUint32_codec + = pb::FieldCodec.ForUInt32(264); + private readonly pbc::RepeatedField repeatedUint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedUint32 { + get { return repeatedUint32_; } + } + + /// Field number for the "repeated_uint64" field. + public const int RepeatedUint64FieldNumber = 34; + private static readonly pb::FieldCodec _repeated_repeatedUint64_codec + = pb::FieldCodec.ForUInt64(272); + private readonly pbc::RepeatedField repeatedUint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedUint64 { + get { return repeatedUint64_; } + } + + /// Field number for the "repeated_sint32" field. + public const int RepeatedSint32FieldNumber = 35; + private static readonly pb::FieldCodec _repeated_repeatedSint32_codec + = pb::FieldCodec.ForSInt32(280); + private readonly pbc::RepeatedField repeatedSint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedSint32 { + get { return repeatedSint32_; } + } + + /// Field number for the "repeated_sint64" field. + public const int RepeatedSint64FieldNumber = 36; + private static readonly pb::FieldCodec _repeated_repeatedSint64_codec + = pb::FieldCodec.ForSInt64(288); + private readonly pbc::RepeatedField repeatedSint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedSint64 { + get { return repeatedSint64_; } + } + + /// Field number for the "repeated_fixed32" field. + public const int RepeatedFixed32FieldNumber = 37; + private static readonly pb::FieldCodec _repeated_repeatedFixed32_codec + = pb::FieldCodec.ForFixed32(301); + private readonly pbc::RepeatedField repeatedFixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedFixed32 { + get { return repeatedFixed32_; } + } + + /// Field number for the "repeated_fixed64" field. + public const int RepeatedFixed64FieldNumber = 38; + private static readonly pb::FieldCodec _repeated_repeatedFixed64_codec + = pb::FieldCodec.ForFixed64(305); + private readonly pbc::RepeatedField repeatedFixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedFixed64 { + get { return repeatedFixed64_; } + } + + /// Field number for the "repeated_sfixed32" field. + public const int RepeatedSfixed32FieldNumber = 39; + private static readonly pb::FieldCodec _repeated_repeatedSfixed32_codec + = pb::FieldCodec.ForSFixed32(317); + private readonly pbc::RepeatedField repeatedSfixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedSfixed32 { + get { return repeatedSfixed32_; } + } + + /// Field number for the "repeated_sfixed64" field. + public const int RepeatedSfixed64FieldNumber = 40; + private static readonly pb::FieldCodec _repeated_repeatedSfixed64_codec + = pb::FieldCodec.ForSFixed64(321); + private readonly pbc::RepeatedField repeatedSfixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedSfixed64 { + get { return repeatedSfixed64_; } + } + + /// Field number for the "repeated_float" field. + public const int RepeatedFloatFieldNumber = 41; + private static readonly pb::FieldCodec _repeated_repeatedFloat_codec + = pb::FieldCodec.ForFloat(333); + private readonly pbc::RepeatedField repeatedFloat_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedFloat { + get { return repeatedFloat_; } + } + + /// Field number for the "repeated_double" field. + public const int RepeatedDoubleFieldNumber = 42; + private static readonly pb::FieldCodec _repeated_repeatedDouble_codec + = pb::FieldCodec.ForDouble(337); + private readonly pbc::RepeatedField repeatedDouble_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedDouble { + get { return repeatedDouble_; } + } + + /// Field number for the "repeated_bool" field. + public const int RepeatedBoolFieldNumber = 43; + private static readonly pb::FieldCodec _repeated_repeatedBool_codec + = pb::FieldCodec.ForBool(344); + private readonly pbc::RepeatedField repeatedBool_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedBool { + get { return repeatedBool_; } + } + + /// Field number for the "repeated_string" field. + public const int RepeatedStringFieldNumber = 44; + private static readonly pb::FieldCodec _repeated_repeatedString_codec + = pb::FieldCodec.ForString(354); + private readonly pbc::RepeatedField repeatedString_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedString { + get { return repeatedString_; } + } + + /// Field number for the "repeated_bytes" field. + public const int RepeatedBytesFieldNumber = 45; + private static readonly pb::FieldCodec _repeated_repeatedBytes_codec + = pb::FieldCodec.ForBytes(362); + private readonly pbc::RepeatedField repeatedBytes_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedBytes { + get { return repeatedBytes_; } + } + + /// Field number for the "repeated_nested_message" field. + public const int RepeatedNestedMessageFieldNumber = 48; + private static readonly pb::FieldCodec _repeated_repeatedNestedMessage_codec + = pb::FieldCodec.ForMessage(386, global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage.Parser); + private readonly pbc::RepeatedField repeatedNestedMessage_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedNestedMessage { + get { return repeatedNestedMessage_; } + } + + /// Field number for the "repeated_foreign_message" field. + public const int RepeatedForeignMessageFieldNumber = 49; + private static readonly pb::FieldCodec _repeated_repeatedForeignMessage_codec + = pb::FieldCodec.ForMessage(394, global::ProtobufTestMessages.Proto2.ForeignMessageProto2.Parser); + private readonly pbc::RepeatedField repeatedForeignMessage_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedForeignMessage { + get { return repeatedForeignMessage_; } + } + + /// Field number for the "repeated_nested_enum" field. + public const int RepeatedNestedEnumFieldNumber = 51; + private static readonly pb::FieldCodec _repeated_repeatedNestedEnum_codec + = pb::FieldCodec.ForEnum(408, x => (int) x, x => (global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum) x); + private readonly pbc::RepeatedField repeatedNestedEnum_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedNestedEnum { + get { return repeatedNestedEnum_; } + } + + /// Field number for the "repeated_foreign_enum" field. + public const int RepeatedForeignEnumFieldNumber = 52; + private static readonly pb::FieldCodec _repeated_repeatedForeignEnum_codec + = pb::FieldCodec.ForEnum(416, x => (int) x, x => (global::ProtobufTestMessages.Proto2.ForeignEnumProto2) x); + private readonly pbc::RepeatedField repeatedForeignEnum_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedForeignEnum { + get { return repeatedForeignEnum_; } + } + + /// Field number for the "repeated_string_piece" field. + public const int RepeatedStringPieceFieldNumber = 54; + private static readonly pb::FieldCodec _repeated_repeatedStringPiece_codec + = pb::FieldCodec.ForString(434); + private readonly pbc::RepeatedField repeatedStringPiece_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedStringPiece { + get { return repeatedStringPiece_; } + } + + /// Field number for the "repeated_cord" field. + public const int RepeatedCordFieldNumber = 55; + private static readonly pb::FieldCodec _repeated_repeatedCord_codec + = pb::FieldCodec.ForString(442); + private readonly pbc::RepeatedField repeatedCord_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedCord { + get { return repeatedCord_; } + } + + /// Field number for the "map_int32_int32" field. + public const int MapInt32Int32FieldNumber = 56; + private static readonly pbc::MapField.Codec _map_mapInt32Int32_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForInt32(16, 0), 450); + private readonly pbc::MapField mapInt32Int32_ = new pbc::MapField(); + /// + /// Map + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapInt32Int32 { + get { return mapInt32Int32_; } + } + + /// Field number for the "map_int64_int64" field. + public const int MapInt64Int64FieldNumber = 57; + private static readonly pbc::MapField.Codec _map_mapInt64Int64_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForInt64(8, 0L), pb::FieldCodec.ForInt64(16, 0L), 458); + private readonly pbc::MapField mapInt64Int64_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapInt64Int64 { + get { return mapInt64Int64_; } + } + + /// Field number for the "map_uint32_uint32" field. + public const int MapUint32Uint32FieldNumber = 58; + private static readonly pbc::MapField.Codec _map_mapUint32Uint32_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForUInt32(16, 0), 466); + private readonly pbc::MapField mapUint32Uint32_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapUint32Uint32 { + get { return mapUint32Uint32_; } + } + + /// Field number for the "map_uint64_uint64" field. + public const int MapUint64Uint64FieldNumber = 59; + private static readonly pbc::MapField.Codec _map_mapUint64Uint64_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt64(8, 0UL), pb::FieldCodec.ForUInt64(16, 0UL), 474); + private readonly pbc::MapField mapUint64Uint64_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapUint64Uint64 { + get { return mapUint64Uint64_; } + } + + /// Field number for the "map_sint32_sint32" field. + public const int MapSint32Sint32FieldNumber = 60; + private static readonly pbc::MapField.Codec _map_mapSint32Sint32_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForSInt32(8, 0), pb::FieldCodec.ForSInt32(16, 0), 482); + private readonly pbc::MapField mapSint32Sint32_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapSint32Sint32 { + get { return mapSint32Sint32_; } + } + + /// Field number for the "map_sint64_sint64" field. + public const int MapSint64Sint64FieldNumber = 61; + private static readonly pbc::MapField.Codec _map_mapSint64Sint64_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForSInt64(8, 0L), pb::FieldCodec.ForSInt64(16, 0L), 490); + private readonly pbc::MapField mapSint64Sint64_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapSint64Sint64 { + get { return mapSint64Sint64_; } + } + + /// Field number for the "map_fixed32_fixed32" field. + public const int MapFixed32Fixed32FieldNumber = 62; + private static readonly pbc::MapField.Codec _map_mapFixed32Fixed32_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForFixed32(13, 0), pb::FieldCodec.ForFixed32(21, 0), 498); + private readonly pbc::MapField mapFixed32Fixed32_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapFixed32Fixed32 { + get { return mapFixed32Fixed32_; } + } + + /// Field number for the "map_fixed64_fixed64" field. + public const int MapFixed64Fixed64FieldNumber = 63; + private static readonly pbc::MapField.Codec _map_mapFixed64Fixed64_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForFixed64(9, 0UL), pb::FieldCodec.ForFixed64(17, 0UL), 506); + private readonly pbc::MapField mapFixed64Fixed64_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapFixed64Fixed64 { + get { return mapFixed64Fixed64_; } + } + + /// Field number for the "map_sfixed32_sfixed32" field. + public const int MapSfixed32Sfixed32FieldNumber = 64; + private static readonly pbc::MapField.Codec _map_mapSfixed32Sfixed32_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForSFixed32(13, 0), pb::FieldCodec.ForSFixed32(21, 0), 514); + private readonly pbc::MapField mapSfixed32Sfixed32_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapSfixed32Sfixed32 { + get { return mapSfixed32Sfixed32_; } + } + + /// Field number for the "map_sfixed64_sfixed64" field. + public const int MapSfixed64Sfixed64FieldNumber = 65; + private static readonly pbc::MapField.Codec _map_mapSfixed64Sfixed64_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForSFixed64(9, 0L), pb::FieldCodec.ForSFixed64(17, 0L), 522); + private readonly pbc::MapField mapSfixed64Sfixed64_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapSfixed64Sfixed64 { + get { return mapSfixed64Sfixed64_; } + } + + /// Field number for the "map_int32_float" field. + public const int MapInt32FloatFieldNumber = 66; + private static readonly pbc::MapField.Codec _map_mapInt32Float_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForFloat(21, 0F), 530); + private readonly pbc::MapField mapInt32Float_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapInt32Float { + get { return mapInt32Float_; } + } + + /// Field number for the "map_int32_double" field. + public const int MapInt32DoubleFieldNumber = 67; + private static readonly pbc::MapField.Codec _map_mapInt32Double_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForDouble(17, 0D), 538); + private readonly pbc::MapField mapInt32Double_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapInt32Double { + get { return mapInt32Double_; } + } + + /// Field number for the "map_bool_bool" field. + public const int MapBoolBoolFieldNumber = 68; + private static readonly pbc::MapField.Codec _map_mapBoolBool_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForBool(8, false), pb::FieldCodec.ForBool(16, false), 546); + private readonly pbc::MapField mapBoolBool_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapBoolBool { + get { return mapBoolBool_; } + } + + /// Field number for the "map_string_string" field. + public const int MapStringStringFieldNumber = 69; + private static readonly pbc::MapField.Codec _map_mapStringString_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 554); + private readonly pbc::MapField mapStringString_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapStringString { + get { return mapStringString_; } + } + + /// Field number for the "map_string_bytes" field. + public const int MapStringBytesFieldNumber = 70; + private static readonly pbc::MapField.Codec _map_mapStringBytes_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForBytes(18, pb::ByteString.Empty), 562); + private readonly pbc::MapField mapStringBytes_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapStringBytes { + get { return mapStringBytes_; } + } + + /// Field number for the "map_string_nested_message" field. + public const int MapStringNestedMessageFieldNumber = 71; + private static readonly pbc::MapField.Codec _map_mapStringNestedMessage_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage.Parser), 570); + private readonly pbc::MapField mapStringNestedMessage_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapStringNestedMessage { + get { return mapStringNestedMessage_; } + } + + /// Field number for the "map_string_foreign_message" field. + public const int MapStringForeignMessageFieldNumber = 72; + private static readonly pbc::MapField.Codec _map_mapStringForeignMessage_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::ProtobufTestMessages.Proto2.ForeignMessageProto2.Parser), 578); + private readonly pbc::MapField mapStringForeignMessage_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapStringForeignMessage { + get { return mapStringForeignMessage_; } + } + + /// Field number for the "map_string_nested_enum" field. + public const int MapStringNestedEnumFieldNumber = 73; + private static readonly pbc::MapField.Codec _map_mapStringNestedEnum_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum) x, global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum.Foo), 586); + private readonly pbc::MapField mapStringNestedEnum_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapStringNestedEnum { + get { return mapStringNestedEnum_; } + } + + /// Field number for the "map_string_foreign_enum" field. + public const int MapStringForeignEnumFieldNumber = 74; + private static readonly pbc::MapField.Codec _map_mapStringForeignEnum_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::ProtobufTestMessages.Proto2.ForeignEnumProto2) x, global::ProtobufTestMessages.Proto2.ForeignEnumProto2.ForeignFoo), 594); + private readonly pbc::MapField mapStringForeignEnum_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField MapStringForeignEnum { + get { return mapStringForeignEnum_; } + } + + /// Field number for the "oneof_uint32" field. + public const int OneofUint32FieldNumber = 111; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint OneofUint32 { + get { return HasOneofUint32 ? (uint) oneofField_ : 0; } + set { + oneofField_ = value; + oneofFieldCase_ = OneofFieldOneofCase.OneofUint32; + } + } + /// Gets whether the "oneof_uint32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofUint32 { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32; } + } + /// Clears the value of the oneof if it's currently set to "oneof_uint32" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofUint32() { + if (HasOneofUint32) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_nested_message" field. + public const int OneofNestedMessageFieldNumber = 112; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage OneofNestedMessage { + get { return HasOneofNestedMessage ? (global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage) oneofField_ : null; } + set { + oneofField_ = value; + oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage; + } + } + /// Gets whether the "oneof_nested_message" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofNestedMessage { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage; } + } + /// Clears the value of the oneof if it's currently set to "oneof_nested_message" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofNestedMessage() { + if (HasOneofNestedMessage) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_string" field. + 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; + } + } + /// Gets whether the "oneof_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofString { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString; } + } + /// Clears the value of the oneof if it's currently set to "oneof_string" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofString() { + if (HasOneofString) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_bytes" field. + 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; + } + } + /// Gets whether the "oneof_bytes" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofBytes { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes; } + } + /// Clears the value of the oneof if it's currently set to "oneof_bytes" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofBytes() { + if (HasOneofBytes) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_bool" field. + public const int OneofBoolFieldNumber = 115; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool OneofBool { + get { return HasOneofBool ? (bool) oneofField_ : false; } + set { + oneofField_ = value; + oneofFieldCase_ = OneofFieldOneofCase.OneofBool; + } + } + /// Gets whether the "oneof_bool" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofBool { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBool; } + } + /// Clears the value of the oneof if it's currently set to "oneof_bool" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofBool() { + if (HasOneofBool) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_uint64" field. + public const int OneofUint64FieldNumber = 116; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ulong OneofUint64 { + get { return HasOneofUint64 ? (ulong) oneofField_ : 0UL; } + set { + oneofField_ = value; + oneofFieldCase_ = OneofFieldOneofCase.OneofUint64; + } + } + /// Gets whether the "oneof_uint64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofUint64 { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint64; } + } + /// Clears the value of the oneof if it's currently set to "oneof_uint64" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofUint64() { + if (HasOneofUint64) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_float" field. + public const int OneofFloatFieldNumber = 117; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float OneofFloat { + get { return HasOneofFloat ? (float) oneofField_ : 0F; } + set { + oneofField_ = value; + oneofFieldCase_ = OneofFieldOneofCase.OneofFloat; + } + } + /// Gets whether the "oneof_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofFloat { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofFloat; } + } + /// Clears the value of the oneof if it's currently set to "oneof_float" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofFloat() { + if (HasOneofFloat) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_double" field. + public const int OneofDoubleFieldNumber = 118; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double OneofDouble { + get { return HasOneofDouble ? (double) oneofField_ : 0D; } + set { + oneofField_ = value; + oneofFieldCase_ = OneofFieldOneofCase.OneofDouble; + } + } + /// Gets whether the "oneof_double" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofDouble { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofDouble; } + } + /// Clears the value of the oneof if it's currently set to "oneof_double" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofDouble() { + if (HasOneofDouble) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_enum" field. + public const int OneofEnumFieldNumber = 119; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum OneofEnum { + get { return HasOneofEnum ? (global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum) oneofField_ : global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum.Foo; } + set { + oneofField_ = value; + oneofFieldCase_ = OneofFieldOneofCase.OneofEnum; + } + } + /// Gets whether the "oneof_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofEnum { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofEnum; } + } + /// Clears the value of the oneof if it's currently set to "oneof_enum" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofEnum() { + if (HasOneofEnum) { + ClearOneofField(); + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 201; + private global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.Data data_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.Data Data { + get { return data_; } + set { + data_ = value; + } + } + /// Gets whether the data field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasData { + get { return data_ != null; } + } + /// Clears the value of the data field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearData() { + data_ = null; + } + + /// Field number for the "fieldname1" field. + public const int Fieldname1FieldNumber = 401; + private readonly static int Fieldname1DefaultValue = 0; + + private int fieldname1_; + /// + /// Test field-name-to-JSON-name convention. + /// (protobuf says names can be any valid C/C++ identifier.) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Fieldname1 { + get { if ((_hasBits0 & 2097152) != 0) { return fieldname1_; } else { return Fieldname1DefaultValue; } } + set { + _hasBits0 |= 2097152; + fieldname1_ = value; + } + } + /// Gets whether the "fieldname1" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldname1 { + get { return (_hasBits0 & 2097152) != 0; } + } + /// Clears the value of the "fieldname1" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldname1() { + _hasBits0 &= ~2097152; + } + + /// Field number for the "field_name2" field. + public const int FieldName2FieldNumber = 402; + private readonly static int FieldName2DefaultValue = 0; + + private int fieldName2_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName2 { + get { if ((_hasBits0 & 4194304) != 0) { return fieldName2_; } else { return FieldName2DefaultValue; } } + set { + _hasBits0 |= 4194304; + fieldName2_ = value; + } + } + /// Gets whether the "field_name2" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName2 { + get { return (_hasBits0 & 4194304) != 0; } + } + /// Clears the value of the "field_name2" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName2() { + _hasBits0 &= ~4194304; + } + + /// Field number for the "_field_name3" field. + public const int FieldName3FieldNumber = 403; + private readonly static int FieldName3DefaultValue = 0; + + private int FieldName3_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName3 { + get { if ((_hasBits0 & 8388608) != 0) { return FieldName3_; } else { return FieldName3DefaultValue; } } + set { + _hasBits0 |= 8388608; + FieldName3_ = value; + } + } + /// Gets whether the "_field_name3" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName3 { + get { return (_hasBits0 & 8388608) != 0; } + } + /// Clears the value of the "_field_name3" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName3() { + _hasBits0 &= ~8388608; + } + + /// Field number for the "field__name4_" field. + public const int FieldName4FieldNumber = 404; + private readonly static int FieldName4DefaultValue = 0; + + private int fieldName4_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName4 { + get { if ((_hasBits0 & 16777216) != 0) { return fieldName4_; } else { return FieldName4DefaultValue; } } + set { + _hasBits0 |= 16777216; + fieldName4_ = value; + } + } + /// Gets whether the "field__name4_" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName4 { + get { return (_hasBits0 & 16777216) != 0; } + } + /// Clears the value of the "field__name4_" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName4() { + _hasBits0 &= ~16777216; + } + + /// Field number for the "field0name5" field. + public const int Field0Name5FieldNumber = 405; + private readonly static int Field0Name5DefaultValue = 0; + + private int field0Name5_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Field0Name5 { + get { if ((_hasBits0 & 33554432) != 0) { return field0Name5_; } else { return Field0Name5DefaultValue; } } + set { + _hasBits0 |= 33554432; + field0Name5_ = value; + } + } + /// Gets whether the "field0name5" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField0Name5 { + get { return (_hasBits0 & 33554432) != 0; } + } + /// Clears the value of the "field0name5" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearField0Name5() { + _hasBits0 &= ~33554432; + } + + /// Field number for the "field_0_name6" field. + public const int Field0Name6FieldNumber = 406; + private readonly static int Field0Name6DefaultValue = 0; + + private int field0Name6_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Field0Name6 { + get { if ((_hasBits0 & 67108864) != 0) { return field0Name6_; } else { return Field0Name6DefaultValue; } } + set { + _hasBits0 |= 67108864; + field0Name6_ = value; + } + } + /// Gets whether the "field_0_name6" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField0Name6 { + get { return (_hasBits0 & 67108864) != 0; } + } + /// Clears the value of the "field_0_name6" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearField0Name6() { + _hasBits0 &= ~67108864; + } + + /// Field number for the "fieldName7" field. + public const int FieldName7FieldNumber = 407; + private readonly static int FieldName7DefaultValue = 0; + + private int fieldName7_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName7 { + get { if ((_hasBits0 & 134217728) != 0) { return fieldName7_; } else { return FieldName7DefaultValue; } } + set { + _hasBits0 |= 134217728; + fieldName7_ = value; + } + } + /// Gets whether the "fieldName7" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName7 { + get { return (_hasBits0 & 134217728) != 0; } + } + /// Clears the value of the "fieldName7" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName7() { + _hasBits0 &= ~134217728; + } + + /// Field number for the "FieldName8" field. + public const int FieldName8FieldNumber = 408; + private readonly static int FieldName8DefaultValue = 0; + + private int fieldName8_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName8 { + get { if ((_hasBits0 & 268435456) != 0) { return fieldName8_; } else { return FieldName8DefaultValue; } } + set { + _hasBits0 |= 268435456; + fieldName8_ = value; + } + } + /// Gets whether the "FieldName8" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName8 { + get { return (_hasBits0 & 268435456) != 0; } + } + /// Clears the value of the "FieldName8" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName8() { + _hasBits0 &= ~268435456; + } + + /// Field number for the "field_Name9" field. + public const int FieldName9FieldNumber = 409; + private readonly static int FieldName9DefaultValue = 0; + + private int fieldName9_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName9 { + get { if ((_hasBits0 & 536870912) != 0) { return fieldName9_; } else { return FieldName9DefaultValue; } } + set { + _hasBits0 |= 536870912; + fieldName9_ = value; + } + } + /// Gets whether the "field_Name9" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName9 { + get { return (_hasBits0 & 536870912) != 0; } + } + /// Clears the value of the "field_Name9" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName9() { + _hasBits0 &= ~536870912; + } + + /// Field number for the "Field_Name10" field. + public const int FieldName10FieldNumber = 410; + private readonly static int FieldName10DefaultValue = 0; + + private int fieldName10_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName10 { + get { if ((_hasBits0 & 1073741824) != 0) { return fieldName10_; } else { return FieldName10DefaultValue; } } + set { + _hasBits0 |= 1073741824; + fieldName10_ = value; + } + } + /// Gets whether the "Field_Name10" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName10 { + get { return (_hasBits0 & 1073741824) != 0; } + } + /// Clears the value of the "Field_Name10" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName10() { + _hasBits0 &= ~1073741824; + } + + /// Field number for the "FIELD_NAME11" field. + public const int FIELDNAME11FieldNumber = 411; + private readonly static int FIELDNAME11DefaultValue = 0; + + private int fIELDNAME11_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FIELDNAME11 { + get { if ((_hasBits0 & -2147483648) != 0) { return fIELDNAME11_; } else { return FIELDNAME11DefaultValue; } } + set { + _hasBits0 |= -2147483648; + fIELDNAME11_ = value; + } + } + /// Gets whether the "FIELD_NAME11" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFIELDNAME11 { + get { return (_hasBits0 & -2147483648) != 0; } + } + /// Clears the value of the "FIELD_NAME11" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFIELDNAME11() { + _hasBits0 &= ~-2147483648; + } + + /// Field number for the "FIELD_name12" field. + public const int FIELDName12FieldNumber = 412; + private readonly static int FIELDName12DefaultValue = 0; + + private int fIELDName12_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FIELDName12 { + get { if ((_hasBits1 & 1) != 0) { return fIELDName12_; } else { return FIELDName12DefaultValue; } } + set { + _hasBits1 |= 1; + fIELDName12_ = value; + } + } + /// Gets whether the "FIELD_name12" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFIELDName12 { + get { return (_hasBits1 & 1) != 0; } + } + /// Clears the value of the "FIELD_name12" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFIELDName12() { + _hasBits1 &= ~1; + } + + /// Field number for the "__field_name13" field. + public const int FieldName13FieldNumber = 413; + private readonly static int FieldName13DefaultValue = 0; + + private int FieldName13_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName13 { + get { if ((_hasBits1 & 2) != 0) { return FieldName13_; } else { return FieldName13DefaultValue; } } + set { + _hasBits1 |= 2; + FieldName13_ = value; + } + } + /// Gets whether the "__field_name13" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName13 { + get { return (_hasBits1 & 2) != 0; } + } + /// Clears the value of the "__field_name13" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName13() { + _hasBits1 &= ~2; + } + + /// Field number for the "__Field_name14" field. + public const int FieldName14FieldNumber = 414; + private readonly static int FieldName14DefaultValue = 0; + + private int FieldName14_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName14 { + get { if ((_hasBits1 & 4) != 0) { return FieldName14_; } else { return FieldName14DefaultValue; } } + set { + _hasBits1 |= 4; + FieldName14_ = value; + } + } + /// Gets whether the "__Field_name14" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName14 { + get { return (_hasBits1 & 4) != 0; } + } + /// Clears the value of the "__Field_name14" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName14() { + _hasBits1 &= ~4; + } + + /// Field number for the "field__name15" field. + public const int FieldName15FieldNumber = 415; + private readonly static int FieldName15DefaultValue = 0; + + private int fieldName15_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName15 { + get { if ((_hasBits1 & 8) != 0) { return fieldName15_; } else { return FieldName15DefaultValue; } } + set { + _hasBits1 |= 8; + fieldName15_ = value; + } + } + /// Gets whether the "field__name15" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName15 { + get { return (_hasBits1 & 8) != 0; } + } + /// Clears the value of the "field__name15" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName15() { + _hasBits1 &= ~8; + } + + /// Field number for the "field__Name16" field. + public const int FieldName16FieldNumber = 416; + private readonly static int FieldName16DefaultValue = 0; + + private int fieldName16_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName16 { + get { if ((_hasBits1 & 16) != 0) { return fieldName16_; } else { return FieldName16DefaultValue; } } + set { + _hasBits1 |= 16; + fieldName16_ = value; + } + } + /// Gets whether the "field__Name16" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName16 { + get { return (_hasBits1 & 16) != 0; } + } + /// Clears the value of the "field__Name16" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName16() { + _hasBits1 &= ~16; + } + + /// Field number for the "field_name17__" field. + public const int FieldName17FieldNumber = 417; + private readonly static int FieldName17DefaultValue = 0; + + private int fieldName17_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName17 { + get { if ((_hasBits1 & 32) != 0) { return fieldName17_; } else { return FieldName17DefaultValue; } } + set { + _hasBits1 |= 32; + fieldName17_ = value; + } + } + /// Gets whether the "field_name17__" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName17 { + get { return (_hasBits1 & 32) != 0; } + } + /// Clears the value of the "field_name17__" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName17() { + _hasBits1 &= ~32; + } + + /// Field number for the "Field_name18__" field. + public const int FieldName18FieldNumber = 418; + private readonly static int FieldName18DefaultValue = 0; + + private int fieldName18_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FieldName18 { + get { if ((_hasBits1 & 64) != 0) { return fieldName18_; } else { return FieldName18DefaultValue; } } + set { + _hasBits1 |= 64; + fieldName18_ = value; + } + } + /// Gets whether the "Field_name18__" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName18 { + get { return (_hasBits1 & 64) != 0; } + } + /// Clears the value of the "Field_name18__" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName18() { + _hasBits1 &= ~64; + } + + private object oneofField_; + /// Enum of possible cases for the "oneof_field" oneof. + public enum OneofFieldOneofCase { + None = 0, + OneofUint32 = 111, + OneofNestedMessage = 112, + OneofString = 113, + OneofBytes = 114, + OneofBool = 115, + OneofUint64 = 116, + OneofFloat = 117, + OneofDouble = 118, + OneofEnum = 119, + } + 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 TestAllTypesProto2); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TestAllTypesProto2 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(OptionalNestedMessage, other.OptionalNestedMessage)) return false; + if (!object.Equals(OptionalForeignMessage, other.OptionalForeignMessage)) return false; + if (OptionalNestedEnum != other.OptionalNestedEnum) return false; + if (OptionalForeignEnum != other.OptionalForeignEnum) return false; + if (OptionalStringPiece != other.OptionalStringPiece) return false; + if (OptionalCord != other.OptionalCord) return false; + if (!object.Equals(RecursiveMessage, other.RecursiveMessage)) 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(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return false; + if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false; + if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false; + if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false; + if(!repeatedStringPiece_.Equals(other.repeatedStringPiece_)) return false; + if(!repeatedCord_.Equals(other.repeatedCord_)) return false; + if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false; + if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false; + if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false; + if (!MapUint64Uint64.Equals(other.MapUint64Uint64)) return false; + if (!MapSint32Sint32.Equals(other.MapSint32Sint32)) return false; + if (!MapSint64Sint64.Equals(other.MapSint64Sint64)) return false; + if (!MapFixed32Fixed32.Equals(other.MapFixed32Fixed32)) return false; + if (!MapFixed64Fixed64.Equals(other.MapFixed64Fixed64)) return false; + if (!MapSfixed32Sfixed32.Equals(other.MapSfixed32Sfixed32)) return false; + if (!MapSfixed64Sfixed64.Equals(other.MapSfixed64Sfixed64)) return false; + if (!MapInt32Float.Equals(other.MapInt32Float)) return false; + if (!MapInt32Double.Equals(other.MapInt32Double)) return false; + if (!MapBoolBool.Equals(other.MapBoolBool)) return false; + if (!MapStringString.Equals(other.MapStringString)) return false; + if (!MapStringBytes.Equals(other.MapStringBytes)) return false; + if (!MapStringNestedMessage.Equals(other.MapStringNestedMessage)) return false; + if (!MapStringForeignMessage.Equals(other.MapStringForeignMessage)) return false; + if (!MapStringNestedEnum.Equals(other.MapStringNestedEnum)) return false; + if (!MapStringForeignEnum.Equals(other.MapStringForeignEnum)) 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 (OneofBool != other.OneofBool) return false; + if (OneofUint64 != other.OneofUint64) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OneofFloat, other.OneofFloat)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(OneofDouble, other.OneofDouble)) return false; + if (OneofEnum != other.OneofEnum) return false; + if (!object.Equals(Data, other.Data)) return false; + 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 (Field0Name5 != other.Field0Name5) return false; + if (Field0Name6 != other.Field0Name6) return false; + if (FieldName7 != other.FieldName7) return false; + if (FieldName8 != other.FieldName8) return false; + if (FieldName9 != other.FieldName9) return false; + if (FieldName10 != other.FieldName10) return false; + if (FIELDNAME11 != other.FIELDNAME11) return false; + if (FIELDName12 != other.FIELDName12) return false; + if (FieldName13 != other.FieldName13) return false; + if (FieldName14 != other.FieldName14) return false; + if (FieldName15 != other.FieldName15) return false; + if (FieldName16 != other.FieldName16) return false; + if (FieldName17 != other.FieldName17) return false; + if (FieldName18 != other.FieldName18) 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 (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 (HasOptionalNestedMessage) hash ^= OptionalNestedMessage.GetHashCode(); + if (HasOptionalForeignMessage) hash ^= OptionalForeignMessage.GetHashCode(); + if (HasOptionalNestedEnum) hash ^= OptionalNestedEnum.GetHashCode(); + if (HasOptionalForeignEnum) hash ^= OptionalForeignEnum.GetHashCode(); + if (HasOptionalStringPiece) hash ^= OptionalStringPiece.GetHashCode(); + if (HasOptionalCord) hash ^= OptionalCord.GetHashCode(); + if (HasRecursiveMessage) hash ^= RecursiveMessage.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 ^= repeatedNestedMessage_.GetHashCode(); + hash ^= repeatedForeignMessage_.GetHashCode(); + hash ^= repeatedNestedEnum_.GetHashCode(); + hash ^= repeatedForeignEnum_.GetHashCode(); + hash ^= repeatedStringPiece_.GetHashCode(); + hash ^= repeatedCord_.GetHashCode(); + hash ^= MapInt32Int32.GetHashCode(); + hash ^= MapInt64Int64.GetHashCode(); + hash ^= MapUint32Uint32.GetHashCode(); + hash ^= MapUint64Uint64.GetHashCode(); + hash ^= MapSint32Sint32.GetHashCode(); + hash ^= MapSint64Sint64.GetHashCode(); + hash ^= MapFixed32Fixed32.GetHashCode(); + hash ^= MapFixed64Fixed64.GetHashCode(); + hash ^= MapSfixed32Sfixed32.GetHashCode(); + hash ^= MapSfixed64Sfixed64.GetHashCode(); + hash ^= MapInt32Float.GetHashCode(); + hash ^= MapInt32Double.GetHashCode(); + hash ^= MapBoolBool.GetHashCode(); + hash ^= MapStringString.GetHashCode(); + hash ^= MapStringBytes.GetHashCode(); + hash ^= MapStringNestedMessage.GetHashCode(); + hash ^= MapStringForeignMessage.GetHashCode(); + hash ^= MapStringNestedEnum.GetHashCode(); + hash ^= MapStringForeignEnum.GetHashCode(); + if (HasOneofUint32) hash ^= OneofUint32.GetHashCode(); + if (HasOneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode(); + if (HasOneofString) hash ^= OneofString.GetHashCode(); + if (HasOneofBytes) hash ^= OneofBytes.GetHashCode(); + if (HasOneofBool) hash ^= OneofBool.GetHashCode(); + if (HasOneofUint64) hash ^= OneofUint64.GetHashCode(); + if (HasOneofFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OneofFloat); + if (HasOneofDouble) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(OneofDouble); + if (HasOneofEnum) hash ^= OneofEnum.GetHashCode(); + if (HasData) hash ^= Data.GetHashCode(); + if (HasFieldname1) hash ^= Fieldname1.GetHashCode(); + if (HasFieldName2) hash ^= FieldName2.GetHashCode(); + if (HasFieldName3) hash ^= FieldName3.GetHashCode(); + if (HasFieldName4) hash ^= FieldName4.GetHashCode(); + if (HasField0Name5) hash ^= Field0Name5.GetHashCode(); + if (HasField0Name6) hash ^= Field0Name6.GetHashCode(); + if (HasFieldName7) hash ^= FieldName7.GetHashCode(); + if (HasFieldName8) hash ^= FieldName8.GetHashCode(); + if (HasFieldName9) hash ^= FieldName9.GetHashCode(); + if (HasFieldName10) hash ^= FieldName10.GetHashCode(); + if (HasFIELDNAME11) hash ^= FIELDNAME11.GetHashCode(); + if (HasFIELDName12) hash ^= FIELDName12.GetHashCode(); + if (HasFieldName13) hash ^= FieldName13.GetHashCode(); + if (HasFieldName14) hash ^= FieldName14.GetHashCode(); + if (HasFieldName15) hash ^= FieldName15.GetHashCode(); + if (HasFieldName16) hash ^= FieldName16.GetHashCode(); + if (HasFieldName17) hash ^= FieldName17.GetHashCode(); + if (HasFieldName18) hash ^= FieldName18.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(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 (HasOptionalNestedMessage) { + output.WriteRawTag(146, 1); + output.WriteMessage(OptionalNestedMessage); + } + if (HasOptionalForeignMessage) { + output.WriteRawTag(154, 1); + output.WriteMessage(OptionalForeignMessage); + } + if (HasOptionalNestedEnum) { + output.WriteRawTag(168, 1); + output.WriteEnum((int) OptionalNestedEnum); + } + if (HasOptionalForeignEnum) { + output.WriteRawTag(176, 1); + output.WriteEnum((int) OptionalForeignEnum); + } + if (HasOptionalStringPiece) { + output.WriteRawTag(194, 1); + output.WriteString(OptionalStringPiece); + } + if (HasOptionalCord) { + output.WriteRawTag(202, 1); + output.WriteString(OptionalCord); + } + if (HasRecursiveMessage) { + output.WriteRawTag(218, 1); + output.WriteMessage(RecursiveMessage); + } + 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); + repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_codec); + repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec); + repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec); + repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec); + repeatedStringPiece_.WriteTo(output, _repeated_repeatedStringPiece_codec); + repeatedCord_.WriteTo(output, _repeated_repeatedCord_codec); + mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec); + mapInt64Int64_.WriteTo(output, _map_mapInt64Int64_codec); + mapUint32Uint32_.WriteTo(output, _map_mapUint32Uint32_codec); + mapUint64Uint64_.WriteTo(output, _map_mapUint64Uint64_codec); + mapSint32Sint32_.WriteTo(output, _map_mapSint32Sint32_codec); + mapSint64Sint64_.WriteTo(output, _map_mapSint64Sint64_codec); + mapFixed32Fixed32_.WriteTo(output, _map_mapFixed32Fixed32_codec); + mapFixed64Fixed64_.WriteTo(output, _map_mapFixed64Fixed64_codec); + mapSfixed32Sfixed32_.WriteTo(output, _map_mapSfixed32Sfixed32_codec); + mapSfixed64Sfixed64_.WriteTo(output, _map_mapSfixed64Sfixed64_codec); + mapInt32Float_.WriteTo(output, _map_mapInt32Float_codec); + mapInt32Double_.WriteTo(output, _map_mapInt32Double_codec); + mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec); + mapStringString_.WriteTo(output, _map_mapStringString_codec); + mapStringBytes_.WriteTo(output, _map_mapStringBytes_codec); + mapStringNestedMessage_.WriteTo(output, _map_mapStringNestedMessage_codec); + mapStringForeignMessage_.WriteTo(output, _map_mapStringForeignMessage_codec); + mapStringNestedEnum_.WriteTo(output, _map_mapStringNestedEnum_codec); + mapStringForeignEnum_.WriteTo(output, _map_mapStringForeignEnum_codec); + 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 (HasOneofBool) { + output.WriteRawTag(152, 7); + output.WriteBool(OneofBool); + } + if (HasOneofUint64) { + output.WriteRawTag(160, 7); + output.WriteUInt64(OneofUint64); + } + if (HasOneofFloat) { + output.WriteRawTag(173, 7); + output.WriteFloat(OneofFloat); + } + if (HasOneofDouble) { + output.WriteRawTag(177, 7); + output.WriteDouble(OneofDouble); + } + if (HasOneofEnum) { + output.WriteRawTag(184, 7); + output.WriteEnum((int) OneofEnum); + } + if (HasData) { + output.WriteRawTag(203, 12); + output.WriteGroup(Data); + output.WriteRawTag(204, 12); + } + if (HasFieldname1) { + output.WriteRawTag(136, 25); + output.WriteInt32(Fieldname1); + } + if (HasFieldName2) { + output.WriteRawTag(144, 25); + output.WriteInt32(FieldName2); + } + if (HasFieldName3) { + output.WriteRawTag(152, 25); + output.WriteInt32(FieldName3); + } + if (HasFieldName4) { + output.WriteRawTag(160, 25); + output.WriteInt32(FieldName4); + } + if (HasField0Name5) { + output.WriteRawTag(168, 25); + output.WriteInt32(Field0Name5); + } + if (HasField0Name6) { + output.WriteRawTag(176, 25); + output.WriteInt32(Field0Name6); + } + if (HasFieldName7) { + output.WriteRawTag(184, 25); + output.WriteInt32(FieldName7); + } + if (HasFieldName8) { + output.WriteRawTag(192, 25); + output.WriteInt32(FieldName8); + } + if (HasFieldName9) { + output.WriteRawTag(200, 25); + output.WriteInt32(FieldName9); + } + if (HasFieldName10) { + output.WriteRawTag(208, 25); + output.WriteInt32(FieldName10); + } + if (HasFIELDNAME11) { + output.WriteRawTag(216, 25); + output.WriteInt32(FIELDNAME11); + } + if (HasFIELDName12) { + output.WriteRawTag(224, 25); + output.WriteInt32(FIELDName12); + } + if (HasFieldName13) { + output.WriteRawTag(232, 25); + output.WriteInt32(FieldName13); + } + if (HasFieldName14) { + output.WriteRawTag(240, 25); + output.WriteInt32(FieldName14); + } + if (HasFieldName15) { + output.WriteRawTag(248, 25); + output.WriteInt32(FieldName15); + } + if (HasFieldName16) { + output.WriteRawTag(128, 26); + output.WriteInt32(FieldName16); + } + if (HasFieldName17) { + output.WriteRawTag(136, 26); + output.WriteInt32(FieldName17); + } + if (HasFieldName18) { + output.WriteRawTag(144, 26); + output.WriteInt32(FieldName18); + } + 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 += 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 (HasOptionalNestedMessage) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage); + } + if (HasOptionalForeignMessage) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalForeignMessage); + } + if (HasOptionalNestedEnum) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalNestedEnum); + } + if (HasOptionalForeignEnum) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalForeignEnum); + } + if (HasOptionalStringPiece) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalStringPiece); + } + if (HasOptionalCord) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalCord); + } + if (HasRecursiveMessage) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(RecursiveMessage); + } + 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 += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessage_codec); + size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec); + size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_codec); + size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec); + size += repeatedStringPiece_.CalculateSize(_repeated_repeatedStringPiece_codec); + size += repeatedCord_.CalculateSize(_repeated_repeatedCord_codec); + size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec); + size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec); + size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec); + size += mapUint64Uint64_.CalculateSize(_map_mapUint64Uint64_codec); + size += mapSint32Sint32_.CalculateSize(_map_mapSint32Sint32_codec); + size += mapSint64Sint64_.CalculateSize(_map_mapSint64Sint64_codec); + size += mapFixed32Fixed32_.CalculateSize(_map_mapFixed32Fixed32_codec); + size += mapFixed64Fixed64_.CalculateSize(_map_mapFixed64Fixed64_codec); + size += mapSfixed32Sfixed32_.CalculateSize(_map_mapSfixed32Sfixed32_codec); + size += mapSfixed64Sfixed64_.CalculateSize(_map_mapSfixed64Sfixed64_codec); + size += mapInt32Float_.CalculateSize(_map_mapInt32Float_codec); + size += mapInt32Double_.CalculateSize(_map_mapInt32Double_codec); + size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec); + size += mapStringString_.CalculateSize(_map_mapStringString_codec); + size += mapStringBytes_.CalculateSize(_map_mapStringBytes_codec); + size += mapStringNestedMessage_.CalculateSize(_map_mapStringNestedMessage_codec); + size += mapStringForeignMessage_.CalculateSize(_map_mapStringForeignMessage_codec); + size += mapStringNestedEnum_.CalculateSize(_map_mapStringNestedEnum_codec); + size += mapStringForeignEnum_.CalculateSize(_map_mapStringForeignEnum_codec); + 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 (HasOneofBool) { + size += 2 + 1; + } + if (HasOneofUint64) { + size += 2 + pb::CodedOutputStream.ComputeUInt64Size(OneofUint64); + } + if (HasOneofFloat) { + size += 2 + 4; + } + if (HasOneofDouble) { + size += 2 + 8; + } + if (HasOneofEnum) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OneofEnum); + } + if (HasData) { + size += 4 + pb::CodedOutputStream.ComputeGroupSize(Data); + } + if (HasFieldname1) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(Fieldname1); + } + if (HasFieldName2) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName2); + } + if (HasFieldName3) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName3); + } + if (HasFieldName4) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName4); + } + if (HasField0Name5) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(Field0Name5); + } + if (HasField0Name6) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(Field0Name6); + } + if (HasFieldName7) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName7); + } + if (HasFieldName8) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName8); + } + if (HasFieldName9) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName9); + } + if (HasFieldName10) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName10); + } + if (HasFIELDNAME11) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FIELDNAME11); + } + if (HasFIELDName12) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FIELDName12); + } + if (HasFieldName13) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName13); + } + if (HasFieldName14) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName14); + } + if (HasFieldName15) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName15); + } + if (HasFieldName16) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName16); + } + if (HasFieldName17) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName17); + } + if (HasFieldName18) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(FieldName18); + } + if (_extensions != null) { + size += _extensions.CalculateSize(); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TestAllTypesProto2 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.HasOptionalNestedMessage) { + if (!HasOptionalNestedMessage) { + OptionalNestedMessage = new global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage(); + } + OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage); + } + if (other.HasOptionalForeignMessage) { + if (!HasOptionalForeignMessage) { + OptionalForeignMessage = new global::ProtobufTestMessages.Proto2.ForeignMessageProto2(); + } + OptionalForeignMessage.MergeFrom(other.OptionalForeignMessage); + } + if (other.HasOptionalNestedEnum) { + OptionalNestedEnum = other.OptionalNestedEnum; + } + if (other.HasOptionalForeignEnum) { + OptionalForeignEnum = other.OptionalForeignEnum; + } + if (other.HasOptionalStringPiece) { + OptionalStringPiece = other.OptionalStringPiece; + } + if (other.HasOptionalCord) { + OptionalCord = other.OptionalCord; + } + if (other.HasRecursiveMessage) { + if (!HasRecursiveMessage) { + RecursiveMessage = new global::ProtobufTestMessages.Proto2.TestAllTypesProto2(); + } + RecursiveMessage.MergeFrom(other.RecursiveMessage); + } + 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_); + repeatedNestedMessage_.Add(other.repeatedNestedMessage_); + repeatedForeignMessage_.Add(other.repeatedForeignMessage_); + repeatedNestedEnum_.Add(other.repeatedNestedEnum_); + repeatedForeignEnum_.Add(other.repeatedForeignEnum_); + repeatedStringPiece_.Add(other.repeatedStringPiece_); + repeatedCord_.Add(other.repeatedCord_); + mapInt32Int32_.Add(other.mapInt32Int32_); + mapInt64Int64_.Add(other.mapInt64Int64_); + mapUint32Uint32_.Add(other.mapUint32Uint32_); + mapUint64Uint64_.Add(other.mapUint64Uint64_); + mapSint32Sint32_.Add(other.mapSint32Sint32_); + mapSint64Sint64_.Add(other.mapSint64Sint64_); + mapFixed32Fixed32_.Add(other.mapFixed32Fixed32_); + mapFixed64Fixed64_.Add(other.mapFixed64Fixed64_); + mapSfixed32Sfixed32_.Add(other.mapSfixed32Sfixed32_); + mapSfixed64Sfixed64_.Add(other.mapSfixed64Sfixed64_); + mapInt32Float_.Add(other.mapInt32Float_); + mapInt32Double_.Add(other.mapInt32Double_); + mapBoolBool_.Add(other.mapBoolBool_); + mapStringString_.Add(other.mapStringString_); + mapStringBytes_.Add(other.mapStringBytes_); + mapStringNestedMessage_.Add(other.mapStringNestedMessage_); + mapStringForeignMessage_.Add(other.mapStringForeignMessage_); + mapStringNestedEnum_.Add(other.mapStringNestedEnum_); + mapStringForeignEnum_.Add(other.mapStringForeignEnum_); + if (other.HasData) { + if (!HasData) { + Data = new global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.Data(); + } + Data.MergeFrom(other.Data); + } + 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.HasField0Name5) { + Field0Name5 = other.Field0Name5; + } + if (other.HasField0Name6) { + Field0Name6 = other.Field0Name6; + } + if (other.HasFieldName7) { + FieldName7 = other.FieldName7; + } + if (other.HasFieldName8) { + FieldName8 = other.FieldName8; + } + if (other.HasFieldName9) { + FieldName9 = other.FieldName9; + } + if (other.HasFieldName10) { + FieldName10 = other.FieldName10; + } + if (other.HasFIELDNAME11) { + FIELDNAME11 = other.FIELDNAME11; + } + if (other.HasFIELDName12) { + FIELDName12 = other.FIELDName12; + } + if (other.HasFieldName13) { + FieldName13 = other.FieldName13; + } + if (other.HasFieldName14) { + FieldName14 = other.FieldName14; + } + if (other.HasFieldName15) { + FieldName15 = other.FieldName15; + } + if (other.HasFieldName16) { + FieldName16 = other.FieldName16; + } + if (other.HasFieldName17) { + FieldName17 = other.FieldName17; + } + if (other.HasFieldName18) { + FieldName18 = other.FieldName18; + } + switch (other.OneofFieldCase) { + case OneofFieldOneofCase.OneofUint32: + OneofUint32 = other.OneofUint32; + break; + case OneofFieldOneofCase.OneofNestedMessage: + if (OneofNestedMessage == null) { + OneofNestedMessage = new global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage(); + } + OneofNestedMessage.MergeFrom(other.OneofNestedMessage); + break; + case OneofFieldOneofCase.OneofString: + OneofString = other.OneofString; + break; + case OneofFieldOneofCase.OneofBytes: + OneofBytes = other.OneofBytes; + break; + case OneofFieldOneofCase.OneofBool: + OneofBool = other.OneofBool; + break; + case OneofFieldOneofCase.OneofUint64: + OneofUint64 = other.OneofUint64; + break; + case OneofFieldOneofCase.OneofFloat: + OneofFloat = other.OneofFloat; + break; + case OneofFieldOneofCase.OneofDouble: + OneofDouble = other.OneofDouble; + break; + case OneofFieldOneofCase.OneofEnum: + OneofEnum = other.OneofEnum; + 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 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 146: { + if (!HasOptionalNestedMessage) { + OptionalNestedMessage = new global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage(); + } + input.ReadMessage(OptionalNestedMessage); + break; + } + case 154: { + if (!HasOptionalForeignMessage) { + OptionalForeignMessage = new global::ProtobufTestMessages.Proto2.ForeignMessageProto2(); + } + input.ReadMessage(OptionalForeignMessage); + break; + } + case 168: { + OptionalNestedEnum = (global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum) input.ReadEnum(); + break; + } + case 176: { + OptionalForeignEnum = (global::ProtobufTestMessages.Proto2.ForeignEnumProto2) input.ReadEnum(); + break; + } + case 194: { + OptionalStringPiece = input.ReadString(); + break; + } + case 202: { + OptionalCord = input.ReadString(); + break; + } + case 218: { + if (!HasRecursiveMessage) { + RecursiveMessage = new global::ProtobufTestMessages.Proto2.TestAllTypesProto2(); + } + input.ReadMessage(RecursiveMessage); + 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 386: { + repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNestedMessage_codec); + break; + } + case 394: { + repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_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 434: { + repeatedStringPiece_.AddEntriesFrom(input, _repeated_repeatedStringPiece_codec); + break; + } + case 442: { + repeatedCord_.AddEntriesFrom(input, _repeated_repeatedCord_codec); + break; + } + case 450: { + mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec); + break; + } + case 458: { + mapInt64Int64_.AddEntriesFrom(input, _map_mapInt64Int64_codec); + break; + } + case 466: { + mapUint32Uint32_.AddEntriesFrom(input, _map_mapUint32Uint32_codec); + break; + } + case 474: { + mapUint64Uint64_.AddEntriesFrom(input, _map_mapUint64Uint64_codec); + break; + } + case 482: { + mapSint32Sint32_.AddEntriesFrom(input, _map_mapSint32Sint32_codec); + break; + } + case 490: { + mapSint64Sint64_.AddEntriesFrom(input, _map_mapSint64Sint64_codec); + break; + } + case 498: { + mapFixed32Fixed32_.AddEntriesFrom(input, _map_mapFixed32Fixed32_codec); + break; + } + case 506: { + mapFixed64Fixed64_.AddEntriesFrom(input, _map_mapFixed64Fixed64_codec); + break; + } + case 514: { + mapSfixed32Sfixed32_.AddEntriesFrom(input, _map_mapSfixed32Sfixed32_codec); + break; + } + case 522: { + mapSfixed64Sfixed64_.AddEntriesFrom(input, _map_mapSfixed64Sfixed64_codec); + break; + } + case 530: { + mapInt32Float_.AddEntriesFrom(input, _map_mapInt32Float_codec); + break; + } + case 538: { + mapInt32Double_.AddEntriesFrom(input, _map_mapInt32Double_codec); + break; + } + case 546: { + mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec); + break; + } + case 554: { + mapStringString_.AddEntriesFrom(input, _map_mapStringString_codec); + break; + } + case 562: { + mapStringBytes_.AddEntriesFrom(input, _map_mapStringBytes_codec); + break; + } + case 570: { + mapStringNestedMessage_.AddEntriesFrom(input, _map_mapStringNestedMessage_codec); + break; + } + case 578: { + mapStringForeignMessage_.AddEntriesFrom(input, _map_mapStringForeignMessage_codec); + break; + } + case 586: { + mapStringNestedEnum_.AddEntriesFrom(input, _map_mapStringNestedEnum_codec); + break; + } + case 594: { + mapStringForeignEnum_.AddEntriesFrom(input, _map_mapStringForeignEnum_codec); + break; + } + case 888: { + OneofUint32 = input.ReadUInt32(); + break; + } + case 898: { + global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage subBuilder = new global::ProtobufTestMessages.Proto2.TestAllTypesProto2.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; + } + case 920: { + OneofBool = input.ReadBool(); + break; + } + case 928: { + OneofUint64 = input.ReadUInt64(); + break; + } + case 941: { + OneofFloat = input.ReadFloat(); + break; + } + case 945: { + OneofDouble = input.ReadDouble(); + break; + } + case 952: { + oneofField_ = input.ReadEnum(); + oneofFieldCase_ = OneofFieldOneofCase.OneofEnum; + break; + } + case 1611: { + if (!HasData) { + Data = new global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.Data(); + } + input.ReadGroup(Data); + break; + } + case 3208: { + Fieldname1 = input.ReadInt32(); + break; + } + case 3216: { + FieldName2 = input.ReadInt32(); + break; + } + case 3224: { + FieldName3 = input.ReadInt32(); + break; + } + case 3232: { + FieldName4 = input.ReadInt32(); + break; + } + case 3240: { + Field0Name5 = input.ReadInt32(); + break; + } + case 3248: { + Field0Name6 = input.ReadInt32(); + break; + } + case 3256: { + FieldName7 = input.ReadInt32(); + break; + } + case 3264: { + FieldName8 = input.ReadInt32(); + break; + } + case 3272: { + FieldName9 = input.ReadInt32(); + break; + } + case 3280: { + FieldName10 = input.ReadInt32(); + break; + } + case 3288: { + FIELDNAME11 = input.ReadInt32(); + break; + } + case 3296: { + FIELDName12 = input.ReadInt32(); + break; + } + case 3304: { + FieldName13 = input.ReadInt32(); + break; + } + case 3312: { + FieldName14 = input.ReadInt32(); + break; + } + case 3320: { + FieldName15 = input.ReadInt32(); + break; + } + case 3328: { + FieldName16 = input.ReadInt32(); + break; + } + case 3336: { + FieldName17 = input.ReadInt32(); + break; + } + case 3344: { + FieldName18 = input.ReadInt32(); + break; + } + } + } + } + + public void RegisterExtension(pb::Extension extension) { + pb::ExtensionSet.Register(ref _extensions, extension); + } + public TValue GetExtension(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + #region Nested types + /// Container for nested types declared in the TestAllTypesProto2 message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public enum NestedEnum { + [pbr::OriginalName("FOO")] Foo = 0, + [pbr::OriginalName("BAR")] Bar = 1, + [pbr::OriginalName("BAZ")] Baz = 2, + /// + /// Intentionally negative. + /// + [pbr::OriginalName("NEG")] Neg = -1, + } + + public sealed partial class NestedMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NestedMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::ProtobufTestMessages.Proto2.TestAllTypesProto2.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; + a_ = other.a_; + corecursive_ = other.HasCorecursive ? other.corecursive_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NestedMessage Clone() { + return new NestedMessage(this); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearA() { + _hasBits0 &= ~1; + } + + /// Field number for the "corecursive" field. + public const int CorecursiveFieldNumber = 2; + private global::ProtobufTestMessages.Proto2.TestAllTypesProto2 corecursive_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::ProtobufTestMessages.Proto2.TestAllTypesProto2 Corecursive { + get { return corecursive_; } + set { + corecursive_ = value; + } + } + /// Gets whether the corecursive field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasCorecursive { + get { return corecursive_ != null; } + } + /// Clears the value of the corecursive field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearCorecursive() { + corecursive_ = null; + } + + [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 (A != other.A) return false; + if (!object.Equals(Corecursive, other.Corecursive)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (HasA) hash ^= A.GetHashCode(); + if (HasCorecursive) hash ^= Corecursive.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 (HasCorecursive) { + output.WriteRawTag(18); + output.WriteMessage(Corecursive); + } + 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 (HasCorecursive) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Corecursive); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(NestedMessage other) { + if (other == null) { + return; + } + if (other.HasA) { + A = other.A; + } + if (other.HasCorecursive) { + if (!HasCorecursive) { + Corecursive = new global::ProtobufTestMessages.Proto2.TestAllTypesProto2(); + } + Corecursive.MergeFrom(other.Corecursive); + } + _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 18: { + if (!HasCorecursive) { + Corecursive = new global::ProtobufTestMessages.Proto2.TestAllTypesProto2(); + } + input.ReadMessage(Corecursive); + break; + } + } + } + } + + } + + /// + /// groups + /// + public sealed partial class Data : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Data()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Descriptor.NestedTypes[20]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Data() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Data(Data other) : this() { + _hasBits0 = other._hasBits0; + groupInt32_ = other.groupInt32_; + groupUint32_ = other.groupUint32_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Data Clone() { + return new Data(this); + } + + /// Field number for the "group_int32" field. + public const int GroupInt32FieldNumber = 202; + private readonly static int GroupInt32DefaultValue = 0; + + private int groupInt32_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int GroupInt32 { + get { if ((_hasBits0 & 1) != 0) { return groupInt32_; } else { return GroupInt32DefaultValue; } } + set { + _hasBits0 |= 1; + groupInt32_ = value; + } + } + /// Gets whether the "group_int32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasGroupInt32 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "group_int32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearGroupInt32() { + _hasBits0 &= ~1; + } + + /// Field number for the "group_uint32" field. + public const int GroupUint32FieldNumber = 203; + private readonly static uint GroupUint32DefaultValue = 0; + + private uint groupUint32_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint GroupUint32 { + get { if ((_hasBits0 & 2) != 0) { return groupUint32_; } else { return GroupUint32DefaultValue; } } + set { + _hasBits0 |= 2; + groupUint32_ = value; + } + } + /// Gets whether the "group_uint32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasGroupUint32 { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "group_uint32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearGroupUint32() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Data); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Data other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (GroupInt32 != other.GroupInt32) return false; + if (GroupUint32 != other.GroupUint32) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (HasGroupInt32) hash ^= GroupInt32.GetHashCode(); + if (HasGroupUint32) hash ^= GroupUint32.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 (HasGroupInt32) { + output.WriteRawTag(208, 12); + output.WriteInt32(GroupInt32); + } + if (HasGroupUint32) { + output.WriteRawTag(216, 12); + output.WriteUInt32(GroupUint32); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (HasGroupInt32) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(GroupInt32); + } + if (HasGroupUint32) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(GroupUint32); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Data other) { + if (other == null) { + return; + } + if (other.HasGroupInt32) { + GroupInt32 = other.GroupInt32; + } + if (other.HasGroupUint32) { + GroupUint32 = other.GroupUint32; + } + _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 1616: { + GroupInt32 = input.ReadInt32(); + break; + } + case 1624: { + GroupUint32 = input.ReadUInt32(); + break; + } + } + } + } + + } + + /// + /// message_set test case. + /// + public sealed partial class MessageSetCorrect : pb::IExtensionMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MessageSetCorrect()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Descriptor.NestedTypes[21]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageSetCorrect() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageSetCorrect(MessageSetCorrect other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + _extensions = pb::ExtensionSet.Clone(other._extensions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageSetCorrect Clone() { + return new MessageSetCorrect(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MessageSetCorrect); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MessageSetCorrect 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(MessageSetCorrect 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(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + public sealed partial class MessageSetCorrectExtension1 : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MessageSetCorrectExtension1()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Descriptor.NestedTypes[22]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageSetCorrectExtension1() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageSetCorrectExtension1(MessageSetCorrectExtension1 other) : this() { + str_ = other.str_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageSetCorrectExtension1 Clone() { + return new MessageSetCorrectExtension1(this); + } + + /// Field number for the "str" field. + public const int StrFieldNumber = 25; + private readonly static string StrDefaultValue = ""; + + private string str_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Str { + get { return str_ ?? StrDefaultValue; } + set { + str_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "str" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasStr { + get { return str_ != null; } + } + /// Clears the value of the "str" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearStr() { + str_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MessageSetCorrectExtension1); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MessageSetCorrectExtension1 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Str != other.Str) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (HasStr) hash ^= Str.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 (HasStr) { + output.WriteRawTag(202, 1); + output.WriteString(Str); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (HasStr) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Str); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MessageSetCorrectExtension1 other) { + if (other == null) { + return; + } + if (other.HasStr) { + Str = other.Str; + } + _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 202: { + Str = input.ReadString(); + break; + } + } + } + } + + #region Extensions + /// Container for extensions for other messages declared in the MessageSetCorrectExtension1 message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Extensions { + public static readonly pb::Extension MessageSetExtension = + new pb::Extension(1547769, pb::FieldCodec.ForMessage(12382154, global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension1.Parser)); + } + #endregion + + } + + public sealed partial class MessageSetCorrectExtension2 : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MessageSetCorrectExtension2()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Descriptor.NestedTypes[23]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageSetCorrectExtension2() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageSetCorrectExtension2(MessageSetCorrectExtension2 other) : this() { + _hasBits0 = other._hasBits0; + i_ = other.i_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MessageSetCorrectExtension2 Clone() { + return new MessageSetCorrectExtension2(this); + } + + /// Field number for the "i" field. + public const int IFieldNumber = 9; + 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; + } + } + /// Gets whether the "i" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasI { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "i" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearI() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MessageSetCorrectExtension2); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MessageSetCorrectExtension2 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(72); + 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(MessageSetCorrectExtension2 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) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 72: { + I = input.ReadInt32(); + break; + } + } + } + } + + #region Extensions + /// Container for extensions for other messages declared in the MessageSetCorrectExtension2 message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Extensions { + public static readonly pb::Extension MessageSetExtension = + new pb::Extension(4135312, pb::FieldCodec.ForMessage(33082498, global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension2.Parser)); + } + #endregion + + } + + } + #endregion + + } + + public sealed partial class ForeignMessageProto2 : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ForeignMessageProto2()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::ProtobufTestMessages.Proto2.TestMessagesProto2Reflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ForeignMessageProto2() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ForeignMessageProto2(ForeignMessageProto2 other) : this() { + _hasBits0 = other._hasBits0; + c_ = other.c_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ForeignMessageProto2 Clone() { + return new ForeignMessageProto2(this); + } + + /// Field number for the "c" field. + 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; + } + } + /// Gets whether the "c" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasC { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "c" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearC() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ForeignMessageProto2); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ForeignMessageProto2 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (C != other.C) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + 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 (HasC) { + output.WriteRawTag(8); + output.WriteInt32(C); + } + 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 (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ForeignMessageProto2 other) { + if (other == null) { + return; + } + 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: { + C = input.ReadInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs index 6b19b5cce362..cb5edf75472d 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs @@ -165,7 +165,7 @@ public static partial class UnittestCustomOptionsProto3Reflection { } /// Holder for extension identifiers generated from the top level of unittest_custom_options_proto3.proto - internal static partial class UnittestCustomOptionsProto3Extensions { + public static partial class UnittestCustomOptionsProto3Extensions { public static readonly pb::Extension FileOpt1 = new pb::Extension(7736974, pb::FieldCodec.ForUInt64(61895792, 0UL)); public static readonly pb::Extension MessageOpt1 = @@ -2138,7 +2138,7 @@ public sealed partial class ComplexOptionType4 : pb::IMessageContainer for extensions for other messages declared in the ComplexOptionType4 message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - internal static partial class Extensions { + public static partial class Extensions { public static readonly pb::Extension ComplexOpt4 = new pb::Extension(7633546, pb::FieldCodec.ForMessage(61068370, global::UnitTest.Issues.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.Parser)); } diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc index 6ebd89f02fe2..0ddc38e0a1ff 100644 --- a/src/google/protobuf/compiler/csharp/csharp_message.cc +++ b/src/google/protobuf/compiler/csharp/csharp_message.cc @@ -320,7 +320,7 @@ void MessageGenerator::Generate(io::Printer* printer) { "#region Extensions\n" "/// Container for extensions for other messages declared in the $class_name$ message type.\n"); WriteGeneratedCodeAttributes(printer); - printer->Print("internal static partial class Extensions {\n"); + printer->Print("public static partial class Extensions {\n"); printer->Indent(); for (int i = 0; i < descriptor_->extension_count(); i++) { std::unique_ptr generator( diff --git a/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc b/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc index ec816a7584f6..08b856a11059 100644 --- a/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc +++ b/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc @@ -74,7 +74,7 @@ void ReflectionClassGenerator::Generate(io::Printer* printer) { if (file_->extension_count() > 0) { printer->Print( "/// Holder for extension identifiers generated from the top level of $file_name$\n" - "internal static partial class $class_name$ {\n", + "$access_level$ static partial class $class_name$ {\n", "access_level", class_access_level(), "class_name", extensionClassname_, "file_name", file_->name()); From 43619bb6b23a4a8a889b21de96a12bbcecbb5ac4 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Wed, 20 Mar 2019 23:38:53 -0500 Subject: [PATCH 05/34] Uncomment option code in OneofDescriptor --- csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs index 9f3d805d05bd..2ff8133c3fe2 100644 --- a/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs @@ -105,17 +105,16 @@ public MessageDescriptor ContainingType /// /// The (possibly empty) set of custom options for this oneof. /// - //[Obsolete("CustomOptions are obsolete. Use GetOption")] + [Obsolete("CustomOptions are obsolete. Use GetOption")] public CustomOptions CustomOptions => new CustomOptions(proto.Options._extensions?.ValuesByNumber); - /* // uncomment this in the full proto2 support PR /// /// Gets a single value enum option for this descriptor /// public T GetOption(Extension extension) { var value = proto.Options.GetExtension(extension); - return value is IDeepCloneable clonable ? clonable.Clone() : value; + return value is IDeepCloneable ? (value as IDeepCloneable).Clone() : value; } /// @@ -125,7 +124,6 @@ public RepeatedField GetOption(RepeatedExtension extensio { return proto.Options.GetExtension(extension).Clone(); } - */ internal void CrossLink() { From 6e7c43fc682c4d440395c4d906eb8d51be973e58 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Wed, 20 Mar 2019 23:39:38 -0500 Subject: [PATCH 06/34] Add checks to make sure values retrieved from CustomOptions match extension values --- .../Reflection/CustomOptionsTest.cs | 162 ++++++++---------- 1 file changed, 68 insertions(+), 94 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs index 7aa2077778b0..f5c21c630611 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs @@ -33,66 +33,19 @@ using Google.Protobuf.Reflection; using Google.Protobuf.WellKnownTypes; using NUnit.Framework; +using System; using System.IO; using System.Linq; using UnitTest.Issues.TestProtos; using static Google.Protobuf.WireFormat; using static UnitTest.Issues.TestProtos.ComplexOptionType2.Types; +using static UnitTest.Issues.TestProtos.UnittestCustomOptionsProto3Extensions; using static UnitTest.Issues.TestProtos.DummyMessageContainingEnum.Types; -using static Google.Protobuf.Test.Reflection.CustomOptionNumber; #pragma warning disable CS0618 namespace Google.Protobuf.Test.Reflection { - // Internal enum to allow us to use "using static" for convenience. - // These are the options defined in unittest_custom_options_proto3.proto - internal enum CustomOptionNumber - { - FileOpt1 = 7736974, - MessageOpt1 = 7739036, - FieldOpt1 = 7740936, - OneofOpt1 = 7740111, - EnumOpt1 = 7753576, - EnumValueOpt1 = 1560678, - ServiceOpt1 = 7887650, - MethodOpt1 = 7890860, - - // All message options... - BoolOpt = 7706090, - Int32Opt = 7705709, - Int64Opt = 7705542, - UInt32Opt = 7704880, - UInt64Opt = 7702367, - SInt32Opt = 7701568, - SInt64Opt = 7700863, - Fixed32Opt = 7700307, - Fixed64Opt = 7700194, - SFixed32Opt = 7698645, - SFixed64Opt = 7685475, - FloatOpt = 7675390, - DoubleOpt = 7673293, - StringOpt = 7673285, - BytesOpt = 7673238, - EnumOpt = 7673233, - MessageTypeOpt = 7665967, - - // Miscellaneous - ComplexOpt4 = 7633546, - ComplexOpt1 = 7646756, - ComplexOpt2 = 7636949, - ComplexOpt3 = 7636463, - - // Aggregates - AggregateFileOpt = 15478479, - AggregateMsgOpt = 15480088, - AggregateFieldOpt = 15481374, - AggregateEnumOpt = 15483218, - AggregateEnumValueOpt = 15486921, - AggregateServiceOpt = 15497145, - AggregateMethodOpt = 15512713, - } - /// /// The majority of the testing here is done via parsed descriptors. That's simpler to /// achieve (and more important) than constructing a CodedInputStream manually. @@ -101,23 +54,40 @@ public class CustomOptionsTest { delegate bool OptionFetcher(int field, out T value); + OptionFetcher EnumFetcher(CustomOptions options) + { + return (int i, out E v) => { + if (options.TryGetInt32(i, out int value)) + { + v = (E)(object)value; + return true; + } + else + { + v = default(E); + return false; + } + }; + } + [Test] public void ScalarOptions() { var options = CustomOptionOtherValues.Descriptor.CustomOptions; - AssertOption(-100, options.TryGetInt32, Int32Opt); - AssertOption(12.3456789f, options.TryGetFloat, FloatOpt); - AssertOption(1.234567890123456789d, options.TryGetDouble, DoubleOpt); - AssertOption("Hello, \"World\"", options.TryGetString, StringOpt); - AssertOption(ByteString.CopyFromUtf8("Hello\0World"), options.TryGetBytes, BytesOpt); - AssertOption((int)TestEnumType.TestOptionEnumType2, options.TryGetInt32, EnumOpt); + var d = CustomOptionOtherValues.Descriptor; + AssertOption(-100, options.TryGetInt32, Int32Opt, d.GetOption); + AssertOption(12.3456789f, options.TryGetFloat, FloatOpt, d.GetOption); + AssertOption(1.234567890123456789d, options.TryGetDouble, DoubleOpt, d.GetOption); + AssertOption("Hello, \"World\"", options.TryGetString, StringOpt, d.GetOption); + AssertOption(ByteString.CopyFromUtf8("Hello\0World"), options.TryGetBytes, BytesOpt, d.GetOption); + AssertOption(TestEnumType.TestOptionEnumType2, EnumFetcher(options), EnumOpt, d.GetOption); } [Test] public void MessageOptions() { var options = VariousComplexOptions.Descriptor.CustomOptions; - AssertOption(new ComplexOptionType1 { Foo = 42, Foo4 = { 99, 88 } }, options.TryGetMessage, ComplexOpt1); + AssertOption(new ComplexOptionType1 { Foo = 42, Foo4 = { 99, 88 } }, options.TryGetMessage, ComplexOpt1, VariousComplexOptions.Descriptor.GetOption); AssertOption(new ComplexOptionType2 { Baz = 987, @@ -125,72 +95,74 @@ public void MessageOptions() Fred = new ComplexOptionType4 { Waldo = 321 }, Barney = { new ComplexOptionType4 { Waldo = 101 }, new ComplexOptionType4 { Waldo = 212 } } }, - options.TryGetMessage, ComplexOpt2); - AssertOption(new ComplexOptionType3 { Qux = 9 }, options.TryGetMessage, ComplexOpt3); + options.TryGetMessage, ComplexOpt2, VariousComplexOptions.Descriptor.GetOption); + AssertOption(new ComplexOptionType3 { Qux = 9 }, options.TryGetMessage, ComplexOpt3, VariousComplexOptions.Descriptor.GetOption); } [Test] public void OptionLocations() { var fileOptions = UnittestCustomOptionsProto3Reflection.Descriptor.CustomOptions; - AssertOption(9876543210UL, fileOptions.TryGetUInt64, FileOpt1); + AssertOption(9876543210UL, fileOptions.TryGetUInt64, FileOpt1, UnittestCustomOptionsProto3Reflection.Descriptor.GetOption); var messageOptions = TestMessageWithCustomOptions.Descriptor.CustomOptions; - AssertOption(-56, messageOptions.TryGetInt32, MessageOpt1); + AssertOption(-56, messageOptions.TryGetInt32, MessageOpt1, TestMessageWithCustomOptions.Descriptor.GetOption); var fieldOptions = TestMessageWithCustomOptions.Descriptor.Fields["field1"].CustomOptions; - AssertOption(8765432109UL, fieldOptions.TryGetFixed64, FieldOpt1); + AssertOption(8765432109UL, fieldOptions.TryGetFixed64, FieldOpt1, TestMessageWithCustomOptions.Descriptor.Fields["field1"].GetOption); var oneofOptions = TestMessageWithCustomOptions.Descriptor.Oneofs[0].CustomOptions; - AssertOption(-99, oneofOptions.TryGetInt32, OneofOpt1); + AssertOption(-99, oneofOptions.TryGetInt32, OneofOpt1, TestMessageWithCustomOptions.Descriptor.Oneofs[0].GetOption); var enumOptions = TestMessageWithCustomOptions.Descriptor.EnumTypes[0].CustomOptions; - AssertOption(-789, enumOptions.TryGetSFixed32, EnumOpt1); + AssertOption(-789, enumOptions.TryGetSFixed32, EnumOpt1, TestMessageWithCustomOptions.Descriptor.EnumTypes[0].GetOption); var enumValueOptions = TestMessageWithCustomOptions.Descriptor.EnumTypes[0].FindValueByNumber(2).CustomOptions; - AssertOption(123, enumValueOptions.TryGetInt32, EnumValueOpt1); + AssertOption(123, enumValueOptions.TryGetInt32, EnumValueOpt1, TestMessageWithCustomOptions.Descriptor.EnumTypes[0].FindValueByNumber(2).GetOption); var service = UnittestCustomOptionsProto3Reflection.Descriptor.Services .Single(s => s.Name == "TestServiceWithCustomOptions"); var serviceOptions = service.CustomOptions; - AssertOption(-9876543210, serviceOptions.TryGetSInt64, ServiceOpt1); + AssertOption(-9876543210, serviceOptions.TryGetSInt64, ServiceOpt1, service.GetOption); var methodOptions = service.Methods[0].CustomOptions; - AssertOption((int)UnitTest.Issues.TestProtos.MethodOpt1.Val2, methodOptions.TryGetInt32, CustomOptionNumber.MethodOpt1); + AssertOption(UnitTest.Issues.TestProtos.MethodOpt1.Val2, EnumFetcher(methodOptions), UnittestCustomOptionsProto3Extensions.MethodOpt1, service.Methods[0].GetOption); } [Test] public void MinValues() { var options = CustomOptionMinIntegerValues.Descriptor.CustomOptions; - AssertOption(false, options.TryGetBool, BoolOpt); - AssertOption(int.MinValue, options.TryGetInt32, Int32Opt); - AssertOption(long.MinValue, options.TryGetInt64, Int64Opt); - AssertOption(uint.MinValue, options.TryGetUInt32, UInt32Opt); - AssertOption(ulong.MinValue, options.TryGetUInt64, UInt64Opt); - AssertOption(int.MinValue, options.TryGetSInt32, SInt32Opt); - AssertOption(long.MinValue, options.TryGetSInt64, SInt64Opt); - AssertOption(uint.MinValue, options.TryGetUInt32, Fixed32Opt); - AssertOption(ulong.MinValue, options.TryGetUInt64, Fixed64Opt); - AssertOption(int.MinValue, options.TryGetInt32, SFixed32Opt); - AssertOption(long.MinValue, options.TryGetInt64, SFixed64Opt); + var d = CustomOptionMinIntegerValues.Descriptor; + AssertOption(false, options.TryGetBool, BoolOpt, d.GetOption); + AssertOption(int.MinValue, options.TryGetInt32, Int32Opt, d.GetOption); + AssertOption(long.MinValue, options.TryGetInt64, Int64Opt, d.GetOption); + AssertOption(uint.MinValue, options.TryGetUInt32, Uint32Opt, d.GetOption); + AssertOption(ulong.MinValue, options.TryGetUInt64, Uint64Opt, d.GetOption); + AssertOption(int.MinValue, options.TryGetSInt32, Sint32Opt, d.GetOption); + AssertOption(long.MinValue, options.TryGetSInt64, Sint64Opt, d.GetOption); + AssertOption(uint.MinValue, options.TryGetUInt32, Fixed32Opt, d.GetOption); + AssertOption(ulong.MinValue, options.TryGetUInt64, Fixed64Opt, d.GetOption); + AssertOption(int.MinValue, options.TryGetInt32, Sfixed32Opt, d.GetOption); + AssertOption(long.MinValue, options.TryGetInt64, Sfixed64Opt, d.GetOption); } [Test] public void MaxValues() { var options = CustomOptionMaxIntegerValues.Descriptor.CustomOptions; - AssertOption(true, options.TryGetBool, BoolOpt); - AssertOption(int.MaxValue, options.TryGetInt32, Int32Opt); - AssertOption(long.MaxValue, options.TryGetInt64, Int64Opt); - AssertOption(uint.MaxValue, options.TryGetUInt32, UInt32Opt); - AssertOption(ulong.MaxValue, options.TryGetUInt64, UInt64Opt); - AssertOption(int.MaxValue, options.TryGetSInt32, SInt32Opt); - AssertOption(long.MaxValue, options.TryGetSInt64, SInt64Opt); - AssertOption(uint.MaxValue, options.TryGetFixed32, Fixed32Opt); - AssertOption(ulong.MaxValue, options.TryGetFixed64, Fixed64Opt); - AssertOption(int.MaxValue, options.TryGetSFixed32, SFixed32Opt); - AssertOption(long.MaxValue, options.TryGetSFixed64, SFixed64Opt); + var d = CustomOptionMaxIntegerValues.Descriptor; + AssertOption(true, options.TryGetBool, BoolOpt, d.GetOption); + AssertOption(int.MaxValue, options.TryGetInt32, Int32Opt, d.GetOption); + AssertOption(long.MaxValue, options.TryGetInt64, Int64Opt, d.GetOption); + AssertOption(uint.MaxValue, options.TryGetUInt32, Uint32Opt, d.GetOption); + AssertOption(ulong.MaxValue, options.TryGetUInt64, Uint64Opt, d.GetOption); + AssertOption(int.MaxValue, options.TryGetSInt32, Sint32Opt, d.GetOption); + AssertOption(long.MaxValue, options.TryGetSInt64, Sint64Opt, d.GetOption); + AssertOption(uint.MaxValue, options.TryGetFixed32, Fixed32Opt, d.GetOption); + AssertOption(ulong.MaxValue, options.TryGetFixed64, Fixed64Opt, d.GetOption); + AssertOption(int.MaxValue, options.TryGetSFixed32, Sfixed32Opt, d.GetOption); + AssertOption(long.MaxValue, options.TryGetSFixed64, Sfixed64Opt, d.GetOption); } [Test] @@ -198,17 +170,19 @@ public void AggregateOptions() { // Just two examples var messageOptions = AggregateMessage.Descriptor.CustomOptions; - AssertOption(new Aggregate { I = 101, S = "MessageAnnotation" }, messageOptions.TryGetMessage, AggregateMsgOpt); + AssertOption(new Aggregate { I = 101, S = "MessageAnnotation" }, messageOptions.TryGetMessage, Msgopt, AggregateMessage.Descriptor.GetOption); var fieldOptions = AggregateMessage.Descriptor.Fields["fieldname"].CustomOptions; - AssertOption(new Aggregate { S = "FieldAnnotation" }, fieldOptions.TryGetMessage, AggregateFieldOpt); + AssertOption(new Aggregate { S = "FieldAnnotation" }, fieldOptions.TryGetMessage, Fieldopt, AggregateMessage.Descriptor.Fields["fieldname"].GetOption); } - private void AssertOption(T expected, OptionFetcher fetcher, CustomOptionNumber field) + private void AssertOption(T expected, OptionFetcher fetcher, Extension extension, Func, T> descriptorOptionFetcher) where D : IExtensionMessage { - T actual; - Assert.IsTrue(fetcher((int)field, out actual)); - Assert.AreEqual(expected, actual); + T customOptionsValue; + T extensionValue = descriptorOptionFetcher(extension); + Assert.IsTrue(fetcher(extension.FieldNumber, out customOptionsValue)); + Assert.AreEqual(expected, customOptionsValue); + Assert.AreEqual(expected, extensionValue); } } } From 8a57ec847b0213791dd586ab3c554e1e49513825 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Thu, 21 Mar 2019 17:36:36 -0500 Subject: [PATCH 07/34] 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 --- csharp/generate_protos.sh | 3 + csharp/protos/unittest.proto | 1107 + csharp/protos/unittest_import.proto | 69 + csharp/protos/unittest_import_public.proto | 41 + .../TestProtos/TestMessagesProto2.cs | 2 + .../TestProtos/Unittest.cs | 23617 ++++++++++++++++ .../TestProtos/UnittestImport.cs | 210 + .../TestProtos/UnittestImportPublic.cs | 188 + .../compiler/csharp/csharp_field_base.cc | 2 +- .../compiler/csharp/csharp_helpers.cc | 12 +- .../compiler/csharp/csharp_message.cc | 4 +- 11 files changed, 25247 insertions(+), 8 deletions(-) create mode 100644 csharp/protos/unittest.proto create mode 100644 csharp/protos/unittest_import.proto create mode 100644 csharp/protos/unittest_import_public.proto create mode 100644 csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs create mode 100644 csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs create mode 100644 csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh index 55e87d3337be..06daa4e81c9d 100755 --- a/csharp/generate_protos.sh +++ b/csharp/generate_protos.sh @@ -52,6 +52,9 @@ $PROTOC -Isrc -Icsharp/protos \ 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 000000000000..15db33210c86 --- /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_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 000000000000..a0198c34f11c --- /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 000000000000..6ae34efec60a --- /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 c9c063fb40c9..355463cf8a68 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs @@ -3666,6 +3666,8 @@ public sealed partial class Data : pb::IMessage { 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 000000000000..217e2d29edb8 --- /dev/null +++ b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs @@ -0,0 +1,23617 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: unittest.proto +// +#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 { + + /// Holder for reflection information generated from unittest.proto + public static partial class UnittestReflection { + + #region Descriptor + /// File descriptor for unittest.proto + 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", + "c3RfcHJvdG8yLlRlc3RBbGxUeXBlcy5O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pb24SLC5wcm90b2J1Zl91", + "bml0dGVzdF9wcm90bzIuVGVzdEdyb3VwRXh0ZW5zaW9uGBAgASgKMkUucHJv", + "dG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3ROZXN0ZWRFeHRlbnNpb24uT3B0", + "aW9uYWxHcm91cF9leHRlbnNpb24yfAofb3B0aW9uYWxfZm9yZWlnbl9lbnVt", + "X2V4dGVuc2lvbhIsLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5UZXN0R3Jv", + "dXBFeHRlbnNpb24YFiABKA4yJS5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIu", + "Rm9yZWlnbkVudW0i8QUKDFRlc3RSZXF1aXJlZBIJCgFhGAEgAigFEg4KBmR1", + "bW15MhgCIAEoBRIJCgFiGAMgAigFEg4KBmR1bW15NBgEIAEoBRIOCgZkdW1t", + "eTUYBSABKAUSDgoGZHVtbXk2GAYgASgFEg4KBmR1bW15NxgHIAEoBRIOCgZk", + "dW1teTgYCCABKAUSDgoGZHVtbXk5GAkgASgFEg8KB2R1bW15MTAYCiABKAUS", + "DwoHZHVtbXkxMRgLIAEoBRIPCgdkdW1teTEyGAwgASgFEg8KB2R1bW15MTMY", + "DSABKAUSDwoHZHVtbXkxNBgOIAEoBRIPCgdkdW1teTE1GA8gASgFEg8KB2R1", + "bW15MTYYECABKAUSDwoHZHVtbXkxNxgRIAEoBRIPCgdkdW1teTE4GBIgASgF", + "Eg8KB2R1bW15MTkYEyABKAUSDwoHZHVtbXkyMBgUIAEoBRIPCgdkdW1teTIx", + "GBUgASgFEg8KB2R1bW15MjIYFiABKAUSDwoHZHVtbXkyMxgXIAEoBRIPCgdk", + "dW1teTI0GBggASgFEg8KB2R1bW15MjUYGSABKAUSDwoHZHVtbXkyNhgaIAEo", + "BRIPCgdkdW1teTI3GBsgASgFEg8KB2R1bW15MjgYHCABKAUSDwoHZHVtbXky", + "ORgdIAEoBRIPCgdkdW1teTMwGB4gASgFEg8KB2R1bW15MzE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BlcxJRCghmb29ncm91cBgEIAEoCjI/LnByb3RvYnVmX3Vu", + "aXR0ZXN0X3Byb3RvMi5UZXN0T25lb2ZCYWNrd2FyZHNDb21wYXRpYmxlLkZv", + "b0dyb3VwGiAKCEZvb0dyb3VwEgkKAWEYBSABKAUSCQoBYhgGIAEoCSLBBgoK", + "VGVzdE9uZW9mMhIRCgdmb29faW50GAEgASgFSAASFAoKZm9vX3N0cmluZxgC", + "IAEoCUgAEhYKCGZvb19jb3JkGAMgASgJQgIIAUgAEh4KEGZvb19zdHJpbmdf", + "cGllY2UYBCABKAlCAggCSAASEwoJZm9vX2J5dGVzGAUgASgMSAASQwoIZm9v", + "X2VudW0YBiABKA4yLy5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdE9u", + "ZW9mMi5OZXN0ZWRFbnVtSAASSQoLZm9vX21lc3NhZ2UYByABKAsyMi5wcm90", + "b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdE9uZW9mMi5OZXN0ZWRNZXNzYWdl", + "SAASQQoIZm9vZ3JvdXAYCCABKAoyLS5wcm90b2J1Zl91bml0dGVzdF9wcm90", + "bzIuVGVzdE9uZW9mMi5Gb29Hcm91cEgAElIKEGZvb19sYXp5X21lc3NhZ2UY", + "CyABKAsyMi5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdE9uZW9mMi5O", + "ZXN0ZWRNZXNzYWdlQgIoAUgAEhQKB2Jhcl9pbnQYDCABKAU6ATVIARIcCgpi", + "YXJfc3RyaW5nGA0gASgJOgZTVFJJTkdIARIcCghiYXJfY29yZBgOIAEoCToE", + "Q09SREICCAFIARImChBiYXJfc3RyaW5nX3BpZWNlGA8gASgJOgZTUElFQ0VC", + "AggCSAESGgoJYmFyX2J5dGVzGBAgASgMOgVCWVRFU0gBEkgKCGJhcl9lbnVt", + "GBEgASgOMi8ucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRlc3RPbmVvZjIu", + "TmVzdGVkRW51bToDQkFSS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X2VudW0YZyADKA4yJS5wcm90b2J1Zl91bml0dGVzdF9w", + "cm90bzIuRm9yZWlnbkVudW1CAhABIs8DChFUZXN0VW5wYWNrZWRUeXBlcxIa", + "Cg51bnBhY2tlZF9pbnQzMhhaIAMoBUICEAASGgoOdW5wYWNrZWRfaW50NjQY", + "WyADKANCAhAAEhsKD3VucGFja2VkX3VpbnQzMhhcIAMoDUICEAASGwoPdW5w", + "YWNrZWRfdWludDY0GF0gAygEQgIQABIbCg91bnBhY2tlZF9zaW50MzIYXiAD", + "KBFCAhAAEhsKD3VucGFja2VkX3NpbnQ2NBhfIAMoEkICEAASHAoQdW5wYWNr", + "ZWRfZml4ZWQzMhhgIAMoB0ICEAASHAoQdW5wYWNrZWRfZml4ZWQ2NBhhIAMo", + "BkICEAASHQoRdW5wYWNrZWRfc2ZpeGVkMzIYYiADKA9CAhAAEh0KEXVucGFj", + "a2VkX3NmaXhlZDY0GGMgAygQQgIQABIaCg51bnBhY2tlZF9mbG9hdBhkIAMo", + "AkICEAASGwoPdW5wYWNrZWRfZG91YmxlGGUgAygBQgIQABIZCg11bnBhY2tl", + "ZF9ib29sGGYgAygIQgIQABJACg11bnBhY2tlZF9lbnVtGGcgAygOMiUucHJv", + "dG9idWZfdW5pdHRlc3RfcHJvdG8yLkZvcmVpZ25FbnVtQgIQACIgChRUZXN0", + "UGFja2VkRXh0ZW5zaW9ucyoICAEQgICAgAIiIgoWVGVzdFVucGFja2VkRXh0", + "ZW5zaW9ucyoICAEQgICAgAIitQQKFVRlc3REeW5hbWljRXh0ZW5zaW9ucxIZ", + "ChBzY2FsYXJfZXh0ZW5zaW9uGNAPIAEoBxI+Cg5lbnVtX2V4dGVuc2lvbhjR", + "DyABKA4yJS5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuRm9yZWlnbkVudW0S", + "YAoWZHluYW1pY19lbnVtX2V4dGVuc2lvbhjSDyABKA4yPy5wcm90b2J1Zl91", + "bml0dGVzdF9wcm90bzIuVGVzdER5bmF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TUYBSABKAUSGgoLZmllbGRfbmFtZTYYBiABKAVSBUB0eXBlIqAGChRUZXN0", + "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", + "dHJpbmdNYXBFbnRy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UYBSABKAVCMkgBgAEBiAEBkAEB", + "+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 + + } + /// Holder for extension identifiers generated from the top level of unittest.proto + public static partial class UnittestExtensions { + /// + /// Singular + /// + public static readonly pb::Extension OptionalInt32Extension = + new pb::Extension(1, pb::FieldCodec.ForInt32(8, 0)); + public static readonly pb::Extension OptionalInt64Extension = + new pb::Extension(2, pb::FieldCodec.ForInt64(16, 0L)); + public static readonly pb::Extension OptionalUint32Extension = + new pb::Extension(3, pb::FieldCodec.ForUInt32(24, 0)); + public static readonly pb::Extension OptionalUint64Extension = + new pb::Extension(4, pb::FieldCodec.ForUInt64(32, 0UL)); + public static readonly pb::Extension OptionalSint32Extension = + new pb::Extension(5, pb::FieldCodec.ForSInt32(40, 0)); + public static readonly pb::Extension OptionalSint64Extension = + new pb::Extension(6, pb::FieldCodec.ForSInt64(48, 0L)); + public static readonly pb::Extension OptionalFixed32Extension = + new pb::Extension(7, pb::FieldCodec.ForFixed32(61, 0)); + public static readonly pb::Extension OptionalFixed64Extension = + new pb::Extension(8, pb::FieldCodec.ForFixed64(65, 0UL)); + public static readonly pb::Extension OptionalSfixed32Extension = + new pb::Extension(9, pb::FieldCodec.ForSFixed32(77, 0)); + public static readonly pb::Extension OptionalSfixed64Extension = + new pb::Extension(10, pb::FieldCodec.ForSFixed64(81, 0L)); + public static readonly pb::Extension OptionalFloatExtension = + new pb::Extension(11, pb::FieldCodec.ForFloat(93, 0F)); + public static readonly pb::Extension OptionalDoubleExtension = + new pb::Extension(12, pb::FieldCodec.ForDouble(97, 0D)); + public static readonly pb::Extension OptionalBoolExtension = + new pb::Extension(13, pb::FieldCodec.ForBool(104, false)); + public static readonly pb::Extension OptionalStringExtension = + new pb::Extension(14, pb::FieldCodec.ForString(114, "")); + public static readonly pb::Extension OptionalBytesExtension = + new pb::Extension(15, pb::FieldCodec.ForBytes(122, pb::ByteString.Empty)); + public static readonly pb::Extension OptionalGroupExtension = + new pb::Extension(16, pb::FieldCodec.ForGroup(131, 132, global::Google.Protobuf.TestProtos.Proto2.OptionalGroup_extension.Parser)); + public static readonly pb::Extension OptionalNestedMessageExtension = + new pb::Extension(18, pb::FieldCodec.ForMessage(146, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser)); + public static readonly pb::Extension OptionalForeignMessageExtension = + new pb::Extension(19, pb::FieldCodec.ForMessage(154, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage.Parser)); + public static readonly pb::Extension OptionalImportMessageExtension = + new pb::Extension(20, pb::FieldCodec.ForMessage(162, global::Google.Protobuf.TestProtos.Proto2.ImportMessage.Parser)); + public static readonly pb::Extension OptionalNestedEnumExtension = + new pb::Extension(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 OptionalForeignEnumExtension = + new pb::Extension(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 OptionalImportEnumExtension = + new pb::Extension(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 OptionalStringPieceExtension = + new pb::Extension(24, pb::FieldCodec.ForString(194, "")); + public static readonly pb::Extension OptionalCordExtension = + new pb::Extension(25, pb::FieldCodec.ForString(202, "")); + public static readonly pb::Extension OptionalPublicImportMessageExtension = + new pb::Extension(26, pb::FieldCodec.ForMessage(210, global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage.Parser)); + public static readonly pb::Extension OptionalLazyMessageExtension = + new pb::Extension(27, pb::FieldCodec.ForMessage(218, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser)); + /// + /// Repeated + /// + public static readonly pb::RepeatedExtension RepeatedInt32Extension = + new pb::RepeatedExtension(31, pb::FieldCodec.ForInt32(248)); + public static readonly pb::RepeatedExtension RepeatedInt64Extension = + new pb::RepeatedExtension(32, pb::FieldCodec.ForInt64(256)); + public static readonly pb::RepeatedExtension RepeatedUint32Extension = + new pb::RepeatedExtension(33, pb::FieldCodec.ForUInt32(264)); + public static readonly pb::RepeatedExtension RepeatedUint64Extension = + new pb::RepeatedExtension(34, pb::FieldCodec.ForUInt64(272)); + public static readonly pb::RepeatedExtension RepeatedSint32Extension = + new pb::RepeatedExtension(35, pb::FieldCodec.ForSInt32(280)); + public static readonly pb::RepeatedExtension RepeatedSint64Extension = + new pb::RepeatedExtension(36, pb::FieldCodec.ForSInt64(288)); + public static readonly pb::RepeatedExtension RepeatedFixed32Extension = + new pb::RepeatedExtension(37, pb::FieldCodec.ForFixed32(301)); + public static readonly pb::RepeatedExtension RepeatedFixed64Extension = + new pb::RepeatedExtension(38, pb::FieldCodec.ForFixed64(305)); + public static readonly pb::RepeatedExtension RepeatedSfixed32Extension = + new pb::RepeatedExtension(39, pb::FieldCodec.ForSFixed32(317)); + public static readonly pb::RepeatedExtension RepeatedSfixed64Extension = + new pb::RepeatedExtension(40, pb::FieldCodec.ForSFixed64(321)); + public static readonly pb::RepeatedExtension RepeatedFloatExtension = + new pb::RepeatedExtension(41, pb::FieldCodec.ForFloat(333)); + public static readonly pb::RepeatedExtension RepeatedDoubleExtension = + new pb::RepeatedExtension(42, pb::FieldCodec.ForDouble(337)); + public static readonly pb::RepeatedExtension RepeatedBoolExtension = + new pb::RepeatedExtension(43, pb::FieldCodec.ForBool(344)); + public static readonly pb::RepeatedExtension RepeatedStringExtension = + new pb::RepeatedExtension(44, pb::FieldCodec.ForString(354)); + public static readonly pb::RepeatedExtension RepeatedBytesExtension = + new pb::RepeatedExtension(45, pb::FieldCodec.ForBytes(362)); + public static readonly pb::RepeatedExtension RepeatedGroupExtension = + new pb::RepeatedExtension(46, pb::FieldCodec.ForGroup(371, 372, global::Google.Protobuf.TestProtos.Proto2.RepeatedGroup_extension.Parser)); + public static readonly pb::RepeatedExtension RepeatedNestedMessageExtension = + new pb::RepeatedExtension(48, pb::FieldCodec.ForMessage(386, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser)); + public static readonly pb::RepeatedExtension RepeatedForeignMessageExtension = + new pb::RepeatedExtension(49, pb::FieldCodec.ForMessage(394, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage.Parser)); + public static readonly pb::RepeatedExtension RepeatedImportMessageExtension = + new pb::RepeatedExtension(50, pb::FieldCodec.ForMessage(402, global::Google.Protobuf.TestProtos.Proto2.ImportMessage.Parser)); + public static readonly pb::RepeatedExtension RepeatedNestedEnumExtension = + new pb::RepeatedExtension(51, pb::FieldCodec.ForEnum(408, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum) x)); + public static readonly pb::RepeatedExtension RepeatedForeignEnumExtension = + new pb::RepeatedExtension(52, pb::FieldCodec.ForEnum(416, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x)); + public static readonly pb::RepeatedExtension RepeatedImportEnumExtension = + new pb::RepeatedExtension(53, pb::FieldCodec.ForEnum(424, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ImportEnum) x)); + public static readonly pb::RepeatedExtension RepeatedStringPieceExtension = + new pb::RepeatedExtension(54, pb::FieldCodec.ForString(434)); + public static readonly pb::RepeatedExtension RepeatedCordExtension = + new pb::RepeatedExtension(55, pb::FieldCodec.ForString(442)); + public static readonly pb::RepeatedExtension RepeatedLazyMessageExtension = + new pb::RepeatedExtension(57, pb::FieldCodec.ForMessage(458, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser)); + /// + /// Singular with defaults + /// + public static readonly pb::Extension DefaultInt32Extension = + new pb::Extension(61, pb::FieldCodec.ForInt32(488, 41)); + public static readonly pb::Extension DefaultInt64Extension = + new pb::Extension(62, pb::FieldCodec.ForInt64(496, 42L)); + public static readonly pb::Extension DefaultUint32Extension = + new pb::Extension(63, pb::FieldCodec.ForUInt32(504, 43)); + public static readonly pb::Extension DefaultUint64Extension = + new pb::Extension(64, pb::FieldCodec.ForUInt64(512, 44UL)); + public static readonly pb::Extension DefaultSint32Extension = + new pb::Extension(65, pb::FieldCodec.ForSInt32(520, -45)); + public static readonly pb::Extension DefaultSint64Extension = + new pb::Extension(66, pb::FieldCodec.ForSInt64(528, 46L)); + public static readonly pb::Extension DefaultFixed32Extension = + new pb::Extension(67, pb::FieldCodec.ForFixed32(541, 47)); + public static readonly pb::Extension DefaultFixed64Extension = + new pb::Extension(68, pb::FieldCodec.ForFixed64(545, 48UL)); + public static readonly pb::Extension DefaultSfixed32Extension = + new pb::Extension(69, pb::FieldCodec.ForSFixed32(557, 49)); + public static readonly pb::Extension DefaultSfixed64Extension = + new pb::Extension(70, pb::FieldCodec.ForSFixed64(561, -50L)); + public static readonly pb::Extension DefaultFloatExtension = + new pb::Extension(71, pb::FieldCodec.ForFloat(573, 51.5F)); + public static readonly pb::Extension DefaultDoubleExtension = + new pb::Extension(72, pb::FieldCodec.ForDouble(577, 52000D)); + public static readonly pb::Extension DefaultBoolExtension = + new pb::Extension(73, pb::FieldCodec.ForBool(584, true)); + public static readonly pb::Extension DefaultStringExtension = + new pb::Extension(74, pb::FieldCodec.ForString(594, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +aGVsbG8= +")))); + public static readonly pb::Extension DefaultBytesExtension = + new pb::Extension(75, pb::FieldCodec.ForBytes(602, pb::ByteString.FromBase64("d29ybGQ="))); + public static readonly pb::Extension DefaultNestedEnumExtension = + new pb::Extension(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 DefaultForeignEnumExtension = + new pb::Extension(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 DefaultImportEnumExtension = + new pb::Extension(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 DefaultStringPieceExtension = + new pb::Extension(84, pb::FieldCodec.ForString(674, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +YWJj +")))); + public static readonly pb::Extension DefaultCordExtension = + new pb::Extension(85, pb::FieldCodec.ForString(682, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +MTIz +")))); + /// + /// For oneof test + /// + public static readonly pb::Extension OneofUint32Extension = + new pb::Extension(111, pb::FieldCodec.ForUInt32(888, 0)); + public static readonly pb::Extension OneofNestedMessageExtension = + new pb::Extension(112, pb::FieldCodec.ForMessage(898, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser)); + public static readonly pb::Extension OneofStringExtension = + new pb::Extension(113, pb::FieldCodec.ForString(906, "")); + public static readonly pb::Extension OneofBytesExtension = + new pb::Extension(114, pb::FieldCodec.ForBytes(914, pb::ByteString.Empty)); + public static readonly pb::Extension MyExtensionString = + new pb::Extension(50, pb::FieldCodec.ForString(402, "")); + public static readonly pb::Extension MyExtensionInt = + new pb::Extension(5, pb::FieldCodec.ForInt32(40, 0)); + public static readonly pb::RepeatedExtension PackedInt32Extension = + new pb::RepeatedExtension(90, pb::FieldCodec.ForInt32(722)); + public static readonly pb::RepeatedExtension PackedInt64Extension = + new pb::RepeatedExtension(91, pb::FieldCodec.ForInt64(730)); + public static readonly pb::RepeatedExtension PackedUint32Extension = + new pb::RepeatedExtension(92, pb::FieldCodec.ForUInt32(738)); + public static readonly pb::RepeatedExtension PackedUint64Extension = + new pb::RepeatedExtension(93, pb::FieldCodec.ForUInt64(746)); + public static readonly pb::RepeatedExtension PackedSint32Extension = + new pb::RepeatedExtension(94, pb::FieldCodec.ForSInt32(754)); + public static readonly pb::RepeatedExtension PackedSint64Extension = + new pb::RepeatedExtension(95, pb::FieldCodec.ForSInt64(762)); + public static readonly pb::RepeatedExtension PackedFixed32Extension = + new pb::RepeatedExtension(96, pb::FieldCodec.ForFixed32(770)); + public static readonly pb::RepeatedExtension PackedFixed64Extension = + new pb::RepeatedExtension(97, pb::FieldCodec.ForFixed64(778)); + public static readonly pb::RepeatedExtension PackedSfixed32Extension = + new pb::RepeatedExtension(98, pb::FieldCodec.ForSFixed32(786)); + public static readonly pb::RepeatedExtension PackedSfixed64Extension = + new pb::RepeatedExtension(99, pb::FieldCodec.ForSFixed64(794)); + public static readonly pb::RepeatedExtension PackedFloatExtension = + new pb::RepeatedExtension(100, pb::FieldCodec.ForFloat(802)); + public static readonly pb::RepeatedExtension PackedDoubleExtension = + new pb::RepeatedExtension(101, pb::FieldCodec.ForDouble(810)); + public static readonly pb::RepeatedExtension PackedBoolExtension = + new pb::RepeatedExtension(102, pb::FieldCodec.ForBool(818)); + public static readonly pb::RepeatedExtension PackedEnumExtension = + new pb::RepeatedExtension(103, pb::FieldCodec.ForEnum(826, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x)); + public static readonly pb::RepeatedExtension UnpackedInt32Extension = + new pb::RepeatedExtension(90, pb::FieldCodec.ForInt32(720)); + public static readonly pb::RepeatedExtension UnpackedInt64Extension = + new pb::RepeatedExtension(91, pb::FieldCodec.ForInt64(728)); + public static readonly pb::RepeatedExtension UnpackedUint32Extension = + new pb::RepeatedExtension(92, pb::FieldCodec.ForUInt32(736)); + public static readonly pb::RepeatedExtension UnpackedUint64Extension = + new pb::RepeatedExtension(93, pb::FieldCodec.ForUInt64(744)); + public static readonly pb::RepeatedExtension UnpackedSint32Extension = + new pb::RepeatedExtension(94, pb::FieldCodec.ForSInt32(752)); + public static readonly pb::RepeatedExtension UnpackedSint64Extension = + new pb::RepeatedExtension(95, pb::FieldCodec.ForSInt64(760)); + public static readonly pb::RepeatedExtension UnpackedFixed32Extension = + new pb::RepeatedExtension(96, pb::FieldCodec.ForFixed32(773)); + public static readonly pb::RepeatedExtension UnpackedFixed64Extension = + new pb::RepeatedExtension(97, pb::FieldCodec.ForFixed64(777)); + public static readonly pb::RepeatedExtension UnpackedSfixed32Extension = + new pb::RepeatedExtension(98, pb::FieldCodec.ForSFixed32(789)); + public static readonly pb::RepeatedExtension UnpackedSfixed64Extension = + new pb::RepeatedExtension(99, pb::FieldCodec.ForSFixed64(793)); + public static readonly pb::RepeatedExtension UnpackedFloatExtension = + new pb::RepeatedExtension(100, pb::FieldCodec.ForFloat(805)); + public static readonly pb::RepeatedExtension UnpackedDoubleExtension = + new pb::RepeatedExtension(101, pb::FieldCodec.ForDouble(809)); + public static readonly pb::RepeatedExtension UnpackedBoolExtension = + new pb::RepeatedExtension(102, pb::FieldCodec.ForBool(816)); + public static readonly pb::RepeatedExtension UnpackedEnumExtension = + new pb::RepeatedExtension(103, pb::FieldCodec.ForEnum(824, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x)); + public static readonly pb::Extension TestAllTypes = + new pb::Extension(536860000, pb::FieldCodec.ForMessage(4294880002, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser)); + public static readonly pb::Extension TestExtensionInsideTableExtension = + new pb::Extension(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, + } + + /// + /// Test an enum that has multiple values with the same number. + /// + 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, + } + + /// + /// Test an enum with large, unordered values. + /// + 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 + /// + /// This proto includes every type of field in both singular and repeated + /// forms. + /// + public sealed partial class TestAllTypes : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestAllTypes()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + private int _hasBits1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "optional_int32" field. + public const int OptionalInt32FieldNumber = 1; + private readonly static int OptionalInt32DefaultValue = 0; + + private int optionalInt32_; + /// + /// Singular + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int OptionalInt32 { + get { if ((_hasBits0 & 1) != 0) { return optionalInt32_; } else { return OptionalInt32DefaultValue; } } + set { + _hasBits0 |= 1; + optionalInt32_ = value; + } + } + /// Gets whether the "optional_int32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalInt32 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "optional_int32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalInt32() { + _hasBits0 &= ~1; + } + + /// Field number for the "optional_int64" field. + 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; + } + } + /// Gets whether the "optional_int64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalInt64 { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "optional_int64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalInt64() { + _hasBits0 &= ~2; + } + + /// Field number for the "optional_uint32" field. + 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; + } + } + /// Gets whether the "optional_uint32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalUint32 { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "optional_uint32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalUint32() { + _hasBits0 &= ~4; + } + + /// Field number for the "optional_uint64" field. + 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; + } + } + /// Gets whether the "optional_uint64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalUint64 { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "optional_uint64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalUint64() { + _hasBits0 &= ~8; + } + + /// Field number for the "optional_sint32" field. + 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; + } + } + /// Gets whether the "optional_sint32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalSint32 { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "optional_sint32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalSint32() { + _hasBits0 &= ~16; + } + + /// Field number for the "optional_sint64" field. + 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; + } + } + /// Gets whether the "optional_sint64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalSint64 { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "optional_sint64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalSint64() { + _hasBits0 &= ~32; + } + + /// Field number for the "optional_fixed32" field. + 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; + } + } + /// Gets whether the "optional_fixed32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalFixed32 { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "optional_fixed32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalFixed32() { + _hasBits0 &= ~64; + } + + /// Field number for the "optional_fixed64" field. + 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; + } + } + /// Gets whether the "optional_fixed64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalFixed64 { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "optional_fixed64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalFixed64() { + _hasBits0 &= ~128; + } + + /// Field number for the "optional_sfixed32" field. + 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; + } + } + /// Gets whether the "optional_sfixed32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalSfixed32 { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "optional_sfixed32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalSfixed32() { + _hasBits0 &= ~256; + } + + /// Field number for the "optional_sfixed64" field. + 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; + } + } + /// Gets whether the "optional_sfixed64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalSfixed64 { + get { return (_hasBits0 & 512) != 0; } + } + /// Clears the value of the "optional_sfixed64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalSfixed64() { + _hasBits0 &= ~512; + } + + /// Field number for the "optional_float" field. + 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; + } + } + /// Gets whether the "optional_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalFloat { + get { return (_hasBits0 & 1024) != 0; } + } + /// Clears the value of the "optional_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalFloat() { + _hasBits0 &= ~1024; + } + + /// Field number for the "optional_double" field. + 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; + } + } + /// Gets whether the "optional_double" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalDouble { + get { return (_hasBits0 & 2048) != 0; } + } + /// Clears the value of the "optional_double" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalDouble() { + _hasBits0 &= ~2048; + } + + /// Field number for the "optional_bool" field. + 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; + } + } + /// Gets whether the "optional_bool" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalBool { + get { return (_hasBits0 & 4096) != 0; } + } + /// Clears the value of the "optional_bool" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalBool() { + _hasBits0 &= ~4096; + } + + /// Field number for the "optional_string" field. + 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"); + } + } + /// Gets whether the "optional_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalString { + get { return optionalString_ != null; } + } + /// Clears the value of the "optional_string" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalString() { + optionalString_ = null; + } + + /// Field number for the "optional_bytes" field. + 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"); + } + } + /// Gets whether the "optional_bytes" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalBytes { + get { return optionalBytes_ != null; } + } + /// Clears the value of the "optional_bytes" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalBytes() { + optionalBytes_ = null; + } + + /// Field number for the "optionalgroup" field. + 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; + } + } + /// Gets whether the optionalgroup field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalGroup { + get { return optionalGroup_ != null; } + } + /// Clears the value of the optionalgroup field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalGroup() { + optionalGroup_ = null; + } + + /// Field number for the "optional_nested_message" field. + 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; + } + } + /// Gets whether the optional_nested_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalNestedMessage { + get { return optionalNestedMessage_ != null; } + } + /// Clears the value of the optional_nested_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalNestedMessage() { + optionalNestedMessage_ = null; + } + + /// Field number for the "optional_foreign_message" field. + 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; + } + } + /// Gets whether the optional_foreign_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalForeignMessage { + get { return optionalForeignMessage_ != null; } + } + /// Clears the value of the optional_foreign_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalForeignMessage() { + optionalForeignMessage_ = null; + } + + /// Field number for the "optional_import_message" field. + 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; + } + } + /// Gets whether the optional_import_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalImportMessage { + get { return optionalImportMessage_ != null; } + } + /// Clears the value of the optional_import_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalImportMessage() { + optionalImportMessage_ = null; + } + + /// Field number for the "optional_nested_enum" field. + 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; + } + } + /// Gets whether the "optional_nested_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalNestedEnum { + get { return (_hasBits0 & 8192) != 0; } + } + /// Clears the value of the "optional_nested_enum" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalNestedEnum() { + _hasBits0 &= ~8192; + } + + /// Field number for the "optional_foreign_enum" field. + 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; + } + } + /// Gets whether the "optional_foreign_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalForeignEnum { + get { return (_hasBits0 & 16384) != 0; } + } + /// Clears the value of the "optional_foreign_enum" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalForeignEnum() { + _hasBits0 &= ~16384; + } + + /// Field number for the "optional_import_enum" field. + 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; + } + } + /// Gets whether the "optional_import_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalImportEnum { + get { return (_hasBits0 & 32768) != 0; } + } + /// Clears the value of the "optional_import_enum" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalImportEnum() { + _hasBits0 &= ~32768; + } + + /// Field number for the "optional_string_piece" field. + 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"); + } + } + /// Gets whether the "optional_string_piece" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalStringPiece { + get { return optionalStringPiece_ != null; } + } + /// Clears the value of the "optional_string_piece" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalStringPiece() { + optionalStringPiece_ = null; + } + + /// Field number for the "optional_cord" field. + 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"); + } + } + /// Gets whether the "optional_cord" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalCord { + get { return optionalCord_ != null; } + } + /// Clears the value of the "optional_cord" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalCord() { + optionalCord_ = null; + } + + /// Field number for the "optional_public_import_message" field. + public const int OptionalPublicImportMessageFieldNumber = 26; + private global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage optionalPublicImportMessage_; + /// + /// Defined in unittest_import_public.proto + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Google.Protobuf.TestProtos.Proto2.PublicImportMessage OptionalPublicImportMessage { + get { return optionalPublicImportMessage_; } + set { + optionalPublicImportMessage_ = value; + } + } + /// Gets whether the optional_public_import_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalPublicImportMessage { + get { return optionalPublicImportMessage_ != null; } + } + /// Clears the value of the optional_public_import_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalPublicImportMessage() { + optionalPublicImportMessage_ = null; + } + + /// Field number for the "optional_lazy_message" field. + 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; + } + } + /// Gets whether the optional_lazy_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalLazyMessage { + get { return optionalLazyMessage_ != null; } + } + /// Clears the value of the optional_lazy_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalLazyMessage() { + optionalLazyMessage_ = null; + } + + /// Field number for the "repeated_int32" field. + public const int RepeatedInt32FieldNumber = 31; + private static readonly pb::FieldCodec _repeated_repeatedInt32_codec + = pb::FieldCodec.ForInt32(248); + private readonly pbc::RepeatedField repeatedInt32_ = new pbc::RepeatedField(); + /// + /// Repeated + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedInt32 { + get { return repeatedInt32_; } + } + + /// Field number for the "repeated_int64" field. + public const int RepeatedInt64FieldNumber = 32; + private static readonly pb::FieldCodec _repeated_repeatedInt64_codec + = pb::FieldCodec.ForInt64(256); + private readonly pbc::RepeatedField repeatedInt64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedInt64 { + get { return repeatedInt64_; } + } + + /// Field number for the "repeated_uint32" field. + public const int RepeatedUint32FieldNumber = 33; + private static readonly pb::FieldCodec _repeated_repeatedUint32_codec + = pb::FieldCodec.ForUInt32(264); + private readonly pbc::RepeatedField repeatedUint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedUint32 { + get { return repeatedUint32_; } + } + + /// Field number for the "repeated_uint64" field. + public const int RepeatedUint64FieldNumber = 34; + private static readonly pb::FieldCodec _repeated_repeatedUint64_codec + = pb::FieldCodec.ForUInt64(272); + private readonly pbc::RepeatedField repeatedUint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedUint64 { + get { return repeatedUint64_; } + } + + /// Field number for the "repeated_sint32" field. + public const int RepeatedSint32FieldNumber = 35; + private static readonly pb::FieldCodec _repeated_repeatedSint32_codec + = pb::FieldCodec.ForSInt32(280); + private readonly pbc::RepeatedField repeatedSint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedSint32 { + get { return repeatedSint32_; } + } + + /// Field number for the "repeated_sint64" field. + public const int RepeatedSint64FieldNumber = 36; + private static readonly pb::FieldCodec _repeated_repeatedSint64_codec + = pb::FieldCodec.ForSInt64(288); + private readonly pbc::RepeatedField repeatedSint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedSint64 { + get { return repeatedSint64_; } + } + + /// Field number for the "repeated_fixed32" field. + public const int RepeatedFixed32FieldNumber = 37; + private static readonly pb::FieldCodec _repeated_repeatedFixed32_codec + = pb::FieldCodec.ForFixed32(301); + private readonly pbc::RepeatedField repeatedFixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedFixed32 { + get { return repeatedFixed32_; } + } + + /// Field number for the "repeated_fixed64" field. + public const int RepeatedFixed64FieldNumber = 38; + private static readonly pb::FieldCodec _repeated_repeatedFixed64_codec + = pb::FieldCodec.ForFixed64(305); + private readonly pbc::RepeatedField repeatedFixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedFixed64 { + get { return repeatedFixed64_; } + } + + /// Field number for the "repeated_sfixed32" field. + public const int RepeatedSfixed32FieldNumber = 39; + private static readonly pb::FieldCodec _repeated_repeatedSfixed32_codec + = pb::FieldCodec.ForSFixed32(317); + private readonly pbc::RepeatedField repeatedSfixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedSfixed32 { + get { return repeatedSfixed32_; } + } + + /// Field number for the "repeated_sfixed64" field. + public const int RepeatedSfixed64FieldNumber = 40; + private static readonly pb::FieldCodec _repeated_repeatedSfixed64_codec + = pb::FieldCodec.ForSFixed64(321); + private readonly pbc::RepeatedField repeatedSfixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedSfixed64 { + get { return repeatedSfixed64_; } + } + + /// Field number for the "repeated_float" field. + public const int RepeatedFloatFieldNumber = 41; + private static readonly pb::FieldCodec _repeated_repeatedFloat_codec + = pb::FieldCodec.ForFloat(333); + private readonly pbc::RepeatedField repeatedFloat_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedFloat { + get { return repeatedFloat_; } + } + + /// Field number for the "repeated_double" field. + public const int RepeatedDoubleFieldNumber = 42; + private static readonly pb::FieldCodec _repeated_repeatedDouble_codec + = pb::FieldCodec.ForDouble(337); + private readonly pbc::RepeatedField repeatedDouble_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedDouble { + get { return repeatedDouble_; } + } + + /// Field number for the "repeated_bool" field. + public const int RepeatedBoolFieldNumber = 43; + private static readonly pb::FieldCodec _repeated_repeatedBool_codec + = pb::FieldCodec.ForBool(344); + private readonly pbc::RepeatedField repeatedBool_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedBool { + get { return repeatedBool_; } + } + + /// Field number for the "repeated_string" field. + public const int RepeatedStringFieldNumber = 44; + private static readonly pb::FieldCodec _repeated_repeatedString_codec + = pb::FieldCodec.ForString(354); + private readonly pbc::RepeatedField repeatedString_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedString { + get { return repeatedString_; } + } + + /// Field number for the "repeated_bytes" field. + public const int RepeatedBytesFieldNumber = 45; + private static readonly pb::FieldCodec _repeated_repeatedBytes_codec + = pb::FieldCodec.ForBytes(362); + private readonly pbc::RepeatedField repeatedBytes_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedBytes { + get { return repeatedBytes_; } + } + + /// Field number for the "repeatedgroup" field. + public const int RepeatedGroupFieldNumber = 46; + private static readonly pb::FieldCodec _repeated_repeatedGroup_codec + = pb::FieldCodec.ForGroup(371, 372, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.RepeatedGroup.Parser); + private readonly pbc::RepeatedField repeatedGroup_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedGroup { + get { return repeatedGroup_; } + } + + /// Field number for the "repeated_nested_message" field. + public const int RepeatedNestedMessageFieldNumber = 48; + private static readonly pb::FieldCodec _repeated_repeatedNestedMessage_codec + = pb::FieldCodec.ForMessage(386, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser); + private readonly pbc::RepeatedField repeatedNestedMessage_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedNestedMessage { + get { return repeatedNestedMessage_; } + } + + /// Field number for the "repeated_foreign_message" field. + public const int RepeatedForeignMessageFieldNumber = 49; + private static readonly pb::FieldCodec _repeated_repeatedForeignMessage_codec + = pb::FieldCodec.ForMessage(394, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage.Parser); + private readonly pbc::RepeatedField repeatedForeignMessage_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedForeignMessage { + get { return repeatedForeignMessage_; } + } + + /// Field number for the "repeated_import_message" field. + public const int RepeatedImportMessageFieldNumber = 50; + private static readonly pb::FieldCodec _repeated_repeatedImportMessage_codec + = pb::FieldCodec.ForMessage(402, global::Google.Protobuf.TestProtos.Proto2.ImportMessage.Parser); + private readonly pbc::RepeatedField repeatedImportMessage_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedImportMessage { + get { return repeatedImportMessage_; } + } + + /// Field number for the "repeated_nested_enum" field. + public const int RepeatedNestedEnumFieldNumber = 51; + private static readonly pb::FieldCodec _repeated_repeatedNestedEnum_codec + = pb::FieldCodec.ForEnum(408, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedEnum) x); + private readonly pbc::RepeatedField repeatedNestedEnum_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedNestedEnum { + get { return repeatedNestedEnum_; } + } + + /// Field number for the "repeated_foreign_enum" field. + public const int RepeatedForeignEnumFieldNumber = 52; + private static readonly pb::FieldCodec _repeated_repeatedForeignEnum_codec + = pb::FieldCodec.ForEnum(416, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x); + private readonly pbc::RepeatedField repeatedForeignEnum_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedForeignEnum { + get { return repeatedForeignEnum_; } + } + + /// Field number for the "repeated_import_enum" field. + public const int RepeatedImportEnumFieldNumber = 53; + private static readonly pb::FieldCodec _repeated_repeatedImportEnum_codec + = pb::FieldCodec.ForEnum(424, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ImportEnum) x); + private readonly pbc::RepeatedField repeatedImportEnum_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedImportEnum { + get { return repeatedImportEnum_; } + } + + /// Field number for the "repeated_string_piece" field. + public const int RepeatedStringPieceFieldNumber = 54; + private static readonly pb::FieldCodec _repeated_repeatedStringPiece_codec + = pb::FieldCodec.ForString(434); + private readonly pbc::RepeatedField repeatedStringPiece_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedStringPiece { + get { return repeatedStringPiece_; } + } + + /// Field number for the "repeated_cord" field. + public const int RepeatedCordFieldNumber = 55; + private static readonly pb::FieldCodec _repeated_repeatedCord_codec + = pb::FieldCodec.ForString(442); + private readonly pbc::RepeatedField repeatedCord_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedCord { + get { return repeatedCord_; } + } + + /// Field number for the "repeated_lazy_message" field. + public const int RepeatedLazyMessageFieldNumber = 57; + private static readonly pb::FieldCodec _repeated_repeatedLazyMessage_codec + = pb::FieldCodec.ForMessage(458, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Types.NestedMessage.Parser); + private readonly pbc::RepeatedField repeatedLazyMessage_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedLazyMessage { + get { return repeatedLazyMessage_; } + } + + /// Field number for the "default_int32" field. + public const int DefaultInt32FieldNumber = 61; + private readonly static int DefaultInt32DefaultValue = 41; + + private int defaultInt32_; + /// + /// Singular with defaults + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int DefaultInt32 { + get { if ((_hasBits0 & 65536) != 0) { return defaultInt32_; } else { return DefaultInt32DefaultValue; } } + set { + _hasBits0 |= 65536; + defaultInt32_ = value; + } + } + /// Gets whether the "default_int32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultInt32 { + get { return (_hasBits0 & 65536) != 0; } + } + /// Clears the value of the "default_int32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultInt32() { + _hasBits0 &= ~65536; + } + + /// Field number for the "default_int64" field. + 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; + } + } + /// Gets whether the "default_int64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultInt64 { + get { return (_hasBits0 & 131072) != 0; } + } + /// Clears the value of the "default_int64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultInt64() { + _hasBits0 &= ~131072; + } + + /// Field number for the "default_uint32" field. + 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; + } + } + /// Gets whether the "default_uint32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultUint32 { + get { return (_hasBits0 & 262144) != 0; } + } + /// Clears the value of the "default_uint32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultUint32() { + _hasBits0 &= ~262144; + } + + /// Field number for the "default_uint64" field. + 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; + } + } + /// Gets whether the "default_uint64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultUint64 { + get { return (_hasBits0 & 524288) != 0; } + } + /// Clears the value of the "default_uint64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultUint64() { + _hasBits0 &= ~524288; + } + + /// Field number for the "default_sint32" field. + 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; + } + } + /// Gets whether the "default_sint32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultSint32 { + get { return (_hasBits0 & 1048576) != 0; } + } + /// Clears the value of the "default_sint32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultSint32() { + _hasBits0 &= ~1048576; + } + + /// Field number for the "default_sint64" field. + 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; + } + } + /// Gets whether the "default_sint64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultSint64 { + get { return (_hasBits0 & 2097152) != 0; } + } + /// Clears the value of the "default_sint64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultSint64() { + _hasBits0 &= ~2097152; + } + + /// Field number for the "default_fixed32" field. + 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; + } + } + /// Gets whether the "default_fixed32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultFixed32 { + get { return (_hasBits0 & 4194304) != 0; } + } + /// Clears the value of the "default_fixed32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultFixed32() { + _hasBits0 &= ~4194304; + } + + /// Field number for the "default_fixed64" field. + 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; + } + } + /// Gets whether the "default_fixed64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultFixed64 { + get { return (_hasBits0 & 8388608) != 0; } + } + /// Clears the value of the "default_fixed64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultFixed64() { + _hasBits0 &= ~8388608; + } + + /// Field number for the "default_sfixed32" field. + 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; + } + } + /// Gets whether the "default_sfixed32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultSfixed32 { + get { return (_hasBits0 & 16777216) != 0; } + } + /// Clears the value of the "default_sfixed32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultSfixed32() { + _hasBits0 &= ~16777216; + } + + /// Field number for the "default_sfixed64" field. + 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; + } + } + /// Gets whether the "default_sfixed64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultSfixed64 { + get { return (_hasBits0 & 33554432) != 0; } + } + /// Clears the value of the "default_sfixed64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultSfixed64() { + _hasBits0 &= ~33554432; + } + + /// Field number for the "default_float" field. + 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; + } + } + /// Gets whether the "default_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultFloat { + get { return (_hasBits0 & 67108864) != 0; } + } + /// Clears the value of the "default_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultFloat() { + _hasBits0 &= ~67108864; + } + + /// Field number for the "default_double" field. + 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; + } + } + /// Gets whether the "default_double" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultDouble { + get { return (_hasBits0 & 134217728) != 0; } + } + /// Clears the value of the "default_double" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultDouble() { + _hasBits0 &= ~134217728; + } + + /// Field number for the "default_bool" field. + 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; + } + } + /// Gets whether the "default_bool" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultBool { + get { return (_hasBits0 & 268435456) != 0; } + } + /// Clears the value of the "default_bool" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultBool() { + _hasBits0 &= ~268435456; + } + + /// Field number for the "default_string" field. + 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"); + } + } + /// Gets whether the "default_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultString { + get { return defaultString_ != null; } + } + /// Clears the value of the "default_string" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultString() { + defaultString_ = null; + } + + /// Field number for the "default_bytes" field. + 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"); + } + } + /// Gets whether the "default_bytes" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultBytes { + get { return defaultBytes_ != null; } + } + /// Clears the value of the "default_bytes" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultBytes() { + defaultBytes_ = null; + } + + /// Field number for the "default_nested_enum" field. + 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; + } + } + /// Gets whether the "default_nested_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultNestedEnum { + get { return (_hasBits0 & 536870912) != 0; } + } + /// Clears the value of the "default_nested_enum" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultNestedEnum() { + _hasBits0 &= ~536870912; + } + + /// Field number for the "default_foreign_enum" field. + 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; + } + } + /// Gets whether the "default_foreign_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultForeignEnum { + get { return (_hasBits0 & 1073741824) != 0; } + } + /// Clears the value of the "default_foreign_enum" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultForeignEnum() { + _hasBits0 &= ~1073741824; + } + + /// Field number for the "default_import_enum" field. + 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; + } + } + /// Gets whether the "default_import_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultImportEnum { + get { return (_hasBits0 & -2147483648) != 0; } + } + /// Clears the value of the "default_import_enum" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultImportEnum() { + _hasBits0 &= ~-2147483648; + } + + /// Field number for the "default_string_piece" field. + 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"); + } + } + /// Gets whether the "default_string_piece" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultStringPiece { + get { return defaultStringPiece_ != null; } + } + /// Clears the value of the "default_string_piece" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultStringPiece() { + defaultStringPiece_ = null; + } + + /// Field number for the "default_cord" field. + 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"); + } + } + /// Gets whether the "default_cord" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDefaultCord { + get { return defaultCord_ != null; } + } + /// Clears the value of the "default_cord" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDefaultCord() { + defaultCord_ = null; + } + + /// Field number for the "oneof_uint32" field. + public const int OneofUint32FieldNumber = 111; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint OneofUint32 { + get { return HasOneofUint32 ? (uint) oneofField_ : 0; } + set { + oneofField_ = value; + oneofFieldCase_ = OneofFieldOneofCase.OneofUint32; + } + } + /// Gets whether the "oneof_uint32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofUint32 { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32; } + } + /// Clears the value of the oneof if it's currently set to "oneof_uint32" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofUint32() { + if (HasOneofUint32) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_nested_message" field. + 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; + } + } + /// Gets whether the "oneof_nested_message" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofNestedMessage { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage; } + } + /// Clears the value of the oneof if it's currently set to "oneof_nested_message" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofNestedMessage() { + if (HasOneofNestedMessage) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_string" field. + 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; + } + } + /// Gets whether the "oneof_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofString { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString; } + } + /// Clears the value of the oneof if it's currently set to "oneof_string" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofString() { + if (HasOneofString) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_bytes" field. + 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; + } + } + /// Gets whether the "oneof_bytes" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofBytes { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes; } + } + /// Clears the value of the oneof if it's currently set to "oneof_bytes" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofBytes() { + if (HasOneofBytes) { + ClearOneofField(); + } + } + + private object oneofField_; + /// Enum of possible cases for the "oneof_field" oneof. + 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 + /// Container for nested types declared in the TestAllTypes message type. + [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, + /// + /// Intentionally negative. + /// + [pbr::OriginalName("NEG")] Neg = -1, + } + + public sealed partial class NestedMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NestedMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "bb" field. + public const int BbFieldNumber = 1; + private readonly static int BbDefaultValue = 0; + + private int bb_; + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Bb { + get { if ((_hasBits0 & 1) != 0) { return bb_; } else { return BbDefaultValue; } } + set { + _hasBits0 |= 1; + bb_ = value; + } + } + /// Gets whether the "bb" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBb { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "bb" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OptionalGroup()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RepeatedGroup()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [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 + + } + + /// + /// This proto includes a recusively nested message. + /// + public sealed partial class NestedTestAllTypes : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NestedTestAllTypes()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "child" field. + 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; + } + } + /// Gets whether the child field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasChild { + get { return child_ != null; } + } + /// Clears the value of the child field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearChild() { + child_ = null; + } + + /// Field number for the "payload" field. + 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; + } + } + /// Gets whether the payload field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasPayload { + get { return payload_ != null; } + } + /// Clears the value of the payload field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearPayload() { + payload_ = null; + } + + /// Field number for the "repeated_child" field. + public const int RepeatedChildFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_repeatedChild_codec + = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.Proto2.NestedTestAllTypes.Parser); + private readonly pbc::RepeatedField repeatedChild_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestDeprecatedFields()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "deprecated_int32" field. + 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; + } + } + /// Gets whether the "deprecated_int32" field is set + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDeprecatedInt32 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "deprecated_int32" field + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDeprecatedInt32() { + _hasBits0 &= ~1; + } + + /// Field number for the "deprecated_int32_in_oneof" field. + 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; + } + } + /// Gets whether the "deprecated_int32_in_oneof" field is set + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDeprecatedInt32InOneof { + get { return oneofFieldsCase_ == OneofFieldsOneofCase.DeprecatedInt32InOneof; } + } + /// Clears the value of the oneof if it's currently set to "deprecated_int32_in_oneof" + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDeprecatedInt32InOneof() { + if (HasDeprecatedInt32InOneof) { + ClearOneofFields(); + } + } + + private object oneofFields_; + /// Enum of possible cases for the "oneof_fields" oneof. + 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestDeprecatedMessage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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; + } + } + } + + } + + /// + /// Define these after TestAllTypes to make sure the compiler can handle + /// that. + /// + public sealed partial class ForeignMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ForeignMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "c" field. + 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; + } + } + /// Gets whether the "c" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasC { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "c" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearC() { + _hasBits0 &= ~1; + } + + /// Field number for the "d" field. + 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; + } + } + /// Gets whether the "d" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasD { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "d" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestReservedFields()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestAllExtensions()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + public sealed partial class OptionalGroup_extension : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OptionalGroup_extension()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RepeatedGroup_extension()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestGroup()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "optionalgroup" field. + 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; + } + } + /// Gets whether the optionalgroup field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalGroup { + get { return optionalGroup_ != null; } + } + /// Clears the value of the optionalgroup field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalGroup() { + optionalGroup_ = null; + } + + /// Field number for the "optional_foreign_enum" field. + 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; + } + } + /// Gets whether the "optional_foreign_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalForeignEnum { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "optional_foreign_enum" field + [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 + /// Container for nested types declared in the TestGroup message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class OptionalGroup : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OptionalGroup()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestGroupExtension()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + public sealed partial class TestNestedExtension : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestNestedExtension()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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 + /// Container for nested types declared in the TestNestedExtension message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class OptionalGroup_extension : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OptionalGroup_extension()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [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 + /// Container for extensions for other messages declared in the TestNestedExtension message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Extensions { + /// + /// Check for bug where string extensions declared in tested scope did not + /// compile. + /// + public static readonly pb::Extension Test = + new pb::Extension(1002, pb::FieldCodec.ForString(8018, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +dGVzdA== +")))); + /// + /// Used to test if generated extension name is correct when there are + /// underscores. + /// + public static readonly pb::Extension NestedStringExtension = + new pb::Extension(1003, pb::FieldCodec.ForString(8026, "")); + public static readonly pb::Extension OptionalGroupExtension = + new pb::Extension(16, pb::FieldCodec.ForGroup(131, 132, global::Google.Protobuf.TestProtos.Proto2.TestNestedExtension.Types.OptionalGroup_extension.Parser)); + public static readonly pb::Extension OptionalForeignEnumExtension = + new pb::Extension(22, pb::FieldCodec.ForEnum(176, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x, global::Google.Protobuf.TestProtos.Proto2.ForeignEnum.ForeignFoo)); + } + #endregion + + } + + /// + /// 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. + /// + public sealed partial class TestRequired : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestRequired()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + private int _hasBits1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearA() { + _hasBits0 &= ~1; + } + + /// Field number for the "dummy2" field. + 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; + } + } + /// Gets whether the "dummy2" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy2 { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "dummy2" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy2() { + _hasBits0 &= ~2; + } + + /// Field number for the "b" field. + 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; + } + } + /// Gets whether the "b" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasB { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "b" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearB() { + _hasBits0 &= ~4; + } + + /// Field number for the "dummy4" field. + public const int Dummy4FieldNumber = 4; + private readonly static int Dummy4DefaultValue = 0; + + private int dummy4_; + /// + /// Pad the field count to 32 so that we can test that IsInitialized() + /// properly checks multiple elements of has_bits_. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Dummy4 { + get { if ((_hasBits0 & 8) != 0) { return dummy4_; } else { return Dummy4DefaultValue; } } + set { + _hasBits0 |= 8; + dummy4_ = value; + } + } + /// Gets whether the "dummy4" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy4 { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "dummy4" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy4() { + _hasBits0 &= ~8; + } + + /// Field number for the "dummy5" field. + 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; + } + } + /// Gets whether the "dummy5" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy5 { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "dummy5" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy5() { + _hasBits0 &= ~16; + } + + /// Field number for the "dummy6" field. + 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; + } + } + /// Gets whether the "dummy6" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy6 { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "dummy6" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy6() { + _hasBits0 &= ~32; + } + + /// Field number for the "dummy7" field. + 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; + } + } + /// Gets whether the "dummy7" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy7 { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "dummy7" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy7() { + _hasBits0 &= ~64; + } + + /// Field number for the "dummy8" field. + 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; + } + } + /// Gets whether the "dummy8" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy8 { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "dummy8" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy8() { + _hasBits0 &= ~128; + } + + /// Field number for the "dummy9" field. + 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; + } + } + /// Gets whether the "dummy9" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy9 { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "dummy9" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy9() { + _hasBits0 &= ~256; + } + + /// Field number for the "dummy10" field. + 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; + } + } + /// Gets whether the "dummy10" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy10 { + get { return (_hasBits0 & 512) != 0; } + } + /// Clears the value of the "dummy10" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy10() { + _hasBits0 &= ~512; + } + + /// Field number for the "dummy11" field. + 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; + } + } + /// Gets whether the "dummy11" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy11 { + get { return (_hasBits0 & 1024) != 0; } + } + /// Clears the value of the "dummy11" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy11() { + _hasBits0 &= ~1024; + } + + /// Field number for the "dummy12" field. + 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; + } + } + /// Gets whether the "dummy12" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy12 { + get { return (_hasBits0 & 2048) != 0; } + } + /// Clears the value of the "dummy12" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy12() { + _hasBits0 &= ~2048; + } + + /// Field number for the "dummy13" field. + 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; + } + } + /// Gets whether the "dummy13" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy13 { + get { return (_hasBits0 & 4096) != 0; } + } + /// Clears the value of the "dummy13" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy13() { + _hasBits0 &= ~4096; + } + + /// Field number for the "dummy14" field. + 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; + } + } + /// Gets whether the "dummy14" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy14 { + get { return (_hasBits0 & 8192) != 0; } + } + /// Clears the value of the "dummy14" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy14() { + _hasBits0 &= ~8192; + } + + /// Field number for the "dummy15" field. + 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; + } + } + /// Gets whether the "dummy15" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy15 { + get { return (_hasBits0 & 16384) != 0; } + } + /// Clears the value of the "dummy15" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy15() { + _hasBits0 &= ~16384; + } + + /// Field number for the "dummy16" field. + 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; + } + } + /// Gets whether the "dummy16" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy16 { + get { return (_hasBits0 & 32768) != 0; } + } + /// Clears the value of the "dummy16" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy16() { + _hasBits0 &= ~32768; + } + + /// Field number for the "dummy17" field. + 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; + } + } + /// Gets whether the "dummy17" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy17 { + get { return (_hasBits0 & 65536) != 0; } + } + /// Clears the value of the "dummy17" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy17() { + _hasBits0 &= ~65536; + } + + /// Field number for the "dummy18" field. + 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; + } + } + /// Gets whether the "dummy18" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy18 { + get { return (_hasBits0 & 131072) != 0; } + } + /// Clears the value of the "dummy18" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy18() { + _hasBits0 &= ~131072; + } + + /// Field number for the "dummy19" field. + 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; + } + } + /// Gets whether the "dummy19" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy19 { + get { return (_hasBits0 & 262144) != 0; } + } + /// Clears the value of the "dummy19" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy19() { + _hasBits0 &= ~262144; + } + + /// Field number for the "dummy20" field. + 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; + } + } + /// Gets whether the "dummy20" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy20 { + get { return (_hasBits0 & 524288) != 0; } + } + /// Clears the value of the "dummy20" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy20() { + _hasBits0 &= ~524288; + } + + /// Field number for the "dummy21" field. + 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; + } + } + /// Gets whether the "dummy21" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy21 { + get { return (_hasBits0 & 1048576) != 0; } + } + /// Clears the value of the "dummy21" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy21() { + _hasBits0 &= ~1048576; + } + + /// Field number for the "dummy22" field. + 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; + } + } + /// Gets whether the "dummy22" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy22 { + get { return (_hasBits0 & 2097152) != 0; } + } + /// Clears the value of the "dummy22" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy22() { + _hasBits0 &= ~2097152; + } + + /// Field number for the "dummy23" field. + 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; + } + } + /// Gets whether the "dummy23" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy23 { + get { return (_hasBits0 & 4194304) != 0; } + } + /// Clears the value of the "dummy23" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy23() { + _hasBits0 &= ~4194304; + } + + /// Field number for the "dummy24" field. + 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; + } + } + /// Gets whether the "dummy24" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy24 { + get { return (_hasBits0 & 8388608) != 0; } + } + /// Clears the value of the "dummy24" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy24() { + _hasBits0 &= ~8388608; + } + + /// Field number for the "dummy25" field. + 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; + } + } + /// Gets whether the "dummy25" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy25 { + get { return (_hasBits0 & 16777216) != 0; } + } + /// Clears the value of the "dummy25" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy25() { + _hasBits0 &= ~16777216; + } + + /// Field number for the "dummy26" field. + 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; + } + } + /// Gets whether the "dummy26" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy26 { + get { return (_hasBits0 & 33554432) != 0; } + } + /// Clears the value of the "dummy26" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy26() { + _hasBits0 &= ~33554432; + } + + /// Field number for the "dummy27" field. + 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; + } + } + /// Gets whether the "dummy27" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy27 { + get { return (_hasBits0 & 67108864) != 0; } + } + /// Clears the value of the "dummy27" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy27() { + _hasBits0 &= ~67108864; + } + + /// Field number for the "dummy28" field. + 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; + } + } + /// Gets whether the "dummy28" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy28 { + get { return (_hasBits0 & 134217728) != 0; } + } + /// Clears the value of the "dummy28" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy28() { + _hasBits0 &= ~134217728; + } + + /// Field number for the "dummy29" field. + 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; + } + } + /// Gets whether the "dummy29" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy29 { + get { return (_hasBits0 & 268435456) != 0; } + } + /// Clears the value of the "dummy29" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy29() { + _hasBits0 &= ~268435456; + } + + /// Field number for the "dummy30" field. + 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; + } + } + /// Gets whether the "dummy30" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy30 { + get { return (_hasBits0 & 536870912) != 0; } + } + /// Clears the value of the "dummy30" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy30() { + _hasBits0 &= ~536870912; + } + + /// Field number for the "dummy31" field. + 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; + } + } + /// Gets whether the "dummy31" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy31 { + get { return (_hasBits0 & 1073741824) != 0; } + } + /// Clears the value of the "dummy31" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy31() { + _hasBits0 &= ~1073741824; + } + + /// Field number for the "dummy32" field. + 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; + } + } + /// Gets whether the "dummy32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy32 { + get { return (_hasBits0 & -2147483648) != 0; } + } + /// Clears the value of the "dummy32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDummy32() { + _hasBits0 &= ~-2147483648; + } + + /// Field number for the "c" field. + 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; + } + } + /// Gets whether the "c" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasC { + get { return (_hasBits1 & 1) != 0; } + } + /// Clears the value of the "c" field + [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 + /// Container for extensions for other messages declared in the TestRequired message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Extensions { + public static readonly pb::Extension Single = + new pb::Extension(1000, pb::FieldCodec.ForMessage(8002, global::Google.Protobuf.TestProtos.Proto2.TestRequired.Parser)); + public static readonly pb::RepeatedExtension Multi = + new pb::RepeatedExtension(1001, pb::FieldCodec.ForMessage(8010, global::Google.Protobuf.TestProtos.Proto2.TestRequired.Parser)); + } + #endregion + + } + + public sealed partial class TestRequiredForeign : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestRequiredForeign()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "optional_message" field. + 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; + } + } + /// Gets whether the optional_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalMessage { + get { return optionalMessage_ != null; } + } + /// Clears the value of the optional_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalMessage() { + optionalMessage_ = null; + } + + /// Field number for the "repeated_message" field. + public const int RepeatedMessageFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_repeatedMessage_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.Proto2.TestRequired.Parser); + private readonly pbc::RepeatedField repeatedMessage_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedMessage { + get { return repeatedMessage_; } + } + + /// Field number for the "dummy" field. + 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; + } + } + /// Gets whether the "dummy" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDummy { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "dummy" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestRequiredMessage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "optional_message" field. + 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; + } + } + /// Gets whether the optional_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalMessage { + get { return optionalMessage_ != null; } + } + /// Clears the value of the optional_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalMessage() { + optionalMessage_ = null; + } + + /// Field number for the "repeated_message" field. + public const int RepeatedMessageFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_repeatedMessage_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.Proto2.TestRequired.Parser); + private readonly pbc::RepeatedField repeatedMessage_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedMessage { + get { return repeatedMessage_; } + } + + /// Field number for the "required_message" field. + 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; + } + } + /// Gets whether the required_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasRequiredMessage { + get { return requiredMessage_ != null; } + } + /// Clears the value of the required_message field + [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; + } + } + } + } + + } + + /// + /// Test that we can use NestedMessage from outside TestAllTypes. + /// + public sealed partial class TestForeignNested : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestForeignNested()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "foreign_nested" field. + 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; + } + } + /// Gets whether the foreign_nested field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasForeignNested { + get { return foreignNested_ != null; } + } + /// Clears the value of the foreign_nested field + [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; + } + } + } + } + + } + + /// + /// TestEmptyMessage is used to test unknown field support. + /// + public sealed partial class TestEmptyMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestEmptyMessage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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; + } + } + } + + } + + /// + /// Like above, but declare all field numbers as potential extensions. No + /// actual extensions should ever be defined for this type. + /// + public sealed partial class TestEmptyMessageWithExtensions : pb::IExtensionMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestEmptyMessageWithExtensions()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + public sealed partial class TestMultipleExtensionRanges : pb::IExtensionMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestMultipleExtensionRanges()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + /// + /// Test that really large tag numbers don't break anything. + /// + public sealed partial class TestReallyLargeTagNumber : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestReallyLargeTagNumber()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + public const int AFieldNumber = 1; + private readonly static int ADefaultValue = 0; + + private int a_; + /// + /// The largest possible tag number is 2^28 - 1, since the wire format uses + /// three bits to communicate wire type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int A { + get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } } + set { + _hasBits0 |= 1; + a_ = value; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearA() { + _hasBits0 &= ~1; + } + + /// Field number for the "bb" field. + 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; + } + } + /// Gets whether the "bb" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBb { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "bb" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestRecursiveMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the a field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return a_ != null; } + } + /// Clears the value of the a field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearA() { + a_ = null; + } + + /// Field number for the "i" field. + 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; + } + } + /// Gets whether the "i" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasI { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "i" field + [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; + } + } + } + } + + } + + /// + /// Test that mutual recursion works. + /// + public sealed partial class TestMutualRecursionA : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestMutualRecursionA()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "bb" field. + 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; + } + } + /// Gets whether the bb field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBb { + get { return bb_ != null; } + } + /// Clears the value of the bb field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBb() { + bb_ = null; + } + + /// Field number for the "subgroup" field. + 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; + } + } + /// Gets whether the subgroup field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasSubGroup { + get { return subGroup_ != null; } + } + /// Clears the value of the subgroup field + [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 + /// Container for nested types declared in the TestMutualRecursionA message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class SubMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SubMessage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "b" field. + 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; + } + } + /// Gets whether the b field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasB { + get { return b_ != null; } + } + /// Clears the value of the b field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SubGroup()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "sub_message" field. + public const int SubMessageFieldNumber = 3; + private global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubMessage subMessage_; + /// + /// Needed because of bug in javatest + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Google.Protobuf.TestProtos.Proto2.TestMutualRecursionA.Types.SubMessage SubMessage { + get { return subMessage_; } + set { + subMessage_ = value; + } + } + /// Gets whether the sub_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasSubMessage { + get { return subMessage_ != null; } + } + /// Clears the value of the sub_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearSubMessage() { + subMessage_ = null; + } + + /// Field number for the "not_in_this_scc" field. + 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; + } + } + /// Gets whether the not_in_this_scc field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasNotInThisScc { + get { return notInThisScc_ != null; } + } + /// Clears the value of the not_in_this_scc field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestMutualRecursionB()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the a field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return a_ != null; } + } + /// Clears the value of the a field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearA() { + a_ = null; + } + + /// Field number for the "optional_int32" field. + 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; + } + } + /// Gets whether the "optional_int32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalInt32 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "optional_int32" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestIsInitialized()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "sub_message" field. + 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; + } + } + /// Gets whether the sub_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasSubMessage { + get { return subMessage_ != null; } + } + /// Clears the value of the sub_message field + [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 + /// Container for nested types declared in the TestIsInitialized message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class SubMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SubMessage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "subgroup" field. + 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; + } + } + /// Gets whether the subgroup field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasSubGroup { + get { return subGroup_ != null; } + } + /// Clears the value of the subgroup field + [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 + /// Container for nested types declared in the SubMessage message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class SubGroup : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SubGroup()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "i" field. + 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; + } + } + /// Gets whether the "i" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasI { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "i" field + [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 + + } + + /// + /// 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. + /// + public sealed partial class TestDupFieldNumber : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestDupFieldNumber()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + public const int AFieldNumber = 1; + private readonly static int ADefaultValue = 0; + + private int a_; + /// + /// NO_PROTO1 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int A { + get { if ((_hasBits0 & 1) != 0) { return a_; } else { return ADefaultValue; } } + set { + _hasBits0 |= 1; + a_ = value; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearA() { + _hasBits0 &= ~1; + } + + /// Field number for the "foo" field. + 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; + } + } + /// Gets whether the foo field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFoo { + get { return foo_ != null; } + } + /// Clears the value of the foo field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFoo() { + foo_ = null; + } + + /// Field number for the "bar" field. + 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; + } + } + /// Gets whether the bar field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBar { + get { return bar_ != null; } + } + /// Clears the value of the bar field + [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 + /// Container for nested types declared in the TestDupFieldNumber message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class Foo : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Foo()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Bar()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [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 + + } + + /// + /// Additional messages for testing lazy fields. + /// + public sealed partial class TestEagerMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestEagerMessage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "sub_message" field. + 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; + } + } + /// Gets whether the sub_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasSubMessage { + get { return subMessage_ != null; } + } + /// Clears the value of the sub_message field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestLazyMessage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "sub_message" field. + 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; + } + } + /// Gets whether the sub_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasSubMessage { + get { return subMessage_ != null; } + } + /// Clears the value of the sub_message field + [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; + } + } + } + } + + } + + /// + /// Needed for a Python test. + /// + public sealed partial class TestNestedMessageHasBits : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestNestedMessageHasBits()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "optional_nested_message" field. + 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; + } + } + /// Gets whether the optional_nested_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalNestedMessage { + get { return optionalNestedMessage_ != null; } + } + /// Clears the value of the optional_nested_message field + [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 + /// Container for nested types declared in the TestNestedMessageHasBits message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class NestedMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NestedMessage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "nestedmessage_repeated_int32" field. + public const int NestedmessageRepeatedInt32FieldNumber = 1; + private static readonly pb::FieldCodec _repeated_nestedmessageRepeatedInt32_codec + = pb::FieldCodec.ForInt32(8); + private readonly pbc::RepeatedField nestedmessageRepeatedInt32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField NestedmessageRepeatedInt32 { + get { return nestedmessageRepeatedInt32_; } + } + + /// Field number for the "nestedmessage_repeated_foreignmessage" field. + public const int NestedmessageRepeatedForeignmessageFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_nestedmessageRepeatedForeignmessage_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage.Parser); + private readonly pbc::RepeatedField nestedmessageRepeatedForeignmessage_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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 + + } + + /// + /// Test message with CamelCase field names. This violates Protocol Buffer + /// standard style. + /// + public sealed partial class TestCamelCaseFieldNames : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestCamelCaseFieldNames()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "PrimitiveField" field. + 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; + } + } + /// Gets whether the "PrimitiveField" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasPrimitiveField { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "PrimitiveField" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearPrimitiveField() { + _hasBits0 &= ~1; + } + + /// Field number for the "StringField" field. + 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"); + } + } + /// Gets whether the "StringField" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasStringField { + get { return stringField_ != null; } + } + /// Clears the value of the "StringField" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearStringField() { + stringField_ = null; + } + + /// Field number for the "EnumField" field. + 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; + } + } + /// Gets whether the "EnumField" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasEnumField { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "EnumField" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearEnumField() { + _hasBits0 &= ~2; + } + + /// Field number for the "MessageField" field. + 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; + } + } + /// Gets whether the MessageField field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasMessageField { + get { return messageField_ != null; } + } + /// Clears the value of the MessageField field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearMessageField() { + messageField_ = null; + } + + /// Field number for the "StringPieceField" field. + 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"); + } + } + /// Gets whether the "StringPieceField" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasStringPieceField { + get { return stringPieceField_ != null; } + } + /// Clears the value of the "StringPieceField" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearStringPieceField() { + stringPieceField_ = null; + } + + /// Field number for the "CordField" field. + 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"); + } + } + /// Gets whether the "CordField" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasCordField { + get { return cordField_ != null; } + } + /// Clears the value of the "CordField" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearCordField() { + cordField_ = null; + } + + /// Field number for the "RepeatedPrimitiveField" field. + public const int RepeatedPrimitiveFieldFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_repeatedPrimitiveField_codec + = pb::FieldCodec.ForInt32(56); + private readonly pbc::RepeatedField repeatedPrimitiveField_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedPrimitiveField { + get { return repeatedPrimitiveField_; } + } + + /// Field number for the "RepeatedStringField" field. + public const int RepeatedStringFieldFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_repeatedStringField_codec + = pb::FieldCodec.ForString(66); + private readonly pbc::RepeatedField repeatedStringField_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedStringField { + get { return repeatedStringField_; } + } + + /// Field number for the "RepeatedEnumField" field. + public const int RepeatedEnumFieldFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_repeatedEnumField_codec + = pb::FieldCodec.ForEnum(72, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x); + private readonly pbc::RepeatedField repeatedEnumField_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedEnumField { + get { return repeatedEnumField_; } + } + + /// Field number for the "RepeatedMessageField" field. + public const int RepeatedMessageFieldFieldNumber = 10; + private static readonly pb::FieldCodec _repeated_repeatedMessageField_codec + = pb::FieldCodec.ForMessage(82, global::Google.Protobuf.TestProtos.Proto2.ForeignMessage.Parser); + private readonly pbc::RepeatedField repeatedMessageField_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedMessageField { + get { return repeatedMessageField_; } + } + + /// Field number for the "RepeatedStringPieceField" field. + public const int RepeatedStringPieceFieldFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_repeatedStringPieceField_codec + = pb::FieldCodec.ForString(90); + private readonly pbc::RepeatedField repeatedStringPieceField_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedStringPieceField { + get { return repeatedStringPieceField_; } + } + + /// Field number for the "RepeatedCordField" field. + public const int RepeatedCordFieldFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_repeatedCordField_codec + = pb::FieldCodec.ForString(98); + private readonly pbc::RepeatedField repeatedCordField_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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; + } + } + } + } + + } + + /// + /// We list fields out of order, to ensure that we're using field number and not + /// field index to determine serialization order. + /// + public sealed partial class TestFieldOrderings : pb::IExtensionMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestFieldOrderings()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "my_string" field. + 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"); + } + } + /// Gets whether the "my_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasMyString { + get { return myString_ != null; } + } + /// Clears the value of the "my_string" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearMyString() { + myString_ = null; + } + + /// Field number for the "my_int" field. + 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; + } + } + /// Gets whether the "my_int" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasMyInt { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "my_int" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearMyInt() { + _hasBits0 &= ~1; + } + + /// Field number for the "my_float" field. + 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; + } + } + /// Gets whether the "my_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasMyFloat { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "my_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearMyFloat() { + _hasBits0 &= ~2; + } + + /// Field number for the "optional_nested_message" field. + 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; + } + } + /// Gets whether the optional_nested_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalNestedMessage { + get { return optionalNestedMessage_ != null; } + } + /// Clears the value of the optional_nested_message field + [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(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + #region Nested types + /// Container for nested types declared in the TestFieldOrderings message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class NestedMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NestedMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "oo" field. + 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; + } + } + /// Gets whether the "oo" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOo { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "oo" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOo() { + _hasBits0 &= ~2; + } + + /// Field number for the "bb" field. + public const int BbFieldNumber = 1; + private readonly static int BbDefaultValue = 0; + + private int bb_; + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Bb { + get { if ((_hasBits0 & 1) != 0) { return bb_; } else { return BbDefaultValue; } } + set { + _hasBits0 |= 1; + bb_ = value; + } + } + /// Gets whether the "bb" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBb { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "bb" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestExtensionOrderings1()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "my_string" field. + 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"); + } + } + /// Gets whether the "my_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasMyString { + get { return myString_ != null; } + } + /// Clears the value of the "my_string" field + [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 + /// Container for extensions for other messages declared in the TestExtensionOrderings1 message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Extensions { + public static readonly pb::Extension TestExtOrderings1 = + new pb::Extension(13, pb::FieldCodec.ForMessage(106, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings1.Parser)); + } + #endregion + + } + + public sealed partial class TestExtensionOrderings2 : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestExtensionOrderings2()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "my_string" field. + 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"); + } + } + /// Gets whether the "my_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasMyString { + get { return myString_ != null; } + } + /// Clears the value of the "my_string" field + [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 + /// Container for nested types declared in the TestExtensionOrderings2 message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class TestExtensionOrderings3 : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestExtensionOrderings3()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "my_string" field. + 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"); + } + } + /// Gets whether the "my_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasMyString { + get { return myString_ != null; } + } + /// Clears the value of the "my_string" field + [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 + /// Container for extensions for other messages declared in the TestExtensionOrderings3 message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Extensions { + public static readonly pb::Extension TestExtOrderings3 = + new pb::Extension(14, pb::FieldCodec.ForMessage(114, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Types.TestExtensionOrderings3.Parser)); + } + #endregion + + } + + } + #endregion + + #region Extensions + /// Container for extensions for other messages declared in the TestExtensionOrderings2 message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Extensions { + public static readonly pb::Extension TestExtOrderings2 = + new pb::Extension(12, pb::FieldCodec.ForMessage(98, global::Google.Protobuf.TestProtos.Proto2.TestExtensionOrderings2.Parser)); + } + #endregion + + } + + public sealed partial class TestExtremeDefaultValues : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestExtremeDefaultValues()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "escaped_bytes" field. + 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"); + } + } + /// Gets whether the "escaped_bytes" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasEscapedBytes { + get { return escapedBytes_ != null; } + } + /// Clears the value of the "escaped_bytes" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearEscapedBytes() { + escapedBytes_ = null; + } + + /// Field number for the "large_uint32" field. + 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; + } + } + /// Gets whether the "large_uint32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasLargeUint32 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "large_uint32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearLargeUint32() { + _hasBits0 &= ~1; + } + + /// Field number for the "large_uint64" field. + 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; + } + } + /// Gets whether the "large_uint64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasLargeUint64 { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "large_uint64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearLargeUint64() { + _hasBits0 &= ~2; + } + + /// Field number for the "small_int32" field. + 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; + } + } + /// Gets whether the "small_int32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasSmallInt32 { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "small_int32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearSmallInt32() { + _hasBits0 &= ~4; + } + + /// Field number for the "small_int64" field. + 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; + } + } + /// Gets whether the "small_int64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasSmallInt64 { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "small_int64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearSmallInt64() { + _hasBits0 &= ~8; + } + + /// Field number for the "really_small_int32" field. + 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; + } + } + /// Gets whether the "really_small_int32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasReallySmallInt32 { + get { return (_hasBits0 & 131072) != 0; } + } + /// Clears the value of the "really_small_int32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearReallySmallInt32() { + _hasBits0 &= ~131072; + } + + /// Field number for the "really_small_int64" field. + 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; + } + } + /// Gets whether the "really_small_int64" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasReallySmallInt64 { + get { return (_hasBits0 & 262144) != 0; } + } + /// Clears the value of the "really_small_int64" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearReallySmallInt64() { + _hasBits0 &= ~262144; + } + + /// Field number for the "utf8_string" field. + public const int Utf8StringFieldNumber = 6; + private readonly static string Utf8StringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +4Yi0 +")); + + private string utf8String_; + /// + /// 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.) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Utf8String { + get { return utf8String_ ?? Utf8StringDefaultValue; } + set { + utf8String_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "utf8_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasUtf8String { + get { return utf8String_ != null; } + } + /// Clears the value of the "utf8_string" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearUtf8String() { + utf8String_ = null; + } + + /// Field number for the "zero_float" field. + public const int ZeroFloatFieldNumber = 7; + private readonly static float ZeroFloatDefaultValue = 0F; + + private float zeroFloat_; + /// + /// Tests for single-precision floating-point values. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float ZeroFloat { + get { if ((_hasBits0 & 16) != 0) { return zeroFloat_; } else { return ZeroFloatDefaultValue; } } + set { + _hasBits0 |= 16; + zeroFloat_ = value; + } + } + /// Gets whether the "zero_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasZeroFloat { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "zero_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearZeroFloat() { + _hasBits0 &= ~16; + } + + /// Field number for the "one_float" field. + 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; + } + } + /// Gets whether the "one_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneFloat { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "one_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneFloat() { + _hasBits0 &= ~32; + } + + /// Field number for the "small_float" field. + 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; + } + } + /// Gets whether the "small_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasSmallFloat { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "small_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearSmallFloat() { + _hasBits0 &= ~64; + } + + /// Field number for the "negative_one_float" field. + 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; + } + } + /// Gets whether the "negative_one_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasNegativeOneFloat { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "negative_one_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearNegativeOneFloat() { + _hasBits0 &= ~128; + } + + /// Field number for the "negative_float" field. + 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; + } + } + /// Gets whether the "negative_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasNegativeFloat { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "negative_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearNegativeFloat() { + _hasBits0 &= ~256; + } + + /// Field number for the "large_float" field. + public const int LargeFloatFieldNumber = 12; + private readonly static float LargeFloatDefaultValue = 2e+08F; + + private float largeFloat_; + /// + /// Using exponents + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float LargeFloat { + get { if ((_hasBits0 & 512) != 0) { return largeFloat_; } else { return LargeFloatDefaultValue; } } + set { + _hasBits0 |= 512; + largeFloat_ = value; + } + } + /// Gets whether the "large_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasLargeFloat { + get { return (_hasBits0 & 512) != 0; } + } + /// Clears the value of the "large_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearLargeFloat() { + _hasBits0 &= ~512; + } + + /// Field number for the "small_negative_float" field. + 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; + } + } + /// Gets whether the "small_negative_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasSmallNegativeFloat { + get { return (_hasBits0 & 1024) != 0; } + } + /// Clears the value of the "small_negative_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearSmallNegativeFloat() { + _hasBits0 &= ~1024; + } + + /// Field number for the "inf_double" field. + public const int InfDoubleFieldNumber = 14; + private readonly static double InfDoubleDefaultValue = double.PositiveInfinity; + + private double infDouble_; + /// + /// Text for nonfinite floating-point values. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double InfDouble { + get { if ((_hasBits0 & 2048) != 0) { return infDouble_; } else { return InfDoubleDefaultValue; } } + set { + _hasBits0 |= 2048; + infDouble_ = value; + } + } + /// Gets whether the "inf_double" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasInfDouble { + get { return (_hasBits0 & 2048) != 0; } + } + /// Clears the value of the "inf_double" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearInfDouble() { + _hasBits0 &= ~2048; + } + + /// Field number for the "neg_inf_double" field. + 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; + } + } + /// Gets whether the "neg_inf_double" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasNegInfDouble { + get { return (_hasBits0 & 4096) != 0; } + } + /// Clears the value of the "neg_inf_double" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearNegInfDouble() { + _hasBits0 &= ~4096; + } + + /// Field number for the "nan_double" field. + 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; + } + } + /// Gets whether the "nan_double" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasNanDouble { + get { return (_hasBits0 & 8192) != 0; } + } + /// Clears the value of the "nan_double" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearNanDouble() { + _hasBits0 &= ~8192; + } + + /// Field number for the "inf_float" field. + 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; + } + } + /// Gets whether the "inf_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasInfFloat { + get { return (_hasBits0 & 16384) != 0; } + } + /// Clears the value of the "inf_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearInfFloat() { + _hasBits0 &= ~16384; + } + + /// Field number for the "neg_inf_float" field. + 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; + } + } + /// Gets whether the "neg_inf_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasNegInfFloat { + get { return (_hasBits0 & 32768) != 0; } + } + /// Clears the value of the "neg_inf_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearNegInfFloat() { + _hasBits0 &= ~32768; + } + + /// Field number for the "nan_float" field. + 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; + } + } + /// Gets whether the "nan_float" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasNanFloat { + get { return (_hasBits0 & 65536) != 0; } + } + /// Clears the value of the "nan_float" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearNanFloat() { + _hasBits0 &= ~65536; + } + + /// Field number for the "cpp_trigraph" field. + 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_; + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string CppTrigraph { + get { return cppTrigraph_ ?? CppTrigraphDefaultValue; } + set { + cppTrigraph_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "cpp_trigraph" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasCppTrigraph { + get { return cppTrigraph_ != null; } + } + /// Clears the value of the "cpp_trigraph" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearCppTrigraph() { + cppTrigraph_ = null; + } + + /// Field number for the "string_with_zero" field. + public const int StringWithZeroFieldNumber = 23; + private readonly static string StringWithZeroDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +aGVsAGxv +")); + + private string stringWithZero_; + /// + /// String defaults containing the character '\000' + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string StringWithZero { + get { return stringWithZero_ ?? StringWithZeroDefaultValue; } + set { + stringWithZero_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "string_with_zero" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasStringWithZero { + get { return stringWithZero_ != null; } + } + /// Clears the value of the "string_with_zero" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearStringWithZero() { + stringWithZero_ = null; + } + + /// Field number for the "bytes_with_zero" field. + 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"); + } + } + /// Gets whether the "bytes_with_zero" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBytesWithZero { + get { return bytesWithZero_ != null; } + } + /// Clears the value of the "bytes_with_zero" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBytesWithZero() { + bytesWithZero_ = null; + } + + /// Field number for the "string_piece_with_zero" field. + 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"); + } + } + /// Gets whether the "string_piece_with_zero" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasStringPieceWithZero { + get { return stringPieceWithZero_ != null; } + } + /// Clears the value of the "string_piece_with_zero" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearStringPieceWithZero() { + stringPieceWithZero_ = null; + } + + /// Field number for the "cord_with_zero" field. + 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"); + } + } + /// Gets whether the "cord_with_zero" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasCordWithZero { + get { return cordWithZero_ != null; } + } + /// Clears the value of the "cord_with_zero" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearCordWithZero() { + cordWithZero_ = null; + } + + /// Field number for the "replacement_string" field. + 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"); + } + } + /// Gets whether the "replacement_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasReplacementString { + get { return replacementString_ != null; } + } + /// Clears the value of the "replacement_string" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SparseEnumMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "sparse_enum" field. + 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; + } + } + /// Gets whether the "sparse_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasSparseEnum { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "sparse_enum" field + [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; + } + } + } + } + + } + + /// + /// Test String and Bytes: string is for valid UTF-8 strings + /// + public sealed partial class OneString : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OneString()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "data" field. + 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"); + } + } + /// Gets whether the "data" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasData { + get { return data_ != null; } + } + /// Clears the value of the "data" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MoreString()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_data_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField data_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OneBytes()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "data" field. + 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"); + } + } + /// Gets whether the "data" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasData { + get { return data_ != null; } + } + /// Clears the value of the "data" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MoreBytes()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_data_codec + = pb::FieldCodec.ForBytes(10); + private readonly pbc::RepeatedField data_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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; + } + } + } + } + + } + + /// + /// Test int32, uint32, int64, uint64, and bool are all compatible + /// + public sealed partial class Int32Message : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Int32Message()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "data" field. + 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; + } + } + /// Gets whether the "data" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasData { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "data" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Uint32Message()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "data" field. + 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; + } + } + /// Gets whether the "data" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasData { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "data" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Int64Message()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "data" field. + 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; + } + } + /// Gets whether the "data" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasData { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "data" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Uint64Message()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "data" field. + 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; + } + } + /// Gets whether the "data" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasData { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "data" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoolMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "data" field. + 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; + } + } + /// Gets whether the "data" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasData { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "data" field + [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; + } + } + } + } + + } + + /// + /// Test oneofs. + /// + public sealed partial class TestOneof : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestOneof()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "foo_int" field. + public const int FooIntFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FooInt { + get { return HasFooInt ? (int) foo_ : 0; } + set { + foo_ = value; + fooCase_ = FooOneofCase.FooInt; + } + } + /// Gets whether the "foo_int" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooInt { + get { return fooCase_ == FooOneofCase.FooInt; } + } + /// Clears the value of the oneof if it's currently set to "foo_int" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooInt() { + if (HasFooInt) { + ClearFoo(); + } + } + + /// Field number for the "foo_string" field. + 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; + } + } + /// Gets whether the "foo_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooString { + get { return fooCase_ == FooOneofCase.FooString; } + } + /// Clears the value of the oneof if it's currently set to "foo_string" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooString() { + if (HasFooString) { + ClearFoo(); + } + } + + /// Field number for the "foo_message" field. + 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; + } + } + /// Gets whether the "foo_message" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooMessage { + get { return fooCase_ == FooOneofCase.FooMessage; } + } + /// Clears the value of the oneof if it's currently set to "foo_message" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooMessage() { + if (HasFooMessage) { + ClearFoo(); + } + } + + /// Field number for the "foogroup" field. + 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; + } + } + /// Gets whether the "foogroup" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooGroup { + get { return fooCase_ == FooOneofCase.FooGroup; } + } + /// Clears the value of the oneof if it's currently set to "foogroup" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooGroup() { + if (HasFooGroup) { + ClearFoo(); + } + } + + private object foo_; + /// Enum of possible cases for the "foo" oneof. + 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 + /// Container for nested types declared in the TestOneof message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class FooGroup : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FooGroup()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearA() { + _hasBits0 &= ~1; + } + + /// Field number for the "b" field. + 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"); + } + } + /// Gets whether the "b" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasB { + get { return b_ != null; } + } + /// Clears the value of the "b" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestOneofBackwardsCompatible()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "foo_int" field. + 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; + } + } + /// Gets whether the "foo_int" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooInt { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "foo_int" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooInt() { + _hasBits0 &= ~1; + } + + /// Field number for the "foo_string" field. + 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"); + } + } + /// Gets whether the "foo_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooString { + get { return fooString_ != null; } + } + /// Clears the value of the "foo_string" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooString() { + fooString_ = null; + } + + /// Field number for the "foo_message" field. + 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; + } + } + /// Gets whether the foo_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooMessage { + get { return fooMessage_ != null; } + } + /// Clears the value of the foo_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooMessage() { + fooMessage_ = null; + } + + /// Field number for the "foogroup" field. + 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; + } + } + /// Gets whether the foogroup field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooGroup { + get { return fooGroup_ != null; } + } + /// Clears the value of the foogroup field + [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 + /// Container for nested types declared in the TestOneofBackwardsCompatible message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class FooGroup : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FooGroup()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearA() { + _hasBits0 &= ~1; + } + + /// Field number for the "b" field. + 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"); + } + } + /// Gets whether the "b" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasB { + get { return b_ != null; } + } + /// Clears the value of the "b" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestOneof2()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "foo_int" field. + public const int FooIntFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FooInt { + get { return HasFooInt ? (int) foo_ : 0; } + set { + foo_ = value; + fooCase_ = FooOneofCase.FooInt; + } + } + /// Gets whether the "foo_int" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooInt { + get { return fooCase_ == FooOneofCase.FooInt; } + } + /// Clears the value of the oneof if it's currently set to "foo_int" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooInt() { + if (HasFooInt) { + ClearFoo(); + } + } + + /// Field number for the "foo_string" field. + 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; + } + } + /// Gets whether the "foo_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooString { + get { return fooCase_ == FooOneofCase.FooString; } + } + /// Clears the value of the oneof if it's currently set to "foo_string" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooString() { + if (HasFooString) { + ClearFoo(); + } + } + + /// Field number for the "foo_cord" field. + 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; + } + } + /// Gets whether the "foo_cord" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooCord { + get { return fooCase_ == FooOneofCase.FooCord; } + } + /// Clears the value of the oneof if it's currently set to "foo_cord" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooCord() { + if (HasFooCord) { + ClearFoo(); + } + } + + /// Field number for the "foo_string_piece" field. + 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; + } + } + /// Gets whether the "foo_string_piece" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooStringPiece { + get { return fooCase_ == FooOneofCase.FooStringPiece; } + } + /// Clears the value of the oneof if it's currently set to "foo_string_piece" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooStringPiece() { + if (HasFooStringPiece) { + ClearFoo(); + } + } + + /// Field number for the "foo_bytes" field. + 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; + } + } + /// Gets whether the "foo_bytes" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooBytes { + get { return fooCase_ == FooOneofCase.FooBytes; } + } + /// Clears the value of the oneof if it's currently set to "foo_bytes" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooBytes() { + if (HasFooBytes) { + ClearFoo(); + } + } + + /// Field number for the "foo_enum" field. + 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; + } + } + /// Gets whether the "foo_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooEnum { + get { return fooCase_ == FooOneofCase.FooEnum; } + } + /// Clears the value of the oneof if it's currently set to "foo_enum" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooEnum() { + if (HasFooEnum) { + ClearFoo(); + } + } + + /// Field number for the "foo_message" field. + 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; + } + } + /// Gets whether the "foo_message" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooMessage { + get { return fooCase_ == FooOneofCase.FooMessage; } + } + /// Clears the value of the oneof if it's currently set to "foo_message" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooMessage() { + if (HasFooMessage) { + ClearFoo(); + } + } + + /// Field number for the "foogroup" field. + 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; + } + } + /// Gets whether the "foogroup" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooGroup { + get { return fooCase_ == FooOneofCase.FooGroup; } + } + /// Clears the value of the oneof if it's currently set to "foogroup" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooGroup() { + if (HasFooGroup) { + ClearFoo(); + } + } + + /// Field number for the "foo_lazy_message" field. + 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; + } + } + /// Gets whether the "foo_lazy_message" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooLazyMessage { + get { return fooCase_ == FooOneofCase.FooLazyMessage; } + } + /// Clears the value of the oneof if it's currently set to "foo_lazy_message" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooLazyMessage() { + if (HasFooLazyMessage) { + ClearFoo(); + } + } + + /// Field number for the "bar_int" field. + public const int BarIntFieldNumber = 12; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int BarInt { + get { return HasBarInt ? (int) bar_ : 5; } + set { + bar_ = value; + barCase_ = BarOneofCase.BarInt; + } + } + /// Gets whether the "bar_int" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBarInt { + get { return barCase_ == BarOneofCase.BarInt; } + } + /// Clears the value of the oneof if it's currently set to "bar_int" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBarInt() { + if (HasBarInt) { + ClearBar(); + } + } + + /// Field number for the "bar_string" field. + 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; + } + } + /// Gets whether the "bar_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBarString { + get { return barCase_ == BarOneofCase.BarString; } + } + /// Clears the value of the oneof if it's currently set to "bar_string" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBarString() { + if (HasBarString) { + ClearBar(); + } + } + + /// Field number for the "bar_cord" field. + 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; + } + } + /// Gets whether the "bar_cord" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBarCord { + get { return barCase_ == BarOneofCase.BarCord; } + } + /// Clears the value of the oneof if it's currently set to "bar_cord" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBarCord() { + if (HasBarCord) { + ClearBar(); + } + } + + /// Field number for the "bar_string_piece" field. + 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; + } + } + /// Gets whether the "bar_string_piece" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBarStringPiece { + get { return barCase_ == BarOneofCase.BarStringPiece; } + } + /// Clears the value of the oneof if it's currently set to "bar_string_piece" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBarStringPiece() { + if (HasBarStringPiece) { + ClearBar(); + } + } + + /// Field number for the "bar_bytes" field. + 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; + } + } + /// Gets whether the "bar_bytes" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBarBytes { + get { return barCase_ == BarOneofCase.BarBytes; } + } + /// Clears the value of the oneof if it's currently set to "bar_bytes" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBarBytes() { + if (HasBarBytes) { + ClearBar(); + } + } + + /// Field number for the "bar_enum" field. + 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; + } + } + /// Gets whether the "bar_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBarEnum { + get { return barCase_ == BarOneofCase.BarEnum; } + } + /// Clears the value of the oneof if it's currently set to "bar_enum" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBarEnum() { + if (HasBarEnum) { + ClearBar(); + } + } + + /// Field number for the "baz_int" field. + 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; + } + } + /// Gets whether the "baz_int" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBazInt { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "baz_int" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBazInt() { + _hasBits0 &= ~16; + } + + /// Field number for the "baz_string" field. + 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"); + } + } + /// Gets whether the "baz_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasBazString { + get { return bazString_ != null; } + } + /// Clears the value of the "baz_string" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBazString() { + bazString_ = null; + } + + private object foo_; + /// Enum of possible cases for the "foo" oneof. + 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_; + /// Enum of possible cases for the "bar" oneof. + 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 + /// Container for nested types declared in the TestOneof2 message type. + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FooGroup()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearA() { + _hasBits0 &= ~1; + } + + /// Field number for the "b" field. + 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"); + } + } + /// Gets whether the "b" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasB { + get { return b_ != null; } + } + /// Clears the value of the "b" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NestedMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "qux_int" field. + 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; + } + } + /// Gets whether the "qux_int" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasQuxInt { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "qux_int" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearQuxInt() { + _hasBits0 &= ~1; + } + + /// Field number for the "corge_int" field. + public const int CorgeIntFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_corgeInt_codec + = pb::FieldCodec.ForInt32(16); + private readonly pbc::RepeatedField corgeInt_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestRequiredOneof()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "foo_int" field. + public const int FooIntFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FooInt { + get { return HasFooInt ? (int) foo_ : 0; } + set { + foo_ = value; + fooCase_ = FooOneofCase.FooInt; + } + } + /// Gets whether the "foo_int" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooInt { + get { return fooCase_ == FooOneofCase.FooInt; } + } + /// Clears the value of the oneof if it's currently set to "foo_int" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooInt() { + if (HasFooInt) { + ClearFoo(); + } + } + + /// Field number for the "foo_string" field. + 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; + } + } + /// Gets whether the "foo_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooString { + get { return fooCase_ == FooOneofCase.FooString; } + } + /// Clears the value of the oneof if it's currently set to "foo_string" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooString() { + if (HasFooString) { + ClearFoo(); + } + } + + /// Field number for the "foo_message" field. + 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; + } + } + /// Gets whether the "foo_message" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFooMessage { + get { return fooCase_ == FooOneofCase.FooMessage; } + } + /// Clears the value of the oneof if it's currently set to "foo_message" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFooMessage() { + if (HasFooMessage) { + ClearFoo(); + } + } + + private object foo_; + /// Enum of possible cases for the "foo" oneof. + 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 + /// Container for nested types declared in the TestRequiredOneof message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class NestedMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NestedMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "required_double" field. + 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; + } + } + /// Gets whether the "required_double" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasRequiredDouble { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "required_double" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestPackedTypes()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "packed_int32" field. + public const int PackedInt32FieldNumber = 90; + private static readonly pb::FieldCodec _repeated_packedInt32_codec + = pb::FieldCodec.ForInt32(722); + private readonly pbc::RepeatedField packedInt32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedInt32 { + get { return packedInt32_; } + } + + /// Field number for the "packed_int64" field. + public const int PackedInt64FieldNumber = 91; + private static readonly pb::FieldCodec _repeated_packedInt64_codec + = pb::FieldCodec.ForInt64(730); + private readonly pbc::RepeatedField packedInt64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedInt64 { + get { return packedInt64_; } + } + + /// Field number for the "packed_uint32" field. + public const int PackedUint32FieldNumber = 92; + private static readonly pb::FieldCodec _repeated_packedUint32_codec + = pb::FieldCodec.ForUInt32(738); + private readonly pbc::RepeatedField packedUint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedUint32 { + get { return packedUint32_; } + } + + /// Field number for the "packed_uint64" field. + public const int PackedUint64FieldNumber = 93; + private static readonly pb::FieldCodec _repeated_packedUint64_codec + = pb::FieldCodec.ForUInt64(746); + private readonly pbc::RepeatedField packedUint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedUint64 { + get { return packedUint64_; } + } + + /// Field number for the "packed_sint32" field. + public const int PackedSint32FieldNumber = 94; + private static readonly pb::FieldCodec _repeated_packedSint32_codec + = pb::FieldCodec.ForSInt32(754); + private readonly pbc::RepeatedField packedSint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedSint32 { + get { return packedSint32_; } + } + + /// Field number for the "packed_sint64" field. + public const int PackedSint64FieldNumber = 95; + private static readonly pb::FieldCodec _repeated_packedSint64_codec + = pb::FieldCodec.ForSInt64(762); + private readonly pbc::RepeatedField packedSint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedSint64 { + get { return packedSint64_; } + } + + /// Field number for the "packed_fixed32" field. + public const int PackedFixed32FieldNumber = 96; + private static readonly pb::FieldCodec _repeated_packedFixed32_codec + = pb::FieldCodec.ForFixed32(770); + private readonly pbc::RepeatedField packedFixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedFixed32 { + get { return packedFixed32_; } + } + + /// Field number for the "packed_fixed64" field. + public const int PackedFixed64FieldNumber = 97; + private static readonly pb::FieldCodec _repeated_packedFixed64_codec + = pb::FieldCodec.ForFixed64(778); + private readonly pbc::RepeatedField packedFixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedFixed64 { + get { return packedFixed64_; } + } + + /// Field number for the "packed_sfixed32" field. + public const int PackedSfixed32FieldNumber = 98; + private static readonly pb::FieldCodec _repeated_packedSfixed32_codec + = pb::FieldCodec.ForSFixed32(786); + private readonly pbc::RepeatedField packedSfixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedSfixed32 { + get { return packedSfixed32_; } + } + + /// Field number for the "packed_sfixed64" field. + public const int PackedSfixed64FieldNumber = 99; + private static readonly pb::FieldCodec _repeated_packedSfixed64_codec + = pb::FieldCodec.ForSFixed64(794); + private readonly pbc::RepeatedField packedSfixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedSfixed64 { + get { return packedSfixed64_; } + } + + /// Field number for the "packed_float" field. + public const int PackedFloatFieldNumber = 100; + private static readonly pb::FieldCodec _repeated_packedFloat_codec + = pb::FieldCodec.ForFloat(802); + private readonly pbc::RepeatedField packedFloat_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedFloat { + get { return packedFloat_; } + } + + /// Field number for the "packed_double" field. + public const int PackedDoubleFieldNumber = 101; + private static readonly pb::FieldCodec _repeated_packedDouble_codec + = pb::FieldCodec.ForDouble(810); + private readonly pbc::RepeatedField packedDouble_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedDouble { + get { return packedDouble_; } + } + + /// Field number for the "packed_bool" field. + public const int PackedBoolFieldNumber = 102; + private static readonly pb::FieldCodec _repeated_packedBool_codec + = pb::FieldCodec.ForBool(818); + private readonly pbc::RepeatedField packedBool_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedBool { + get { return packedBool_; } + } + + /// Field number for the "packed_enum" field. + public const int PackedEnumFieldNumber = 103; + private static readonly pb::FieldCodec _repeated_packedEnum_codec + = pb::FieldCodec.ForEnum(826, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x); + private readonly pbc::RepeatedField packedEnum_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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; + } + } + } + } + + } + + /// + /// A message with the same fields as TestPackedTypes, but without packing. Used + /// to test packed <-> unpacked wire compatibility. + /// + public sealed partial class TestUnpackedTypes : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestUnpackedTypes()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "unpacked_int32" field. + public const int UnpackedInt32FieldNumber = 90; + private static readonly pb::FieldCodec _repeated_unpackedInt32_codec + = pb::FieldCodec.ForInt32(720); + private readonly pbc::RepeatedField unpackedInt32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedInt32 { + get { return unpackedInt32_; } + } + + /// Field number for the "unpacked_int64" field. + public const int UnpackedInt64FieldNumber = 91; + private static readonly pb::FieldCodec _repeated_unpackedInt64_codec + = pb::FieldCodec.ForInt64(728); + private readonly pbc::RepeatedField unpackedInt64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedInt64 { + get { return unpackedInt64_; } + } + + /// Field number for the "unpacked_uint32" field. + public const int UnpackedUint32FieldNumber = 92; + private static readonly pb::FieldCodec _repeated_unpackedUint32_codec + = pb::FieldCodec.ForUInt32(736); + private readonly pbc::RepeatedField unpackedUint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedUint32 { + get { return unpackedUint32_; } + } + + /// Field number for the "unpacked_uint64" field. + public const int UnpackedUint64FieldNumber = 93; + private static readonly pb::FieldCodec _repeated_unpackedUint64_codec + = pb::FieldCodec.ForUInt64(744); + private readonly pbc::RepeatedField unpackedUint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedUint64 { + get { return unpackedUint64_; } + } + + /// Field number for the "unpacked_sint32" field. + public const int UnpackedSint32FieldNumber = 94; + private static readonly pb::FieldCodec _repeated_unpackedSint32_codec + = pb::FieldCodec.ForSInt32(752); + private readonly pbc::RepeatedField unpackedSint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedSint32 { + get { return unpackedSint32_; } + } + + /// Field number for the "unpacked_sint64" field. + public const int UnpackedSint64FieldNumber = 95; + private static readonly pb::FieldCodec _repeated_unpackedSint64_codec + = pb::FieldCodec.ForSInt64(760); + private readonly pbc::RepeatedField unpackedSint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedSint64 { + get { return unpackedSint64_; } + } + + /// Field number for the "unpacked_fixed32" field. + public const int UnpackedFixed32FieldNumber = 96; + private static readonly pb::FieldCodec _repeated_unpackedFixed32_codec + = pb::FieldCodec.ForFixed32(773); + private readonly pbc::RepeatedField unpackedFixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedFixed32 { + get { return unpackedFixed32_; } + } + + /// Field number for the "unpacked_fixed64" field. + public const int UnpackedFixed64FieldNumber = 97; + private static readonly pb::FieldCodec _repeated_unpackedFixed64_codec + = pb::FieldCodec.ForFixed64(777); + private readonly pbc::RepeatedField unpackedFixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedFixed64 { + get { return unpackedFixed64_; } + } + + /// Field number for the "unpacked_sfixed32" field. + public const int UnpackedSfixed32FieldNumber = 98; + private static readonly pb::FieldCodec _repeated_unpackedSfixed32_codec + = pb::FieldCodec.ForSFixed32(789); + private readonly pbc::RepeatedField unpackedSfixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedSfixed32 { + get { return unpackedSfixed32_; } + } + + /// Field number for the "unpacked_sfixed64" field. + public const int UnpackedSfixed64FieldNumber = 99; + private static readonly pb::FieldCodec _repeated_unpackedSfixed64_codec + = pb::FieldCodec.ForSFixed64(793); + private readonly pbc::RepeatedField unpackedSfixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedSfixed64 { + get { return unpackedSfixed64_; } + } + + /// Field number for the "unpacked_float" field. + public const int UnpackedFloatFieldNumber = 100; + private static readonly pb::FieldCodec _repeated_unpackedFloat_codec + = pb::FieldCodec.ForFloat(805); + private readonly pbc::RepeatedField unpackedFloat_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedFloat { + get { return unpackedFloat_; } + } + + /// Field number for the "unpacked_double" field. + public const int UnpackedDoubleFieldNumber = 101; + private static readonly pb::FieldCodec _repeated_unpackedDouble_codec + = pb::FieldCodec.ForDouble(809); + private readonly pbc::RepeatedField unpackedDouble_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedDouble { + get { return unpackedDouble_; } + } + + /// Field number for the "unpacked_bool" field. + public const int UnpackedBoolFieldNumber = 102; + private static readonly pb::FieldCodec _repeated_unpackedBool_codec + = pb::FieldCodec.ForBool(816); + private readonly pbc::RepeatedField unpackedBool_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedBool { + get { return unpackedBool_; } + } + + /// Field number for the "unpacked_enum" field. + public const int UnpackedEnumFieldNumber = 103; + private static readonly pb::FieldCodec _repeated_unpackedEnum_codec + = pb::FieldCodec.ForEnum(824, x => (int) x, x => (global::Google.Protobuf.TestProtos.Proto2.ForeignEnum) x); + private readonly pbc::RepeatedField unpackedEnum_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestPackedExtensions()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + public sealed partial class TestUnpackedExtensions : pb::IExtensionMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestUnpackedExtensions()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + } + + /// + /// Used by ExtensionSetTest/DynamicExtensions. The test actually builds + /// a set of extensions to TestAllExtensions dynamically, based on the fields + /// of this message type. + /// + public sealed partial class TestDynamicExtensions : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestDynamicExtensions()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "scalar_extension" field. + 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; + } + } + /// Gets whether the "scalar_extension" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasScalarExtension { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "scalar_extension" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearScalarExtension() { + _hasBits0 &= ~1; + } + + /// Field number for the "enum_extension" field. + 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; + } + } + /// Gets whether the "enum_extension" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasEnumExtension { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "enum_extension" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearEnumExtension() { + _hasBits0 &= ~2; + } + + /// Field number for the "dynamic_enum_extension" field. + 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; + } + } + /// Gets whether the "dynamic_enum_extension" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDynamicEnumExtension { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "dynamic_enum_extension" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDynamicEnumExtension() { + _hasBits0 &= ~4; + } + + /// Field number for the "message_extension" field. + 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; + } + } + /// Gets whether the message_extension field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasMessageExtension { + get { return messageExtension_ != null; } + } + /// Clears the value of the message_extension field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearMessageExtension() { + messageExtension_ = null; + } + + /// Field number for the "dynamic_message_extension" field. + 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; + } + } + /// Gets whether the dynamic_message_extension field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDynamicMessageExtension { + get { return dynamicMessageExtension_ != null; } + } + /// Clears the value of the dynamic_message_extension field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearDynamicMessageExtension() { + dynamicMessageExtension_ = null; + } + + /// Field number for the "repeated_extension" field. + public const int RepeatedExtensionFieldNumber = 2005; + private static readonly pb::FieldCodec _repeated_repeatedExtension_codec + = pb::FieldCodec.ForString(16042); + private readonly pbc::RepeatedField repeatedExtension_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedExtension { + get { return repeatedExtension_; } + } + + /// Field number for the "packed_extension" field. + public const int PackedExtensionFieldNumber = 2006; + private static readonly pb::FieldCodec _repeated_packedExtension_codec + = pb::FieldCodec.ForSInt32(16050); + private readonly pbc::RepeatedField packedExtension_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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 + /// Container for nested types declared in the TestDynamicExtensions message type. + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DynamicMessageType()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "dynamic_field" field. + 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; + } + } + /// Gets whether the "dynamic_field" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasDynamicField { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "dynamic_field" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestRepeatedScalarDifferentTagSizes()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "repeated_fixed32" field. + public const int RepeatedFixed32FieldNumber = 12; + private static readonly pb::FieldCodec _repeated_repeatedFixed32_codec + = pb::FieldCodec.ForFixed32(101); + private readonly pbc::RepeatedField repeatedFixed32_ = new pbc::RepeatedField(); + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedFixed32 { + get { return repeatedFixed32_; } + } + + /// Field number for the "repeated_int32" field. + public const int RepeatedInt32FieldNumber = 13; + private static readonly pb::FieldCodec _repeated_repeatedInt32_codec + = pb::FieldCodec.ForInt32(104); + private readonly pbc::RepeatedField repeatedInt32_ = new pbc::RepeatedField(); + /// + /// Check for a varint type, just for good measure. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedInt32 { + get { return repeatedInt32_; } + } + + /// Field number for the "repeated_fixed64" field. + public const int RepeatedFixed64FieldNumber = 2046; + private static readonly pb::FieldCodec _repeated_repeatedFixed64_codec + = pb::FieldCodec.ForFixed64(16369); + private readonly pbc::RepeatedField repeatedFixed64_ = new pbc::RepeatedField(); + /// + /// These have two-byte tags. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedFixed64 { + get { return repeatedFixed64_; } + } + + /// Field number for the "repeated_int64" field. + public const int RepeatedInt64FieldNumber = 2047; + private static readonly pb::FieldCodec _repeated_repeatedInt64_codec + = pb::FieldCodec.ForInt64(16376); + private readonly pbc::RepeatedField repeatedInt64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedInt64 { + get { return repeatedInt64_; } + } + + /// Field number for the "repeated_float" field. + public const int RepeatedFloatFieldNumber = 262142; + private static readonly pb::FieldCodec _repeated_repeatedFloat_codec + = pb::FieldCodec.ForFloat(2097141); + private readonly pbc::RepeatedField repeatedFloat_ = new pbc::RepeatedField(); + /// + /// Three byte tags. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedFloat { + get { return repeatedFloat_; } + } + + /// Field number for the "repeated_uint64" field. + public const int RepeatedUint64FieldNumber = 262143; + private static readonly pb::FieldCodec _repeated_repeatedUint64_codec + = pb::FieldCodec.ForUInt64(2097144); + private readonly pbc::RepeatedField repeatedUint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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; + } + } + } + } + + } + + /// + /// Test that if an optional or required message/group field appears multiple + /// times in the input, they need to be merged. + /// + public sealed partial class TestParsingMerge : pb::IExtensionMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestParsingMerge()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "required_all_types" field. + 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; + } + } + /// Gets whether the required_all_types field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasRequiredAllTypes { + get { return requiredAllTypes_ != null; } + } + /// Clears the value of the required_all_types field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearRequiredAllTypes() { + requiredAllTypes_ = null; + } + + /// Field number for the "optional_all_types" field. + 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; + } + } + /// Gets whether the optional_all_types field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalAllTypes { + get { return optionalAllTypes_ != null; } + } + /// Clears the value of the optional_all_types field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalAllTypes() { + optionalAllTypes_ = null; + } + + /// Field number for the "repeated_all_types" field. + public const int RepeatedAllTypesFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_repeatedAllTypes_codec + = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser); + private readonly pbc::RepeatedField repeatedAllTypes_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedAllTypes { + get { return repeatedAllTypes_; } + } + + /// Field number for the "optionalgroup" field. + 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; + } + } + /// Gets whether the optionalgroup field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalGroup { + get { return optionalGroup_ != null; } + } + /// Clears the value of the optionalgroup field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalGroup() { + optionalGroup_ = null; + } + + /// Field number for the "repeatedgroup" field. + public const int RepeatedGroupFieldNumber = 20; + private static readonly pb::FieldCodec _repeated_repeatedGroup_codec + = pb::FieldCodec.ForGroup(163, 164, global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedGroup.Parser); + private readonly pbc::RepeatedField repeatedGroup_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + #region Nested types + /// Container for nested types declared in the TestParsingMerge message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + /// + /// 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. + /// + public sealed partial class RepeatedFieldsGenerator : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RepeatedFieldsGenerator()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "field1" field. + public const int Field1FieldNumber = 1; + private static readonly pb::FieldCodec _repeated_field1_codec + = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser); + private readonly pbc::RepeatedField field1_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Field1 { + get { return field1_; } + } + + /// Field number for the "field2" field. + public const int Field2FieldNumber = 2; + private static readonly pb::FieldCodec _repeated_field2_codec + = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser); + private readonly pbc::RepeatedField field2_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Field2 { + get { return field2_; } + } + + /// Field number for the "field3" field. + public const int Field3FieldNumber = 3; + private static readonly pb::FieldCodec _repeated_field3_codec + = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser); + private readonly pbc::RepeatedField field3_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Field3 { + get { return field3_; } + } + + /// Field number for the "group1" field. + public const int Group1FieldNumber = 10; + private static readonly pb::FieldCodec _repeated_group1_codec + = pb::FieldCodec.ForGroup(83, 84, global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1.Parser); + private readonly pbc::RepeatedField group1_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Group1 { + get { return group1_; } + } + + /// Field number for the "group2" field. + public const int Group2FieldNumber = 20; + private static readonly pb::FieldCodec _repeated_group2_codec + = pb::FieldCodec.ForGroup(163, 164, global::Google.Protobuf.TestProtos.Proto2.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2.Parser); + private readonly pbc::RepeatedField group2_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Group2 { + get { return group2_; } + } + + /// Field number for the "ext1" field. + public const int Ext1FieldNumber = 1000; + private static readonly pb::FieldCodec _repeated_ext1_codec + = pb::FieldCodec.ForMessage(8002, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser); + private readonly pbc::RepeatedField ext1_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Ext1 { + get { return ext1_; } + } + + /// Field number for the "ext2" field. + public const int Ext2FieldNumber = 1001; + private static readonly pb::FieldCodec _repeated_ext2_codec + = pb::FieldCodec.ForMessage(8010, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser); + private readonly pbc::RepeatedField ext2_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField 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 + /// Container for nested types declared in the RepeatedFieldsGenerator message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class Group1 : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Group1()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "field1" field. + 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; + } + } + /// Gets whether the field1 field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField1 { + get { return field1_ != null; } + } + /// Clears the value of the field1 field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Group2()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "field1" field. + 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; + } + } + /// Gets whether the field1 field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField1 { + get { return field1_ != null; } + } + /// Clears the value of the field1 field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OptionalGroup()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "optional_group_all_types" field. + 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; + } + } + /// Gets whether the optional_group_all_types field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalGroupAllTypes { + get { return optionalGroupAllTypes_ != null; } + } + /// Clears the value of the optional_group_all_types field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RepeatedGroup()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "repeated_group_all_types" field. + 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; + } + } + /// Gets whether the repeated_group_all_types field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasRepeatedGroupAllTypes { + get { return repeatedGroupAllTypes_ != null; } + } + /// Clears the value of the repeated_group_all_types field + [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 + /// Container for extensions for other messages declared in the TestParsingMerge message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Extensions { + public static readonly pb::Extension OptionalExt = + new pb::Extension(1000, pb::FieldCodec.ForMessage(8002, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser)); + public static readonly pb::RepeatedExtension RepeatedExt = + new pb::RepeatedExtension(1001, pb::FieldCodec.ForMessage(8010, global::Google.Protobuf.TestProtos.Proto2.TestAllTypes.Parser)); + } + #endregion + + } + + public sealed partial class TestCommentInjectionMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestCommentInjectionMessage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "a" field. + public const int AFieldNumber = 1; + private readonly static string ADefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +Ki8gPC0gTmVpdGhlciBzaG91bGQgdGhpcy4= +")); + + private string a_; + /// + /// */ <- This should not close the generated doc comment + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string A { + get { return a_ ?? ADefaultValue; } + set { + a_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return a_ != null; } + } + /// Clears the value of the "a" field + [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; + } + } + } + } + + } + + /// + /// Test that RPC services work. + /// + public sealed partial class FooRequest : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FooRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FooResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FooClientMessage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FooServerMessage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BarRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BarResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestJsonName()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "field_name1" field. + 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; + } + } + /// Gets whether the "field_name1" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName1 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "field_name1" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName1() { + _hasBits0 &= ~1; + } + + /// Field number for the "fieldName2" field. + 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; + } + } + /// Gets whether the "fieldName2" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName2 { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "fieldName2" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName2() { + _hasBits0 &= ~2; + } + + /// Field number for the "FieldName3" field. + 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; + } + } + /// Gets whether the "FieldName3" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName3 { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "FieldName3" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName3() { + _hasBits0 &= ~4; + } + + /// Field number for the "_field_name4" field. + 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; + } + } + /// Gets whether the "_field_name4" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName4 { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "_field_name4" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFieldName4() { + _hasBits0 &= ~8; + } + + /// Field number for the "FIELD_NAME5" field. + 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; + } + } + /// Gets whether the "FIELD_NAME5" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFIELDNAME5 { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "FIELD_NAME5" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFIELDNAME5() { + _hasBits0 &= ~16; + } + + /// Field number for the "field_name6" field. + 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; + } + } + /// Gets whether the "field_name6" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFieldName6 { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "field_name6" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestHugeFieldNumbers()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "optional_int32" field. + 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; + } + } + /// Gets whether the "optional_int32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalInt32 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "optional_int32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalInt32() { + _hasBits0 &= ~1; + } + + /// Field number for the "fixed_32" field. + 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; + } + } + /// Gets whether the "fixed_32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasFixed32 { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "fixed_32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearFixed32() { + _hasBits0 &= ~2; + } + + /// Field number for the "repeated_int32" field. + public const int RepeatedInt32FieldNumber = 536870002; + private static readonly pb::FieldCodec _repeated_repeatedInt32_codec + = pb::FieldCodec.ForInt32(4294960016); + private readonly pbc::RepeatedField repeatedInt32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedInt32 { + get { return repeatedInt32_; } + } + + /// Field number for the "packed_int32" field. + public const int PackedInt32FieldNumber = 536870003; + private static readonly pb::FieldCodec _repeated_packedInt32_codec + = pb::FieldCodec.ForInt32(4294960026); + private readonly pbc::RepeatedField packedInt32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedInt32 { + get { return packedInt32_; } + } + + /// Field number for the "optional_enum" field. + 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; + } + } + /// Gets whether the "optional_enum" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalEnum { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "optional_enum" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalEnum() { + _hasBits0 &= ~4; + } + + /// Field number for the "optional_string" field. + 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"); + } + } + /// Gets whether the "optional_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalString { + get { return optionalString_ != null; } + } + /// Clears the value of the "optional_string" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalString() { + optionalString_ = null; + } + + /// Field number for the "optional_bytes" field. + 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"); + } + } + /// Gets whether the "optional_bytes" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalBytes { + get { return optionalBytes_ != null; } + } + /// Clears the value of the "optional_bytes" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalBytes() { + optionalBytes_ = null; + } + + /// Field number for the "optional_message" field. + 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; + } + } + /// Gets whether the optional_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalMessage { + get { return optionalMessage_ != null; } + } + /// Clears the value of the optional_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalMessage() { + optionalMessage_ = null; + } + + /// Field number for the "optionalgroup" field. + 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; + } + } + /// Gets whether the optionalgroup field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalGroup { + get { return optionalGroup_ != null; } + } + /// Clears the value of the optionalgroup field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalGroup() { + optionalGroup_ = null; + } + + /// Field number for the "string_string_map" field. + public const int StringStringMapFieldNumber = 536870010; + private static readonly pbc::MapField.Codec _map_stringStringMap_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 4294960082); + private readonly pbc::MapField stringStringMap_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField StringStringMap { + get { return stringStringMap_; } + } + + /// Field number for the "oneof_uint32" field. + public const int OneofUint32FieldNumber = 536870011; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint OneofUint32 { + get { return HasOneofUint32 ? (uint) oneofField_ : 0; } + set { + oneofField_ = value; + oneofFieldCase_ = OneofFieldOneofCase.OneofUint32; + } + } + /// Gets whether the "oneof_uint32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofUint32 { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32; } + } + /// Clears the value of the oneof if it's currently set to "oneof_uint32" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofUint32() { + if (HasOneofUint32) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_test_all_types" field. + 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; + } + } + /// Gets whether the "oneof_test_all_types" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofTestAllTypes { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofTestAllTypes; } + } + /// Clears the value of the oneof if it's currently set to "oneof_test_all_types" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofTestAllTypes() { + if (HasOneofTestAllTypes) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_string" field. + 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; + } + } + /// Gets whether the "oneof_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofString { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString; } + } + /// Clears the value of the oneof if it's currently set to "oneof_string" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofString() { + if (HasOneofString) { + ClearOneofField(); + } + } + + /// Field number for the "oneof_bytes" field. + 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; + } + } + /// Gets whether the "oneof_bytes" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOneofBytes { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes; } + } + /// Clears the value of the oneof if it's currently set to "oneof_bytes" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOneofBytes() { + if (HasOneofBytes) { + ClearOneofField(); + } + } + + private object oneofField_; + /// Enum of possible cases for the "oneof_field" oneof. + 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(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } + + #region Nested types + /// Container for nested types declared in the TestHugeFieldNumbers message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class OptionalGroup : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OptionalGroup()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "group_a" field. + 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; + } + } + /// Gets whether the "group_a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasGroupA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "group_a" field + [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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestExtensionInsideTable()); + private pb::UnknownFieldSet _unknownFields; + private pb::ExtensionSet _extensions; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "field1" field. + 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; + } + } + /// Gets whether the "field1" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField1 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "field1" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearField1() { + _hasBits0 &= ~1; + } + + /// Field number for the "field2" field. + 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; + } + } + /// Gets whether the "field2" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField2 { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "field2" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearField2() { + _hasBits0 &= ~2; + } + + /// Field number for the "field3" field. + 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; + } + } + /// Gets whether the "field3" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField3 { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "field3" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearField3() { + _hasBits0 &= ~4; + } + + /// Field number for the "field4" field. + 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; + } + } + /// Gets whether the "field4" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField4 { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "field4" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearField4() { + _hasBits0 &= ~8; + } + + /// Field number for the "field6" field. + 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; + } + } + /// Gets whether the "field6" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField6 { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "field6" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearField6() { + _hasBits0 &= ~16; + } + + /// Field number for the "field7" field. + 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; + } + } + /// Gets whether the "field7" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField7 { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "field7" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearField7() { + _hasBits0 &= ~32; + } + + /// Field number for the "field8" field. + 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; + } + } + /// Gets whether the "field8" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField8 { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "field8" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearField8() { + _hasBits0 &= ~64; + } + + /// Field number for the "field9" field. + 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; + } + } + /// Gets whether the "field9" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField9 { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "field9" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearField9() { + _hasBits0 &= ~128; + } + + /// Field number for the "field10" field. + 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; + } + } + /// Gets whether the "field10" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasField10 { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "field10" field + [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(pb::Extension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.Get(ref _extensions, extension); + } + public void SetExtension(pb::Extension extension, TValue value) { + pb::ExtensionSet.Set(ref _extensions, extension, value); + } + public bool HasExtension(pb::Extension extension) { + return pb::ExtensionSet.Has(ref _extensions, extension); + } + public void ClearExtension(pb::Extension 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 000000000000..d5f8589315e3 --- /dev/null +++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs @@ -0,0 +1,210 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: unittest_import.proto +// +#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 { + + /// Holder for reflection information generated from unittest_import.proto + public static partial class UnittestImportReflection { + + #region Descriptor + /// File descriptor for unittest_import.proto + 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, + } + + /// + /// To use an enum in a map, it must has the first value as 0. + /// + 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ImportMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "d" field. + 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; + } + } + /// Gets whether the "d" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasD { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "d" field + [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 000000000000..77f212176035 --- /dev/null +++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs @@ -0,0 +1,188 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: unittest_import_public.proto +// +#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 { + + /// Holder for reflection information generated from unittest_import_public.proto + public static partial class UnittestImportPublicReflection { + + #region Descriptor + /// File descriptor for unittest_import_public.proto + 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 { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PublicImportMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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); + } + + /// Field number for the "e" field. + 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; + } + } + /// Gets whether the "e" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasE { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "e" field + [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 9be7b70e0b9a..c5c2f382d378 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 @@ std::string FieldGeneratorBase::GetStringDefaultValueInternal(const FieldDescrip 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 50c2c9766d89..4042512b4b7f 100644 --- a/src/google/protobuf/compiler/csharp/csharp_helpers.cc +++ b/src/google/protobuf/compiler/csharp/csharp_helpers.cc @@ -287,12 +287,14 @@ uint GetGroupEndTag(const Descriptor* descriptor) { 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 0ddc38e0a1ff..73cc2a46004d 100644 --- a/src/google/protobuf/compiler/csharp/csharp_message.cc +++ b/src/google/protobuf/compiler/csharp/csharp_message.cc @@ -625,7 +625,7 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) { 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 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) { // 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; } From a976158b1cf345da7bf335e33d7a85ddf75ea5d5 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sat, 23 Mar 2019 06:40:22 -0500 Subject: [PATCH 08/34] Fix incorrect code gen for string fields with default values --- .../TestProtos/Unittest.cs | 36 +++++++++---------- .../compiler/csharp/csharp_field_base.cc | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs index 217e2d29edb8..97c909b659b2 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs @@ -882,7 +882,7 @@ public static partial class UnittestExtensions { public static readonly pb::Extension DefaultBoolExtension = new pb::Extension(73, pb::FieldCodec.ForBool(584, true)); public static readonly pb::Extension DefaultStringExtension = - new pb::Extension(74, pb::FieldCodec.ForString(594, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +aGVsbG8= +")))); + new pb::Extension(74, pb::FieldCodec.ForString(594, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("aGVsbG8=")))); public static readonly pb::Extension DefaultBytesExtension = new pb::Extension(75, pb::FieldCodec.ForBytes(602, pb::ByteString.FromBase64("d29ybGQ="))); public static readonly pb::Extension DefaultNestedEnumExtension = @@ -892,9 +892,9 @@ public static partial class UnittestExtensions { public static readonly pb::Extension DefaultImportEnumExtension = new pb::Extension(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 DefaultStringPieceExtension = - new pb::Extension(84, pb::FieldCodec.ForString(674, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +YWJj +")))); + new pb::Extension(84, pb::FieldCodec.ForString(674, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("YWJj")))); public static readonly pb::Extension DefaultCordExtension = - new pb::Extension(85, pb::FieldCodec.ForString(682, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +MTIz +")))); + new pb::Extension(85, pb::FieldCodec.ForString(682, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("MTIz")))); /// /// For oneof test /// @@ -2415,7 +2415,7 @@ public sealed partial class TestAllTypes : pb::IMessage { /// Field number for the "default_string" field. public const int DefaultStringFieldNumber = 74; - private readonly static string DefaultStringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +aGVsbG8= +")); + private readonly static string DefaultStringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("aGVsbG8=")); private string defaultString_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2533,7 +2533,7 @@ public sealed partial class TestAllTypes : pb::IMessage { /// Field number for the "default_string_piece" field. public const int DefaultStringPieceFieldNumber = 84; - private readonly static string DefaultStringPieceDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +YWJj +")); + private readonly static string DefaultStringPieceDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("YWJj")); private string defaultStringPiece_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2556,7 +2556,7 @@ public sealed partial class TestAllTypes : pb::IMessage { /// Field number for the "default_cord" field. public const int DefaultCordFieldNumber = 85; - private readonly static string DefaultCordDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +MTIz +")); + private readonly static string DefaultCordDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("MTIz")); private string defaultCord_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -6292,7 +6292,7 @@ public static partial class Extensions { /// compile. /// public static readonly pb::Extension Test = - new pb::Extension(1002, pb::FieldCodec.ForString(8018, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +dGVzdA== +")))); + new pb::Extension(1002, pb::FieldCodec.ForString(8018, global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("dGVzdA==")))); /// /// Used to test if generated extension name is correct when there are /// underscores. @@ -13094,7 +13094,7 @@ public sealed partial class TestExtremeDefaultValues : pb::IMessageField number for the "utf8_string" field. public const int Utf8StringFieldNumber = 6; - private readonly static string Utf8StringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +4Yi0 +")); + private readonly static string Utf8StringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("4Yi0")); private string utf8String_; /// @@ -13443,7 +13443,7 @@ public sealed partial class TestExtremeDefaultValues : pb::IMessageField number for the "cpp_trigraph" field. 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 readonly static string CppTrigraphDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("PyA/ID8/ID8/ID8/PyA/Py8gPz8t")); private string cppTrigraph_; /// @@ -13473,7 +13473,7 @@ public sealed partial class TestExtremeDefaultValues : pb::IMessageField number for the "string_with_zero" field. public const int StringWithZeroFieldNumber = 23; - private readonly static string StringWithZeroDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +aGVsAGxv +")); + private readonly static string StringWithZeroDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("aGVsAGxv")); private string stringWithZero_; /// @@ -13522,7 +13522,7 @@ public sealed partial class TestExtremeDefaultValues : pb::IMessageField number for the "string_piece_with_zero" field. public const int StringPieceWithZeroFieldNumber = 25; - private readonly static string StringPieceWithZeroDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +YWIAYw== +")); + private readonly static string StringPieceWithZeroDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("YWIAYw==")); private string stringPieceWithZero_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -13545,7 +13545,7 @@ public sealed partial class TestExtremeDefaultValues : pb::IMessageField number for the "cord_with_zero" field. public const int CordWithZeroFieldNumber = 26; - private readonly static string CordWithZeroDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +MTIAMw== +")); + private readonly static string CordWithZeroDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("MTIAMw==")); private string cordWithZero_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -13568,7 +13568,7 @@ public sealed partial class TestExtremeDefaultValues : pb::IMessageField number for the "replacement_string" field. public const int ReplacementStringFieldNumber = 27; - private readonly static string ReplacementStringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +JHt1bmtub3dufQ== +")); + private readonly static string ReplacementStringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("JHt1bmtub3dufQ==")); private string replacementString_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -16784,7 +16784,7 @@ public sealed partial class TestOneof2 : pb::IMessage { 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 +")); } + 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; @@ -16807,7 +16807,7 @@ public sealed partial class TestOneof2 : pb::IMessage { 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== +")); } + 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; @@ -16830,7 +16830,7 @@ public sealed partial class TestOneof2 : pb::IMessage { 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 +")); } + 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; @@ -16921,7 +16921,7 @@ public sealed partial class TestOneof2 : pb::IMessage { /// Field number for the "baz_string" field. public const int BazStringFieldNumber = 19; - private readonly static string BazStringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +QkFa +")); + private readonly static string BazStringDefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("QkFa")); private string bazString_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -21185,7 +21185,7 @@ public sealed partial class TestCommentInjectionMessage : pb::IMessageField number for the "a" field. public const int AFieldNumber = 1; - private readonly static string ADefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(" +Ki8gPC0gTmVpdGhlciBzaG91bGQgdGhpcy4= +")); + private readonly static string ADefaultValue = global::System.Text.Encoding.UTF8.GetString(global::System.Convert.FromBase64String("Ki8gPC0gTmVpdGhlciBzaG91bGQgdGhpcy4=")); private string a_; /// diff --git a/src/google/protobuf/compiler/csharp/csharp_field_base.cc b/src/google/protobuf/compiler/csharp/csharp_field_base.cc index c5c2f382d378..765bb0e317e7 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 @@ std::string FieldGeneratorBase::GetStringDefaultValueInternal(const FieldDescrip if (descriptor->default_value_string().empty()) return "\"\""; else - return "global::System.Text.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) { From 8b7fb7d0f4fdcc4ad1d6b917b592226c5dd9f4ce Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sat, 23 Mar 2019 11:41:57 -0500 Subject: [PATCH 09/34] Add tests for field presence and default values Adjust APIs for extensions to properly return default values for extensions Fix issues with IsInitialized and proto2 field reflection --- csharp/protos/unittest.proto | 6 + .../GeneratedMessageTest.cs | 146 +++ .../Google.Protobuf.Test/SampleMessages.cs | 52 + .../TestProtos/Unittest.cs | 1046 +++++++++++------ csharp/src/Google.Protobuf/Extension.cs | 2 + csharp/src/Google.Protobuf/ExtensionSet.cs | 5 + csharp/src/Google.Protobuf/ExtensionValue.cs | 12 + .../src/Google.Protobuf/MessageExtensions.cs | 19 +- .../Reflection/MessageDescriptor.cs | 22 + .../Reflection/ReflectionUtil.cs | 27 +- .../Reflection/SingleFieldAccessor.cs | 28 +- 11 files changed, 963 insertions(+), 402 deletions(-) diff --git a/csharp/protos/unittest.proto b/csharp/protos/unittest.proto index 15db33210c86..f47c7bf00be1 100644 --- a/csharp/protos/unittest.proto +++ b/csharp/protos/unittest.proto @@ -764,6 +764,12 @@ message TestRequiredOneof { } } +message TestRequiredMap { + map foo = 1; + message NestedMessage { + required int32 required_int32 = 1; + } +} // Test messages for packed fields diff --git a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs index 5694754e38b0..d24d7f84b481 100644 --- a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs +++ b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs @@ -33,6 +33,7 @@ using System; using System.IO; using Google.Protobuf.TestProtos; +using Proto2 = Google.Protobuf.TestProtos.Proto2; using NUnit.Framework; using System.Collections; using System.Collections.Generic; @@ -111,6 +112,50 @@ public void DefaultValues() Assert.AreEqual("", message.OneofString); Assert.AreEqual(ByteString.Empty, message.OneofBytes); Assert.IsNull(message.OneofNestedMessage); + + // proto2 default values + var message2 = new Proto2.TestAllTypes(); + Assert.AreEqual(true, message2.DefaultBool); + Assert.AreEqual(ByteString.CopyFromUtf8("world"), message2.DefaultBytes); + Assert.AreEqual("123", message2.DefaultCord); + Assert.AreEqual(52e3, message2.DefaultDouble); + Assert.AreEqual(47, message2.DefaultFixed32); + Assert.AreEqual(48, message2.DefaultFixed64); + Assert.AreEqual(51.5, message2.DefaultFloat); + Assert.AreEqual(Proto2.ForeignEnum.ForeignBar, message2.DefaultForeignEnum); + Assert.AreEqual(Proto2.ImportEnum.ImportBar, message2.DefaultImportEnum); + Assert.AreEqual(41, message2.DefaultInt32); + Assert.AreEqual(42, message2.DefaultInt64); + Assert.AreEqual(Proto2.TestAllTypes.Types.NestedEnum.Bar, message2.DefaultNestedEnum); + Assert.AreEqual(49, message2.DefaultSfixed32); + Assert.AreEqual(-50, message2.DefaultSfixed64); + Assert.AreEqual(-45, message2.DefaultSint32); + Assert.AreEqual(46, message2.DefaultSint64); + Assert.AreEqual("hello", message2.DefaultString); + Assert.AreEqual("abc", message2.DefaultStringPiece); + Assert.AreEqual(43, message2.DefaultUint32); + Assert.AreEqual(44, message2.DefaultUint64); + + Assert.False(message2.HasDefaultBool); + Assert.False(message2.HasDefaultBytes); + Assert.False(message2.HasDefaultCord); + Assert.False(message2.HasDefaultDouble); + Assert.False(message2.HasDefaultFixed32); + Assert.False(message2.HasDefaultFixed64); + Assert.False(message2.HasDefaultFloat); + Assert.False(message2.HasDefaultForeignEnum); + Assert.False(message2.HasDefaultImportEnum); + Assert.False(message2.HasDefaultInt32); + Assert.False(message2.HasDefaultInt64); + Assert.False(message2.HasDefaultNestedEnum); + Assert.False(message2.HasDefaultSfixed32); + Assert.False(message2.HasDefaultSfixed64); + Assert.False(message2.HasDefaultSint32); + Assert.False(message2.HasDefaultSint64); + Assert.False(message2.HasDefaultString); + Assert.False(message2.HasDefaultStringPiece); + Assert.False(message2.HasDefaultUint32); + Assert.False(message2.HasDefaultUint64); } [Test] @@ -123,6 +168,107 @@ public void NullStringAndBytesRejected() Assert.Throws(() => message.OneofBytes = null); } + [Test] + public void FieldPresence() + { + var message = new Proto2.TestAllTypes(); + + Assert.False(message.HasOptionalBool); + Assert.False(message.OptionalBool); + + message.OptionalBool = true; + + Assert.True(message.HasOptionalBool); + Assert.True(message.OptionalBool); + + message.OptionalBool = false; + + Assert.True(message.HasOptionalBool); + Assert.False(message.OptionalBool); + + message.ClearOptionalBool(); + + Assert.False(message.HasOptionalBool); + Assert.False(message.OptionalBool); + + Assert.False(message.HasDefaultBool); + Assert.True(message.DefaultBool); + + message.DefaultBool = false; + + Assert.True(message.HasDefaultBool); + Assert.False(message.DefaultBool); + + message.DefaultBool = true; + + Assert.True(message.HasDefaultBool); + Assert.True(message.DefaultBool); + + message.ClearDefaultBool(); + + Assert.False(message.HasDefaultBool); + Assert.True(message.DefaultBool); + } + + [Test] + public void RequiredFields() + { + var message = new Proto2.TestRequired(); + Assert.False(message.IsInitialized()); + + message.A = 1; + message.B = 2; + message.C = 3; + + Assert.True(message.IsInitialized()); + } + + [Test] + public void RequiredFieldsInExtensions() + { + var message = new Proto2.TestAllExtensions(); + Assert.True(message.IsInitialized()); + + message.SetExtension(Proto2.TestRequired.Extensions.Single, new Proto2.TestRequired()); + + Assert.False(message.IsInitialized()); + + var extensionMessage = message.GetExtension(Proto2.TestRequired.Extensions.Single); + extensionMessage.A = 1; + extensionMessage.B = 2; + extensionMessage.C = 3; + + Assert.True(message.IsInitialized()); + + message.RegisterExtension(Proto2.TestRequired.Extensions.Multi); + + Assert.True(message.IsInitialized()); + + message.GetExtension(Proto2.TestRequired.Extensions.Multi).Add(new Proto2.TestRequired()); + + Assert.False(message.IsInitialized()); + + extensionMessage = message.GetExtension(Proto2.TestRequired.Extensions.Multi)[0]; + extensionMessage.A = 1; + extensionMessage.B = 2; + extensionMessage.C = 3; + + Assert.True(message.IsInitialized()); + } + + [Test] + public void RequiredFieldInNestedMessageMapValue() + { + var message = new Proto2.TestRequiredMap(); + message.Foo.Add(0, new Proto2.TestRequiredMap.Types.NestedMessage()); + + Assert.False(message.IsInitialized()); + + message.Foo[0].RequiredInt32 = 12; + + Assert.True(message.IsInitialized()); + } + [Test] public void RoundTrip_Empty() { diff --git a/csharp/src/Google.Protobuf.Test/SampleMessages.cs b/csharp/src/Google.Protobuf.Test/SampleMessages.cs index ffa4e2a7c27d..68f7e27db999 100644 --- a/csharp/src/Google.Protobuf.Test/SampleMessages.cs +++ b/csharp/src/Google.Protobuf.Test/SampleMessages.cs @@ -32,6 +32,7 @@ using System; using Google.Protobuf.TestProtos; +using Proto2 = Google.Protobuf.TestProtos.Proto2; namespace Google.Protobuf { @@ -95,5 +96,56 @@ public static TestAllTypes CreateFullTestAllTypes() OneofString = "Oneof string" }; } + + public static Proto2.TestAllTypes CreateFullTestAllTypesProto2() + { + return new Proto2.TestAllTypes + { + OptionalBool = true, + OptionalBytes = ByteString.CopyFrom(1, 2, 3, 4), + OptionalDouble = 23.5, + OptionalFixed32 = 23, + OptionalFixed64 = 1234567890123, + OptionalFloat = 12.25f, + OptionalForeignEnum = Proto2.ForeignEnum.ForeignBar, + OptionalForeignMessage = new Proto2.ForeignMessage { C = 10 }, + OptionalImportEnum = Proto2.ImportEnum.ImportBaz, + OptionalImportMessage = new Proto2.ImportMessage { D = 20 }, + OptionalInt32 = 100, + OptionalInt64 = 3210987654321, + OptionalNestedEnum = Proto2.TestAllTypes.Types.NestedEnum.Foo, + OptionalNestedMessage = new Proto2.TestAllTypes.Types.NestedMessage { Bb = 35 }, + OptionalPublicImportMessage = new Proto2.PublicImportMessage { E = 54 }, + OptionalSfixed32 = -123, + OptionalSfixed64 = -12345678901234, + OptionalSint32 = -456, + OptionalSint64 = -12345678901235, + OptionalString = "test", + OptionalUint32 = UInt32.MaxValue, + OptionalUint64 = UInt64.MaxValue, + RepeatedBool = { true, false }, + RepeatedBytes = { ByteString.CopyFrom(1, 2, 3, 4), ByteString.CopyFrom(5, 6), ByteString.CopyFrom(new byte[1000]) }, + RepeatedDouble = { -12.25, 23.5 }, + RepeatedFixed32 = { UInt32.MaxValue, 23 }, + RepeatedFixed64 = { UInt64.MaxValue, 1234567890123 }, + RepeatedFloat = { 100f, 12.25f }, + RepeatedForeignEnum = { Proto2.ForeignEnum.ForeignFoo, Proto2.ForeignEnum.ForeignBar }, + RepeatedForeignMessage = { new Proto2.ForeignMessage(), new Proto2.ForeignMessage { C = 10 } }, + RepeatedImportEnum = { Proto2.ImportEnum.ImportBaz, Proto2.ImportEnum.ImportFoo }, + RepeatedImportMessage = { new Proto2.ImportMessage { D = 20 }, new Proto2.ImportMessage { D = 25 } }, + RepeatedInt32 = { 100, 200 }, + RepeatedInt64 = { 3210987654321, Int64.MaxValue }, + RepeatedNestedEnum = { Proto2.TestAllTypes.Types.NestedEnum.Foo, Proto2.TestAllTypes.Types.NestedEnum.Neg }, + RepeatedNestedMessage = { new Proto2.TestAllTypes.Types.NestedMessage { Bb = 35 }, new Proto2.TestAllTypes.Types.NestedMessage { Bb = 10 } }, + RepeatedSfixed32 = { -123, 123 }, + RepeatedSfixed64 = { -12345678901234, 12345678901234 }, + RepeatedSint32 = { -456, 100 }, + RepeatedSint64 = { -12345678901235, 123 }, + RepeatedString = { "foo", "bar" }, + RepeatedUint32 = { UInt32.MaxValue, UInt32.MinValue }, + RepeatedUint64 = { UInt64.MaxValue, UInt32.MinValue }, + OneofString = "Oneof string" + }; + } } } \ No newline at end of file diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs index 97c909b659b2..b321ba3ae42a 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs @@ -281,386 +281,391 @@ public static partial class UnittestReflection { "Cgdmb29faW50GAEgASgFSAASFAoKZm9vX3N0cmluZxgCIAEoCUgAElAKC2Zv", "b19tZXNzYWdlGAMgASgLMjkucHJvdG9idWZfdW5pdHRlc3RfcHJvdG8yLlRl", "c3RSZXF1aXJlZE9u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rZWRfc2ZpeGVkMzIYYiADKA9CAhAAEh0KEXVucGFj", - "a2VkX3NmaXhlZDY0GGMgAygQQgIQABIaCg51bnBhY2tlZF9mbG9hdBhkIAMo", - "AkICEAASGwoPdW5wYWNrZWRfZG91YmxlGGUgAygBQgIQABIZCg11bnBhY2tl", - "ZF9ib29sGGYgAygIQgIQABJACg11bnBhY2tlZF9lbnVtGGcgAygOMiUucHJv", - "dG9idWZfdW5pdHRlc3RfcHJvdG8yLkZvcmVpZ25FbnVtQgIQACIgChRUZXN0", - "UGFja2VkRXh0ZW5zaW9ucyoICAEQgICAgAIiIgoWVGVzdFVucGFja2VkRXh0", - "ZW5zaW9ucyoICAEQgICAgAIitQQKFVRlc3REeW5hbWljRXh0ZW5zaW9ucxIZ", - "ChBzY2FsYXJfZXh0ZW5zaW9uGNAPIAEoBxI+Cg5lbnVtX2V4dGVuc2lvbhjR", - "DyABKA4yJS5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIuRm9yZWlnbkVudW0S", - "YAoWZHluYW1pY19lbnVtX2V4dGVuc2lvbhjSDyABKA4yPy5wcm90b2J1Zl91", - "bml0dGVzdF9wcm90bzIuVGVzdER5bmFtaWNFeHRlbnNpb25zLkR5bmFtaWNF", - "bnVtVHlwZRJEChFtZXNzYWdlX2V4dGVuc2lvbhjTDyABKAsyKC5wcm90b2J1", - "Zl91bml0dGVzdF9wcm90bzIuRm9yZWlnbk1lc3NhZ2USZgoZZHluYW1pY19t", - "ZXNzYWdlX2V4dGVuc2lvbhjUDyABKAsyQi5wcm90b2J1Zl91bml0dGVzdF9w", - "cm90bzIuVGVzdER5bmFtaWNFeHRlbnNpb25zLkR5bmFtaWNNZXNzYWdlVHlw", - "ZRIbChJyZXBlYXRlZF9leHRlbnNpb24Y1Q8gAygJEh0KEHBhY2tlZF9leHRl", - "bnNpb24Y1g8gAygRQgIQARosChJEeW5hbWljTWVzc2FnZVR5cGUSFgoNZHlu", - "YW1pY19maWVsZBi0ECABKAUiRwoPRH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- "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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A0ICEAASGwoPdW5wYWNrZWRfdWludDMyGFwgAygNQgIQABIbCg91", + "bnBhY2tlZF91aW50NjQYXSADKARCAhAAEhsKD3VucGFja2VkX3NpbnQzMhhe", + "IAMoEUICEAASGwoPdW5wYWNrZWRfc2ludDY0GF8gAygSQgIQABIcChB1bnBh", + "Y2tlZF9maXhlZDMyGGAgAygHQgIQABIcChB1bnBhY2tlZF9maXhlZDY0GGEg", + "AygGQgIQABIdChF1bnBhY2tlZF9zZml4ZWQzMhhiIAMoD0ICEAASHQoRdW5w", + "YWNrZWRfc2ZpeGVkNjQYYyADKBBCAhAAEhoKDnVucGFja2VkX2Zsb2F0GGQg", + "AygCQgIQABIbCg91bnBhY2tlZF9kb3VibGUYZSADKAFCAhAAEhkKDXVucGFj", + "a2VkX2Jvb2wYZiADKAhCAhAAEkAKDXVucGFja2VkX2VudW0YZyADKA4yJS5w", + "cm90b2J1Zl91bml0dGVzdF9wcm90bzIuRm9yZWlnbkVudW1CAhAAIiAKFFRl", + "c3RQYWNrZWRFeHRlbnNpb25zKggIARCAgICAAiIiChZUZXN0VW5wYWNrZWRF", + "eHRlbnNpb25zKggIARCAgICAAiK1BAoVVGVzdER5bmFtaWNFeHRlbnNpb25z", + "EhkKEHNjYWxhcl9leHRlbnNpb24Y0A8gASgHEj4KDmVudW1fZXh0ZW5zaW9u", + "GNEPIAEoDjIlLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5Gb3JlaWduRW51", + "bRJgChZkeW5hbWljX2VudW1fZXh0ZW5zaW9uGNIPIAEoDjI/LnByb3RvYnVm", + "X3VuaXR0ZXN0X3Byb3RvMi5UZXN0RHluYW1pY0V4dGVuc2lvbnMuRHluYW1p", + "Y0VudW1UeXBlEkQKEW1lc3NhZ2VfZXh0ZW5zaW9uGNMPIAEoCzIoLnByb3Rv", + "YnVmX3VuaXR0ZXN0X3Byb3RvMi5Gb3JlaWduTWVzc2FnZRJmChlkeW5hbWlj", + "X21lc3NhZ2VfZXh0Z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MuUHJvdG8y")); + "bnMYZCADKAJCAhAAOlcKGXVucGFja2VkX2RvdWJsZV9leHRlbnNpb24SMC5w", + "cm90b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdFVucGFja2VkRXh0ZW5zaW9u", + "cxhlIAMoAUICEAA6VQoXdW5wYWNrZWRfYm9vbF9leHRlbnNpb24SMC5wcm90", + "b2J1Zl91bml0dGVzdF9wcm90bzIuVGVzdFVucGFja2VkRXh0ZW5zaW9ucxhm", + "IAMoCEICEAA6fAoXdW5wYWNrZWRfZW51bV9leHRlbnNpb24SMC5wcm90b2J1", + "Zl91bml0dGVzdF9wcm90bzIuVGVzdFVucGFja2VkRXh0ZW5zaW9ucxhnIAMo", + "DjIlLnByb3RvYnVmX3VuaXR0ZXN0X3Byb3RvMi5Gb3JlaWduRW51bUICEAA6", + "cgoOdGVzdF9hbGxfdHlwZXMSLi5wcm90b2J1Zl91bml0dGVzdF9wcm90bzIu", + "VGVzdEh1Z2VGaWVsZE51bWJlcnMY4Kr//wEgASgLMiYucHJvdG9idWZfdW5p", + "dHRlc3RfcHJvdG8yLlRlc3RBbGxUeXBlczphCiV0ZXN0X2V4dGVuc2lvbl9p", + "bnNpZGVfdGFibGVfZXh0ZW5zaW9uEjIucHJvdG9idWZfdW5pdHRlc3RfcHJv", + "dG8yLlRlc3RFeHRlbnNpb25JbnNpZGVUYWJsZRgFIAEoBUIySAGAAQGIAQGQ", + "AQH4AQGqAiFHb29nbGUuUHJvdG9idWYuVGVzdFByb3Rvcy5Qcm90bzI=")); 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[] { @@ -716,6 +721,7 @@ public static partial class UnittestReflection { 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.TestRequiredMap), global::Google.Protobuf.TestProtos.Proto2.TestRequiredMap.Parser, new[]{ "Foo" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.Proto2.TestRequiredMap.Types.NestedMessage), global::Google.Protobuf.TestProtos.Proto2.TestRequiredMap.Types.NestedMessage.Parser, new[]{ "RequiredInt32" }, 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), @@ -18148,6 +18154,278 @@ public sealed partial class NestedMessage : pb::IMessage { } + public sealed partial class TestRequiredMap : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestRequiredMap()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser 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 TestRequiredMap() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TestRequiredMap(TestRequiredMap other) : this() { + foo_ = other.foo_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TestRequiredMap Clone() { + return new TestRequiredMap(this); + } + + /// Field number for the "foo" field. + public const int FooFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_foo_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.Proto2.TestRequiredMap.Types.NestedMessage.Parser), 10); + private readonly pbc::MapField foo_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField Foo { + get { return foo_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TestRequiredMap); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TestRequiredMap other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!Foo.Equals(other.Foo)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= Foo.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) { + foo_.WriteTo(output, _map_foo_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += foo_.CalculateSize(_map_foo_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TestRequiredMap other) { + if (other == null) { + return; + } + foo_.Add(other.foo_); + _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: { + foo_.AddEntriesFrom(input, _map_foo_codec); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the TestRequiredMap message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class NestedMessage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NestedMessage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Protobuf.TestProtos.Proto2.TestRequiredMap.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; + requiredInt32_ = other.requiredInt32_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NestedMessage Clone() { + return new NestedMessage(this); + } + + /// Field number for the "required_int32" field. + public const int RequiredInt32FieldNumber = 1; + private readonly static int RequiredInt32DefaultValue = 0; + + private int requiredInt32_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int RequiredInt32 { + get { if ((_hasBits0 & 1) != 0) { return requiredInt32_; } else { return RequiredInt32DefaultValue; } } + set { + _hasBits0 |= 1; + requiredInt32_ = value; + } + } + /// Gets whether the "required_int32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasRequiredInt32 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "required_int32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearRequiredInt32() { + _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 (RequiredInt32 != other.RequiredInt32) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (HasRequiredInt32) hash ^= RequiredInt32.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 (HasRequiredInt32) { + output.WriteRawTag(8); + output.WriteInt32(RequiredInt32); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (HasRequiredInt32) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(RequiredInt32); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(NestedMessage other) { + if (other == null) { + return; + } + if (other.HasRequiredInt32) { + RequiredInt32 = other.RequiredInt32; + } + _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: { + RequiredInt32 = input.ReadInt32(); + break; + } + } + } + } + + } + + } + #endregion + + } + public sealed partial class TestPackedTypes : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestPackedTypes()); private pb::UnknownFieldSet _unknownFields; @@ -18156,7 +18434,7 @@ public sealed partial class TestPackedTypes : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[47]; } + get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[48]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -18555,7 +18833,7 @@ public sealed partial class TestUnpackedTypes : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[48]; } + get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[49]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -18951,7 +19229,7 @@ public sealed partial class TestPackedExtensions : pb::IExtensionMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[55]; } + get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[56]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -21405,7 +21683,7 @@ public sealed partial class FooResponse : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[56]; } + get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[57]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -21506,7 +21784,7 @@ public sealed partial class FooClientMessage : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[57]; } + get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[58]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -21607,7 +21885,7 @@ public sealed partial class FooServerMessage : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[58]; } + get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[59]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -21708,7 +21986,7 @@ public sealed partial class BarRequest : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[59]; } + get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[60]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -21809,7 +22087,7 @@ public sealed partial class BarResponse : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[60]; } + get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[61]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -21911,7 +22189,7 @@ public sealed partial class TestJsonName : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[61]; } + get { return global::Google.Protobuf.TestProtos.Proto2.UnittestReflection.Descriptor.MessageTypes[62]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -22261,7 +22539,7 @@ public sealed partial class TestHugeFieldNumbers : pb::IExtensionMessage codec) : base(fieldNumber) internal override Type TargetType => typeof(TTarget); + internal TValue DefaultValue => codec.DefaultValue; + internal override IExtensionValue CreateValue() { return new ExtensionValue(codec); diff --git a/csharp/src/Google.Protobuf/ExtensionSet.cs b/csharp/src/Google.Protobuf/ExtensionSet.cs index a46e4997abfa..f6d1ff2d17dd 100644 --- a/csharp/src/Google.Protobuf/ExtensionSet.cs +++ b/csharp/src/Google.Protobuf/ExtensionSet.cs @@ -330,5 +330,10 @@ public void WriteTo(CodedOutputStream stream) value.WriteTo(stream); } } + + internal bool IsInitialized() + { + return ValuesByNumber.Values.All(v => v.IsInitialized()); + } } } diff --git a/csharp/src/Google.Protobuf/ExtensionValue.cs b/csharp/src/Google.Protobuf/ExtensionValue.cs index 181e88264c59..6b224ed441dd 100644 --- a/csharp/src/Google.Protobuf/ExtensionValue.cs +++ b/csharp/src/Google.Protobuf/ExtensionValue.cs @@ -32,6 +32,7 @@ using Google.Protobuf.Collections; using System; +using System.Linq; namespace Google.Protobuf { @@ -41,6 +42,7 @@ internal interface IExtensionValue : IEquatable, IDeepCloneable void MergeFrom(IExtensionValue value); void WriteTo(CodedOutputStream output); int CalculateSize(); + bool IsInitialized(); } internal sealed class ExtensionValue : IExtensionValue @@ -137,6 +139,11 @@ public void SetValue(T value) } public bool HasValue => hasValue; + + public bool IsInitialized() + { + return HasValue && field is IMessage && (field as IMessage).IsInitialized(); + } } internal sealed class RepeatedExtensionValue : IExtensionValue @@ -203,5 +210,10 @@ public void WriteTo(CodedOutputStream output) } public RepeatedField GetValue() => field; + + public bool IsInitialized() + { + return field.All(m => m is IMessage && (m as IMessage).IsInitialized()); + } } } diff --git a/csharp/src/Google.Protobuf/MessageExtensions.cs b/csharp/src/Google.Protobuf/MessageExtensions.cs index 5ca772f58e8d..d297a118c508 100644 --- a/csharp/src/Google.Protobuf/MessageExtensions.cs +++ b/csharp/src/Google.Protobuf/MessageExtensions.cs @@ -148,11 +148,16 @@ public static ByteString ToByteString(this IMessage message) /// public static bool IsInitialized(this IMessage message) { - if (message.Descriptor.File.Proto.Syntax != "proto2") + if (message.Descriptor.File.Proto.Syntax == "proto3") { return true; } + if (!message.Descriptor.GetIsExtensionsInitialized(message)) + { + return false; + } + return message.Descriptor .Fields .InDeclarationOrder() @@ -160,8 +165,16 @@ public static bool IsInitialized(this IMessage message) { if (f.IsMap) { - var map = (IDictionary)f.Accessor.GetValue(message); - return map.Values.OfType().All(IsInitialized); + var valueField = f.MessageType.Fields[2]; + if (valueField.FieldType == FieldType.Message) + { + var map = (IDictionary)f.Accessor.GetValue(message); + return map.Values.Cast().All(IsInitialized); + } + else + { + return true; + } } else if (f.IsRepeated && f.FieldType == FieldType.Message || f.FieldType == FieldType.Group) { diff --git a/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs index 4ca9e369894a..e375ad9fab15 100644 --- a/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs @@ -34,6 +34,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using System.Reflection; #if NET35 // Needed for ReadOnlyDictionary, which does not exist in .NET 3.5 using Google.Protobuf.Collections; @@ -63,6 +64,7 @@ public sealed class MessageDescriptor : DescriptorBase private readonly IList fieldsInDeclarationOrder; private readonly IList fieldsInNumberOrder; private readonly IDictionary jsonFieldMap; + private Func extensionSetIsInitialized; internal MessageDescriptor(DescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int typeIndex, GeneratedClrTypeInfo generatedCodeInfo) : base(file, file.ComputeFullName(parent, proto.Name), typeIndex) @@ -134,6 +136,26 @@ internal override IReadOnlyList GetNestedDescriptorListForField( internal DescriptorProto Proto { get; } + internal bool GetIsExtensionsInitialized(IMessage message) + { + if (!object.ReferenceEquals(message.Descriptor, this)) + { + throw new InvalidOperationException("message's descriptor reference does not match this"); + } + + if (Proto.ExtensionRange.Count == 0) + { + return true; + } + + if (extensionSetIsInitialized == null) + { + extensionSetIsInitialized = ReflectionUtil.CreateIsInitializedCaller(ClrType); + } + + return extensionSetIsInitialized(message); + } + /// /// The CLR type used to represent message instances from this descriptor. /// diff --git a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs index ca9c808343b9..e92efd52e9d5 100644 --- a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs +++ b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs @@ -71,7 +71,7 @@ static ReflectionUtil() /// /// Empty Type[] used when calling GetProperty to force property instead of indexer fetching. - /// + /// getFieldFunc internal static readonly Type[] EmptyTypes = new Type[0]; /// @@ -115,6 +115,9 @@ static ReflectionUtil() internal static Func CreateFuncIMessageBool(MethodInfo method) => GetReflectionHelper(method.DeclaringType, method.ReturnType).CreateFuncIMessageBool(method); + internal static Func CreateIsInitializedCaller(Type msg) => + ((IExtensionSetReflector)Activator.CreateInstance(typeof(ExtensionSetReflector<>).MakeGenericType(msg))).CreateIsInitializedCaller(); + /// /// Creates a delegate which will execute the given method after casting the first argument to /// the type that declares the method, and the second argument to the first parameter type of the method. @@ -150,6 +153,11 @@ internal interface IExtensionReflectionHelper void ClearExtension(IMessage message); } + private interface IExtensionSetReflector + { + Func CreateIsInitializedCaller(); + } + private class ReflectionHelper : IReflectionHelper { @@ -300,6 +308,23 @@ public void ClearExtension(IMessage message) } } + private class ExtensionSetReflector : IExtensionSetReflector where T1 : IExtendableMessage + { + public Func CreateIsInitializedCaller() + { + var field = typeof(T1).GetTypeInfo().GetDeclaredField("_extensions"); + var initializedFunc = (Func, bool>) + typeof(ExtensionSet) + .GetTypeInfo() + .GetDeclaredMethod("IsInitialized") + .CreateDelegate(typeof(Func, bool>)); + return (m) => { + var set = field.GetValue(m) as ExtensionSet; + return set == null || initializedFunc(set); + }; + } + } + // Runtime compatibility checking code - see ReflectionHelper.CreateFuncIMessageInt32 for // details about why we're doing this. diff --git a/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs b/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs index dfc5b6263c60..dc6e0ca9ae18 100644 --- a/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs +++ b/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs @@ -57,20 +57,7 @@ internal SingleFieldAccessor(PropertyInfo property, FieldDescriptor descriptor) throw new ArgumentException("Not all required properties/methods available"); } setValueDelegate = ReflectionUtil.CreateActionIMessageObject(property.GetSetMethod()); - if (descriptor.File.Proto.Syntax == "proto2") - { - MethodInfo hasMethod = property.DeclaringType.GetRuntimeProperty("Has" + property.Name).GetMethod; - if (hasMethod == null) { - throw new ArgumentException("Not all required properties/methods are available"); - } - hasDelegate = ReflectionUtil.CreateFuncIMessageBool(hasMethod); - MethodInfo clearMethod = property.DeclaringType.GetRuntimeMethod("Clear" + property.Name, ReflectionUtil.EmptyTypes); - if (clearMethod == null) { - throw new ArgumentException("Not all required properties/methods are available"); - } - clearDelegate = ReflectionUtil.CreateActionIMessage(clearMethod); - } - else + if (descriptor.File.Proto.Syntax == "proto3") { hasDelegate = message => { throw new InvalidOperationException("HasValue is not implemented for proto3 fields"); @@ -85,6 +72,19 @@ internal SingleFieldAccessor(PropertyInfo property, FieldDescriptor descriptor) : Activator.CreateInstance(clrType); clearDelegate = message => SetValue(message, defaultValue); } + else + { + MethodInfo hasMethod = property.DeclaringType.GetRuntimeProperty("Has" + property.Name).GetMethod; + if (hasMethod == null) { + throw new ArgumentException("Not all required properties/methods are available"); + } + hasDelegate = ReflectionUtil.CreateFuncIMessageBool(hasMethod); + MethodInfo clearMethod = property.DeclaringType.GetRuntimeMethod("Clear" + property.Name, ReflectionUtil.EmptyTypes); + if (clearMethod == null) { + throw new ArgumentException("Not all required properties/methods are available"); + } + clearDelegate = ReflectionUtil.CreateActionIMessage(clearMethod); + } } public override void Clear(IMessage message) From 8e917d1688d5a7d2f36a42c253733fd9dff8048b Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sat, 23 Mar 2019 14:57:02 -0500 Subject: [PATCH 10/34] Added FieldDescriptor.IsExtension and sealed ExtensionCollection --- csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs | 2 +- csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs b/csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs index 9cb6abaf9a7d..38a97fc4b0a8 100644 --- a/csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs +++ b/csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs @@ -39,7 +39,7 @@ namespace Google.Protobuf.Reflection /// /// A collection to simplify retrieving the descriptors of extensions in a descriptor for a message /// - public class ExtensionCollection + public sealed class ExtensionCollection { private IDictionary> extensionsByTypeInDeclarationOrder; private IDictionary> extensionsByTypeInNumberOrder; diff --git a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs index c06328f99ce9..482b3f823a09 100644 --- a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs @@ -203,6 +203,11 @@ private static FieldType GetFieldTypeFromProtoType(FieldDescriptorProto.Types.Ty /// public bool IsPacked => File.Proto.Syntax == "proto2" ? Proto.Options?.Packed ?? false : !Proto.Options.HasPacked || Proto.Options.Packed; + /// + /// Returns true if this field extends another message type; false otherwise. + /// + public bool IsExtension => Proto.HasExtendee; + /// /// Returns the type of the field. /// From 5b2f2c52923fbed92d9527fad19cca1e42300c76 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sat, 23 Mar 2019 15:11:52 -0500 Subject: [PATCH 11/34] file descriptors and the syntax field are really weird with proto2 --- csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs index 482b3f823a09..5c430e68c7ea 100644 --- a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs @@ -201,7 +201,7 @@ private static FieldType GetFieldTypeFromProtoType(FieldDescriptorProto.Types.Ty /// /// Returns true if this field is a packed, repeated field; false otherwise. /// - public bool IsPacked => File.Proto.Syntax == "proto2" ? Proto.Options?.Packed ?? false : !Proto.Options.HasPacked || Proto.Options.Packed; + public bool IsPacked => File.Proto.Syntax != "proto3" ? Proto.Options?.Packed ?? false : !Proto.Options.HasPacked || Proto.Options.Packed; /// /// Returns true if this field extends another message type; false otherwise. From 011427c9d8c350d770ba9f678c181ac6abc366b9 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Fri, 3 May 2019 21:34:48 -0500 Subject: [PATCH 12/34] Fix issues from interactive rebase and regenerate code --- .../GeneratedMessageTest.cs | 2 +- .../Reflection/CustomOptionsTest.cs | 2 +- .../TestProtos/TestMessagesProto2.cs | 534 +++++++++++++++++- .../TestProtos/Unittest.cs | 110 ++-- csharp/src/Google.Protobuf/Extension.cs | 2 - .../Google.Protobuf/Reflection/Descriptor.cs | 18 +- 6 files changed, 599 insertions(+), 69 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs index d24d7f84b481..fd2d52aa3f48 100644 --- a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs +++ b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs @@ -240,7 +240,7 @@ public void RequiredFieldsInExtensions() Assert.True(message.IsInitialized()); - message.RegisterExtension(Proto2.TestRequired.Extensions.Multi); + message.GetOrRegisterExtension(Proto2.TestRequired.Extensions.Multi); Assert.True(message.IsInitialized()); diff --git a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs index f5c21c630611..527fa8ae1cf5 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs @@ -176,7 +176,7 @@ public void AggregateOptions() AssertOption(new Aggregate { S = "FieldAnnotation" }, fieldOptions.TryGetMessage, Fieldopt, AggregateMessage.Descriptor.Fields["fieldname"].GetOption); } - private void AssertOption(T expected, OptionFetcher fetcher, Extension extension, Func, T> descriptorOptionFetcher) where D : IExtensionMessage + private void AssertOption(T expected, OptionFetcher fetcher, Extension extension, Func, T> descriptorOptionFetcher) where D : IExtendableMessage { T customOptionsValue; T extensionValue = descriptorOptionFetcher(extension); diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs index 355463cf8a68..a2577dfc0fb4 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs @@ -25,7 +25,7 @@ public static partial class TestMessagesProto2Reflection { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "Cipnb29nbGUvcHJvdG9idWYvdGVzdF9tZXNzYWdlc19wcm90bzIucHJvdG8S", - "HXByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8yIt4yChJUZXN0QWxsVHlw", + "HXByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8yIuYyChJUZXN0QWxsVHlw", "ZXNQcm90bzISFgoOb3B0aW9uYWxfaW50MzIYASABKAUSFgoOb3B0aW9uYWxf", "aW50NjQYAiABKAMSFwoPb3B0aW9uYWxfdWludDMyGAMgASgNEhcKD29wdGlv", "bmFsX3VpbnQ2NBgEIAEoBBIXCg9vcHRpb25hbF9zaW50MzIYBSABKBESFwoP", @@ -170,12 +170,19 @@ public static partial class TestMessagesProto2Reflection { "ZXMucHJvdG8yLlRlc3RBbGxUeXBlc1Byb3RvMi5NZXNzYWdlU2V0Q29ycmVj", "dEV4dGVuc2lvbjIiOQoKTmVzdGVkRW51bRIHCgNGT08QABIHCgNCQVIQARIH", "CgNCQVoQAhIQCgNORUcQ////////////ASoFCHgQyQFCDQoLb25lb2ZfZmll", - "bGQiIQoURm9yZWlnbk1lc3NhZ2VQcm90bzISCQoBYxgBIAEoBSpGChFGb3Jl", - "aWduRW51bVByb3RvMhIPCgtGT1JFSUdOX0ZPTxAAEg8KC0ZPUkVJR05fQkFS", - "EAESDwoLRk9SRUlHTl9CQVoQAjpKCg9leHRlbnNpb25faW50MzISMS5wcm90", - "b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMi5UZXN0QWxsVHlwZXNQcm90bzIY", - "eCABKAVCLwooY29tLmdvb2dsZS5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnBy", - "b3RvMkgB+AEB")); + "bGRKBgjoBxCQTiIhChRGb3JlaWduTWVzc2FnZVByb3RvMhIJCgFjGAEgASgF", + "IsECChVVbmtub3duVG9UZXN0QWxsVHlwZXMSFwoOb3B0aW9uYWxfaW50MzIY", + "6QcgASgFEhgKD29wdGlvbmFsX3N0cmluZxjqByABKAkSTAoObmVzdGVkX21l", + "c3NhZ2UY6wcgASgLMjMucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzIu", + "Rm9yZWlnbk1lc3NhZ2VQcm90bzISWgoNb3B0aW9uYWxncm91cBjsByABKAoy", + "Qi5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMi5Vbmtub3duVG9UZXN0", + "QWxsVHlwZXMuT3B0aW9uYWxHcm91cBIWCg1vcHRpb25hbF9ib29sGO4HIAEo", + "CBIXCg5yZXBlYXRlZF9pbnQzMhjzByADKAUaGgoNT3B0aW9uYWxHcm91cBIJ", + "CgFhGAEgASgFKkYKEUZvcmVpZ25FbnVtUHJvdG8yEg8KC0ZPUkVJR05fRk9P", + "EAASDwoLRk9SRUlHTl9CQVIQARIPCgtGT1JFSUdOX0JBWhACOkoKD2V4dGVu", + "c2lvbl9pbnQzMhIxLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8yLlRl", + "c3RBbGxUeXBlc1Byb3RvMhh4IAEoBUIvCihjb20uZ29vZ2xlLnByb3RvYnVm", + "X3Rlc3RfbWVzc2FnZXMucHJvdG8ySAH4AQE=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ProtobufTestMessages.Proto2.ForeignEnumProto2), }, new pb::Extension[] { TestMessagesProto2Extensions.ExtensionInt32 }, new pbr::GeneratedClrTypeInfo[] { @@ -184,7 +191,8 @@ public static partial class TestMessagesProto2Reflection { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrect), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrect.Parser, null, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension1), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension1.Parser, new[]{ "Str" }, null, null, new pb::Extension[] { global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension1.Extensions.MessageSetExtension }, null), new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension2), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension2.Parser, new[]{ "I" }, null, null, new pb::Extension[] { global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension2.Extensions.MessageSetExtension }, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.ForeignMessageProto2), global::ProtobufTestMessages.Proto2.ForeignMessageProto2.Parser, new[]{ "C" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.ForeignMessageProto2), global::ProtobufTestMessages.Proto2.ForeignMessageProto2.Parser, new[]{ "C" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.UnknownToTestAllTypes), global::ProtobufTestMessages.Proto2.UnknownToTestAllTypes.Parser, new[]{ "OptionalInt32", "OptionalString", "NestedMessage", "OptionalGroup", "OptionalBool", "RepeatedInt32" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.UnknownToTestAllTypes.Types.OptionalGroup), global::ProtobufTestMessages.Proto2.UnknownToTestAllTypes.Types.OptionalGroup.Parser, new[]{ "A" }, null, null, null, null)}) })); } #endregion @@ -215,7 +223,7 @@ public enum ForeignEnumProto2 { /// could trigger bugs that occur in any message type in this file. We verify /// this stays true in a unit test. /// - public sealed partial class TestAllTypesProto2 : pb::IExtensionMessage { + public sealed partial class TestAllTypesProto2 : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestAllTypesProto2()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -3274,15 +3282,15 @@ public enum OneofFieldOneofCase { } } - public void RegisterExtension(pb::Extension extension) { - pb::ExtensionSet.Register(ref _extensions, extension); - } public TValue GetExtension(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -3292,6 +3300,9 @@ public enum OneofFieldOneofCase { public void ClearExtension(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } #region Nested types /// Container for nested types declared in the TestAllTypesProto2 message type. @@ -3688,7 +3699,7 @@ public sealed partial class Data : pb::IMessage { /// /// message_set test case. /// - public sealed partial class MessageSetCorrect : pb::IExtensionMessage { + public sealed partial class MessageSetCorrect : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MessageSetCorrect()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -3804,15 +3815,15 @@ public sealed partial class MessageSetCorrect : pb::IExtensionMessage(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -3822,6 +3833,9 @@ public sealed partial class MessageSetCorrect : pb::IExtensionMessage(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } } @@ -4277,6 +4291,494 @@ public sealed partial class ForeignMessageProto2 : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UnknownToTestAllTypes()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::ProtobufTestMessages.Proto2.TestMessagesProto2Reflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public UnknownToTestAllTypes() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public UnknownToTestAllTypes(UnknownToTestAllTypes other) : this() { + _hasBits0 = other._hasBits0; + optionalInt32_ = other.optionalInt32_; + optionalString_ = other.optionalString_; + nestedMessage_ = other.HasNestedMessage ? other.nestedMessage_.Clone() : null; + optionalGroup_ = other.HasOptionalGroup ? other.optionalGroup_.Clone() : null; + optionalBool_ = other.optionalBool_; + repeatedInt32_ = other.repeatedInt32_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public UnknownToTestAllTypes Clone() { + return new UnknownToTestAllTypes(this); + } + + /// Field number for the "optional_int32" field. + public const int OptionalInt32FieldNumber = 1001; + 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; + } + } + /// Gets whether the "optional_int32" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalInt32 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "optional_int32" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalInt32() { + _hasBits0 &= ~1; + } + + /// Field number for the "optional_string" field. + public const int OptionalStringFieldNumber = 1002; + 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"); + } + } + /// Gets whether the "optional_string" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalString { + get { return optionalString_ != null; } + } + /// Clears the value of the "optional_string" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalString() { + optionalString_ = null; + } + + /// Field number for the "nested_message" field. + public const int NestedMessageFieldNumber = 1003; + private global::ProtobufTestMessages.Proto2.ForeignMessageProto2 nestedMessage_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::ProtobufTestMessages.Proto2.ForeignMessageProto2 NestedMessage { + get { return nestedMessage_; } + set { + nestedMessage_ = value; + } + } + /// Gets whether the nested_message field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasNestedMessage { + get { return nestedMessage_ != null; } + } + /// Clears the value of the nested_message field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearNestedMessage() { + nestedMessage_ = null; + } + + /// Field number for the "optionalgroup" field. + public const int OptionalGroupFieldNumber = 1004; + private global::ProtobufTestMessages.Proto2.UnknownToTestAllTypes.Types.OptionalGroup optionalGroup_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::ProtobufTestMessages.Proto2.UnknownToTestAllTypes.Types.OptionalGroup OptionalGroup { + get { return optionalGroup_; } + set { + optionalGroup_ = value; + } + } + /// Gets whether the optionalgroup field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalGroup { + get { return optionalGroup_ != null; } + } + /// Clears the value of the optionalgroup field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalGroup() { + optionalGroup_ = null; + } + + /// Field number for the "optional_bool" field. + public const int OptionalBoolFieldNumber = 1006; + private readonly static bool OptionalBoolDefaultValue = false; + + private bool optionalBool_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool OptionalBool { + get { if ((_hasBits0 & 2) != 0) { return optionalBool_; } else { return OptionalBoolDefaultValue; } } + set { + _hasBits0 |= 2; + optionalBool_ = value; + } + } + /// Gets whether the "optional_bool" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasOptionalBool { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "optional_bool" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptionalBool() { + _hasBits0 &= ~2; + } + + /// Field number for the "repeated_int32" field. + public const int RepeatedInt32FieldNumber = 1011; + private static readonly pb::FieldCodec _repeated_repeatedInt32_codec + = pb::FieldCodec.ForInt32(8088); + private readonly pbc::RepeatedField repeatedInt32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RepeatedInt32 { + get { return repeatedInt32_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as UnknownToTestAllTypes); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(UnknownToTestAllTypes other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (OptionalInt32 != other.OptionalInt32) return false; + if (OptionalString != other.OptionalString) return false; + if (!object.Equals(NestedMessage, other.NestedMessage)) return false; + if (!object.Equals(OptionalGroup, other.OptionalGroup)) return false; + if (OptionalBool != other.OptionalBool) return false; + if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (HasOptionalInt32) hash ^= OptionalInt32.GetHashCode(); + if (HasOptionalString) hash ^= OptionalString.GetHashCode(); + if (HasNestedMessage) hash ^= NestedMessage.GetHashCode(); + if (HasOptionalGroup) hash ^= OptionalGroup.GetHashCode(); + if (HasOptionalBool) hash ^= OptionalBool.GetHashCode(); + hash ^= repeatedInt32_.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(200, 62); + output.WriteInt32(OptionalInt32); + } + if (HasOptionalString) { + output.WriteRawTag(210, 62); + output.WriteString(OptionalString); + } + if (HasNestedMessage) { + output.WriteRawTag(218, 62); + output.WriteMessage(NestedMessage); + } + if (HasOptionalGroup) { + output.WriteRawTag(227, 62); + output.WriteGroup(OptionalGroup); + output.WriteRawTag(228, 62); + } + if (HasOptionalBool) { + output.WriteRawTag(240, 62); + output.WriteBool(OptionalBool); + } + repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (HasOptionalInt32) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32); + } + if (HasOptionalString) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalString); + } + if (HasNestedMessage) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(NestedMessage); + } + if (HasOptionalGroup) { + size += 4 + pb::CodedOutputStream.ComputeGroupSize(OptionalGroup); + } + if (HasOptionalBool) { + size += 2 + 1; + } + size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(UnknownToTestAllTypes other) { + if (other == null) { + return; + } + if (other.HasOptionalInt32) { + OptionalInt32 = other.OptionalInt32; + } + if (other.HasOptionalString) { + OptionalString = other.OptionalString; + } + if (other.HasNestedMessage) { + if (!HasNestedMessage) { + NestedMessage = new global::ProtobufTestMessages.Proto2.ForeignMessageProto2(); + } + NestedMessage.MergeFrom(other.NestedMessage); + } + if (other.HasOptionalGroup) { + if (!HasOptionalGroup) { + OptionalGroup = new global::ProtobufTestMessages.Proto2.UnknownToTestAllTypes.Types.OptionalGroup(); + } + OptionalGroup.MergeFrom(other.OptionalGroup); + } + if (other.HasOptionalBool) { + OptionalBool = other.OptionalBool; + } + repeatedInt32_.Add(other.repeatedInt32_); + _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 8008: { + OptionalInt32 = input.ReadInt32(); + break; + } + case 8018: { + OptionalString = input.ReadString(); + break; + } + case 8026: { + if (!HasNestedMessage) { + NestedMessage = new global::ProtobufTestMessages.Proto2.ForeignMessageProto2(); + } + input.ReadMessage(NestedMessage); + break; + } + case 8035: { + if (!HasOptionalGroup) { + OptionalGroup = new global::ProtobufTestMessages.Proto2.UnknownToTestAllTypes.Types.OptionalGroup(); + } + input.ReadGroup(OptionalGroup); + break; + } + case 8048: { + OptionalBool = input.ReadBool(); + break; + } + case 8090: + case 8088: { + repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the UnknownToTestAllTypes message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class OptionalGroup : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OptionalGroup()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::ProtobufTestMessages.Proto2.UnknownToTestAllTypes.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); + } + + /// Field number for the "a" field. + 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; + } + } + /// Gets whether the "a" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HasA { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "a" field + [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(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(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 8036: + return; + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + A = input.ReadInt32(); + break; + } + } + } + } + + } + + } + #endregion + + } + #endregion } diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs index b321ba3ae42a..13effe5e45d9 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs @@ -5135,7 +5135,7 @@ public sealed partial class TestReservedFields : pb::IMessage { + public sealed partial class TestAllExtensions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestAllExtensions()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -5251,15 +5251,15 @@ public sealed partial class TestAllExtensions : pb::IExtensionMessage(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -5269,6 +5269,9 @@ public sealed partial class TestAllExtensions : pb::IExtensionMessage(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } } @@ -5902,7 +5905,7 @@ public sealed partial class OptionalGroup : pb::IMessage { } - public sealed partial class TestGroupExtension : pb::IExtensionMessage { + public sealed partial class TestGroupExtension : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestGroupExtension()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -6018,15 +6021,15 @@ public sealed partial class TestGroupExtension : pb::IExtensionMessage(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -6036,6 +6039,9 @@ public sealed partial class TestGroupExtension : pb::IExtensionMessage(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } } @@ -8467,7 +8473,7 @@ public sealed partial class TestEmptyMessage : pb::IMessage { /// Like above, but declare all field numbers as potential extensions. No /// actual extensions should ever be defined for this type. /// - public sealed partial class TestEmptyMessageWithExtensions : pb::IExtensionMessage { + public sealed partial class TestEmptyMessageWithExtensions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestEmptyMessageWithExtensions()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -8583,15 +8589,15 @@ public sealed partial class TestEmptyMessageWithExtensions : pb::IExtensionMessa } } - public void RegisterExtension(pb::Extension extension) { - pb::ExtensionSet.Register(ref _extensions, extension); - } public TValue GetExtension(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -8601,10 +8607,13 @@ public sealed partial class TestEmptyMessageWithExtensions : pb::IExtensionMessa public void ClearExtension(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } } - public sealed partial class TestMultipleExtensionRanges : pb::IExtensionMessage { + public sealed partial class TestMultipleExtensionRanges : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestMultipleExtensionRanges()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -8720,15 +8729,15 @@ public sealed partial class TestMultipleExtensionRanges : pb::IExtensionMessage< } } - public void RegisterExtension(pb::Extension extension) { - pb::ExtensionSet.Register(ref _extensions, extension); - } public TValue GetExtension(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -8738,6 +8747,9 @@ public sealed partial class TestMultipleExtensionRanges : pb::IExtensionMessage< public void ClearExtension(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } } @@ -11910,7 +11922,7 @@ public sealed partial class TestCamelCaseFieldNames : pb::IMessage - public sealed partial class TestFieldOrderings : pb::IExtensionMessage { + public sealed partial class TestFieldOrderings : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestFieldOrderings()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -12194,15 +12206,15 @@ public sealed partial class TestFieldOrderings : pb::IExtensionMessage(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -12212,6 +12224,9 @@ public sealed partial class TestFieldOrderings : pb::IExtensionMessage(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } #region Nested types /// Container for nested types declared in the TestFieldOrderings message type. @@ -19220,7 +19235,7 @@ public sealed partial class TestUnpackedTypes : pb::IMessage } - public sealed partial class TestPackedExtensions : pb::IExtensionMessage { + public sealed partial class TestPackedExtensions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestPackedExtensions()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -19336,15 +19351,15 @@ public sealed partial class TestPackedExtensions : pb::IExtensionMessage(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -19354,10 +19369,13 @@ public sealed partial class TestPackedExtensions : pb::IExtensionMessage(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } } - public sealed partial class TestUnpackedExtensions : pb::IExtensionMessage { + public sealed partial class TestUnpackedExtensions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestUnpackedExtensions()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -19473,15 +19491,15 @@ public sealed partial class TestUnpackedExtensions : pb::IExtensionMessage(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -19491,6 +19509,9 @@ public sealed partial class TestUnpackedExtensions : pb::IExtensionMessage(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } } @@ -20256,7 +20277,7 @@ public sealed partial class TestRepeatedScalarDifferentTagSizes : pb::IMessage - public sealed partial class TestParsingMerge : pb::IExtensionMessage { + public sealed partial class TestParsingMerge : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestParsingMerge()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -20545,15 +20566,15 @@ public sealed partial class TestParsingMerge : pb::IExtensionMessage(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -20563,6 +20584,9 @@ public sealed partial class TestParsingMerge : pb::IExtensionMessage(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } #region Nested types /// Container for nested types declared in the TestParsingMerge message type. @@ -22529,7 +22553,7 @@ public sealed partial class TestJsonName : pb::IMessage { } - public sealed partial class TestHugeFieldNumbers : pb::IExtensionMessage { + public sealed partial class TestHugeFieldNumbers : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestHugeFieldNumbers()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -23206,15 +23230,15 @@ public enum OneofFieldOneofCase { } } - public void RegisterExtension(pb::Extension extension) { - pb::ExtensionSet.Register(ref _extensions, extension); - } public TValue GetExtension(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -23224,6 +23248,9 @@ public enum OneofFieldOneofCase { public void ClearExtension(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } #region Nested types /// Container for nested types declared in the TestHugeFieldNumbers message type. @@ -23380,7 +23407,7 @@ public sealed partial class OptionalGroup : pb::IMessage { } - public sealed partial class TestExtensionInsideTable : pb::IExtensionMessage { + public sealed partial class TestExtensionInsideTable : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestExtensionInsideTable()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; @@ -23867,15 +23894,15 @@ public sealed partial class TestExtensionInsideTable : pb::IExtensionMessage(pb::Extension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } + public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); } @@ -23885,6 +23912,9 @@ public sealed partial class TestExtensionInsideTable : pb::IExtensionMessage(pb::Extension extension) { pb::ExtensionSet.Clear(ref _extensions, extension); } + public void ClearExtension(pb::RepeatedExtension extension) { + pb::ExtensionSet.Clear(ref _extensions, extension); + } } diff --git a/csharp/src/Google.Protobuf/Extension.cs b/csharp/src/Google.Protobuf/Extension.cs index 55988e3a8b6b..a96f8d29b6a8 100644 --- a/csharp/src/Google.Protobuf/Extension.cs +++ b/csharp/src/Google.Protobuf/Extension.cs @@ -79,8 +79,6 @@ public Extension(int fieldNumber, FieldCodec codec) : base(fieldNumber) internal override Type TargetType => typeof(TTarget); - internal TValue DefaultValue => codec.DefaultValue; - internal override IExtensionValue CreateValue() { return new ExtensionValue(codec); diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs index 75e9ee4d5415..20bd4b65d685 100644 --- a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs @@ -1587,7 +1587,7 @@ public sealed partial class ReservedRange : pb::IMessage { } - internal sealed partial class ExtensionRangeOptions : pb::IExtendableMessage { + public sealed partial class ExtensionRangeOptions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ExtensionRangeOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; @@ -3815,7 +3815,7 @@ public sealed partial class MethodDescriptorProto : pb::IMessage { + public sealed partial class FileOptions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; @@ -4912,7 +4912,7 @@ public enum OptimizeMode { } - internal sealed partial class MessageOptions : pb::IExtendableMessage { + public sealed partial class MessageOptions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MessageOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; @@ -5295,7 +5295,7 @@ internal sealed partial class MessageOptions : pb::IExtendableMessage { + public sealed partial class FieldOptions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; @@ -5801,7 +5801,7 @@ public enum JSType { } - internal sealed partial class OneofOptions : pb::IExtendableMessage { + public sealed partial class OneofOptions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OneofOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; @@ -5964,7 +5964,7 @@ internal sealed partial class OneofOptions : pb::IExtendableMessage { + public sealed partial class EnumOptions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; @@ -6221,7 +6221,7 @@ internal sealed partial class EnumOptions : pb::IExtendableMessage } - internal sealed partial class EnumValueOptions : pb::IExtendableMessage { + public sealed partial class EnumValueOptions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumValueOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; @@ -6433,7 +6433,7 @@ internal sealed partial class EnumValueOptions : pb::IExtendableMessage { + public sealed partial class ServiceOptions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServiceOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; @@ -6645,7 +6645,7 @@ internal sealed partial class ServiceOptions : pb::IExtendableMessage { + public sealed partial class MethodOptions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MethodOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; From cd6553542302212e37b5760bd6ae6edc7ec48305 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sat, 4 May 2019 11:25:50 -0500 Subject: [PATCH 13/34] Added group roundtrip tests and fixed any issues discovered --- .../GeneratedMessageTest.cs | 50 +++++++++++++++++++ .../Google.Protobuf.Test/SampleMessages.cs | 2 + .../TestProtos/Unittest.cs | 6 +++ .../Collections/RepeatedField.cs | 4 ++ csharp/src/Google.Protobuf/FieldCodec.cs | 1 + .../compiler/csharp/csharp_helpers.cc | 33 +++++++++--- 6 files changed, 88 insertions(+), 8 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs index fd2d52aa3f48..e6a685d6053e 100644 --- a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs +++ b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs @@ -348,6 +348,56 @@ public void RoundTrip_RepeatedValues() Assert.AreEqual(message, parsed); } + [Test] + public void RoundTrip_Groups() + { + var message = new Proto2.TestAllTypes + { + OptionalGroup = new Proto2.TestAllTypes.Types.OptionalGroup + { + A = 10 + }, + RepeatedGroup = + { + new Proto2.TestAllTypes.Types.RepeatedGroup { A = 10 }, + new Proto2.TestAllTypes.Types.RepeatedGroup { A = 20 }, + new Proto2.TestAllTypes.Types.RepeatedGroup { A = 30 } + } + }; + + byte[] bytes = message.ToByteArray(); + Proto2.TestAllTypes parsed = Proto2.TestAllTypes.Parser.ParseFrom(bytes); + Assert.AreEqual(message, parsed); + } + + [Test] + public void RoundTrip_ExtensionGroups() + { + var message = new Proto2.TestAllExtensions(); + message.SetExtension(Proto2.UnittestExtensions.OptionalGroupExtension, new Proto2.OptionalGroup_extension { A = 10 }); + message.GetOrRegisterExtension(Proto2.UnittestExtensions.RepeatedGroupExtension).AddRange(new[] + { + new Proto2.RepeatedGroup_extension { A = 10 }, + new Proto2.RepeatedGroup_extension { A = 20 }, + new Proto2.RepeatedGroup_extension { A = 30 } + }); + + byte[] bytes = message.ToByteArray(); + Proto2.TestAllExtensions extendable_parsed = Proto2.TestAllExtensions.Parser.WithExtensionRegistry(new ExtensionRegistry() { Proto2.UnittestExtensions.OptionalGroupExtension, Proto2.UnittestExtensions.RepeatedGroupExtension }).ParseFrom(bytes); + Assert.AreEqual(message, extendable_parsed); + } + + [Test] + public void RoundTrip_NestedExtensionGroup() + { + var message = new Proto2.TestGroupExtension(); + message.SetExtension(Proto2.TestNestedExtension.Extensions.OptionalGroupExtension, new Proto2.TestNestedExtension.Types.OptionalGroup_extension { A = 10 }); + + byte[] bytes = message.ToByteArray(); + Proto2.TestGroupExtension extendable_parsed = Proto2.TestGroupExtension.Parser.WithExtensionRegistry(new ExtensionRegistry() { Proto2.TestNestedExtension.Extensions.OptionalGroupExtension }).ParseFrom(bytes); + Assert.AreEqual(message, extendable_parsed); + } + // Note that not every map within map_unittest_proto3 is used. They all go through very // similar code paths. The fact that all maps are present is validation that we have codecs // for every type. diff --git a/csharp/src/Google.Protobuf.Test/SampleMessages.cs b/csharp/src/Google.Protobuf.Test/SampleMessages.cs index 68f7e27db999..0c3781446173 100644 --- a/csharp/src/Google.Protobuf.Test/SampleMessages.cs +++ b/csharp/src/Google.Protobuf.Test/SampleMessages.cs @@ -123,6 +123,7 @@ public static Proto2.TestAllTypes CreateFullTestAllTypesProto2() OptionalString = "test", OptionalUint32 = UInt32.MaxValue, OptionalUint64 = UInt64.MaxValue, + OptionalGroup = new Proto2.TestAllTypes.Types.OptionalGroup { A = 10 }, RepeatedBool = { true, false }, RepeatedBytes = { ByteString.CopyFrom(1, 2, 3, 4), ByteString.CopyFrom(5, 6), ByteString.CopyFrom(new byte[1000]) }, RepeatedDouble = { -12.25, 23.5 }, @@ -144,6 +145,7 @@ public static Proto2.TestAllTypes CreateFullTestAllTypesProto2() RepeatedString = { "foo", "bar" }, RepeatedUint32 = { UInt32.MaxValue, UInt32.MinValue }, RepeatedUint64 = { UInt64.MaxValue, UInt32.MinValue }, + RepeatedGroup = { new Proto2.TestAllTypes.Types.RepeatedGroup { A = 10 }, new Proto2.TestAllTypes.Types.RepeatedGroup { A = 20 } }, OneofString = "Oneof string" }; } diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs index 13effe5e45d9..1043d738c873 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs @@ -5406,6 +5406,8 @@ public sealed partial class OptionalGroup_extension : pb::IMessage codec) { var sizeCalculator = codec.ValueSizeCalculator; int size = count * CodedOutputStream.ComputeRawVarint32Size(tag); + if (codec.EndTag != 0) + { + size += count * CodedOutputStream.ComputeRawVarint32Size(codec.EndTag); + } for (int i = 0; i < count; i++) { size += sizeCalculator(array[i]); diff --git a/csharp/src/Google.Protobuf/FieldCodec.cs b/csharp/src/Google.Protobuf/FieldCodec.cs index 90d31131fed2..c2c4b57c39c9 100644 --- a/csharp/src/Google.Protobuf/FieldCodec.cs +++ b/csharp/src/Google.Protobuf/FieldCodec.cs @@ -731,6 +731,7 @@ static FieldCodec() ValueSizeCalculator = sizeCalculator; FixedSize = 0; Tag = tag; + EndTag = endTag; DefaultValue = defaultValue; tagSize = CodedOutputStream.ComputeRawVarint32Size(tag); if (endTag != 0) diff --git a/src/google/protobuf/compiler/csharp/csharp_helpers.cc b/src/google/protobuf/compiler/csharp/csharp_helpers.cc index 4042512b4b7f..514eb9b0ba10 100644 --- a/src/google/protobuf/compiler/csharp/csharp_helpers.cc +++ b/src/google/protobuf/compiler/csharp/csharp_helpers.cc @@ -284,16 +284,33 @@ std::string GetEnumValueName(const std::string& enum_name, const std::string& en uint GetGroupEndTag(const Descriptor* descriptor) { const Descriptor* containing_type = descriptor->containing_type(); - if (containing_type == NULL) { - 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); + if (containing_type != NULL) { + 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); + } + } + for (int i = 0; i < containing_type->extension_count(); i++) { + field = containing_type->extension(i); + if (field->type() == FieldDescriptor::Type::TYPE_GROUP && field->message_type() == descriptor) { + return internal::WireFormatLite::MakeTag(field->number(), internal::WireFormatLite::WIRETYPE_END_GROUP); + } + } + } else { + const FileDescriptor* containing_file = descriptor->file(); + if (containing_file != NULL) { + const FieldDescriptor* field; + for (int i = 0; i < containing_file->extension_count(); i++) { + field = containing_file->extension(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; } From 134242bc4635d5370948043d29780ba9168e2d50 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sat, 4 May 2019 11:32:00 -0500 Subject: [PATCH 14/34] Change input message to UnknownFieldSet tests to proto2 test message to test groups. --- .../Google.Protobuf.Test/UnknownFieldSetTest.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/UnknownFieldSetTest.cs b/csharp/src/Google.Protobuf.Test/UnknownFieldSetTest.cs index 438b2ece36ed..0663465808b2 100644 --- a/csharp/src/Google.Protobuf.Test/UnknownFieldSetTest.cs +++ b/csharp/src/Google.Protobuf.Test/UnknownFieldSetTest.cs @@ -33,6 +33,7 @@ using System; using System.IO; using Google.Protobuf.TestProtos; +using Proto2 = Google.Protobuf.TestProtos.Proto2; using NUnit.Framework; namespace Google.Protobuf @@ -62,13 +63,13 @@ public void MergeUnknownFieldSet() [Test] public void TestMergeCodedInput() { - var message = SampleMessages.CreateFullTestAllTypes(); + var message = SampleMessages.CreateFullTestAllTypesProto2(); var emptyMessage = new TestEmptyMessage(); emptyMessage.MergeFrom(message.ToByteArray()); Assert.AreEqual(message.CalculateSize(), emptyMessage.CalculateSize()); Assert.AreEqual(message.ToByteArray(), emptyMessage.ToByteArray()); - var newMessage = new TestAllTypes(); + var newMessage = new Proto2.TestAllTypes(); newMessage.MergeFrom(emptyMessage.ToByteArray()); Assert.AreEqual(message, newMessage); Assert.AreEqual(message.CalculateSize(), newMessage.CalculateSize()); @@ -77,7 +78,7 @@ public void TestMergeCodedInput() [Test] public void TestMergeMessage() { - var message = SampleMessages.CreateFullTestAllTypes(); + var message = SampleMessages.CreateFullTestAllTypesProto2(); var emptyMessage = new TestEmptyMessage(); var otherEmptyMessage = new TestEmptyMessage(); emptyMessage.MergeFrom(message.ToByteArray()); @@ -90,7 +91,7 @@ public void TestMergeMessage() [Test] public void TestEquals() { - var message = SampleMessages.CreateFullTestAllTypes(); + var message = SampleMessages.CreateFullTestAllTypesProto2(); var emptyMessage = new TestEmptyMessage(); var otherEmptyMessage = new TestEmptyMessage(); Assert.AreEqual(emptyMessage, otherEmptyMessage); @@ -103,7 +104,7 @@ public void TestEquals() [Test] public void TestHashCode() { - var message = SampleMessages.CreateFullTestAllTypes(); + var message = SampleMessages.CreateFullTestAllTypesProto2(); var emptyMessage = new TestEmptyMessage(); int hashCode = emptyMessage.GetHashCode(); emptyMessage.MergeFrom(message.ToByteArray()); @@ -119,7 +120,7 @@ public void TestClone() Assert.AreEqual(emptyMessage.CalculateSize(), otherEmptyMessage.CalculateSize()); Assert.AreEqual(emptyMessage.ToByteArray(), otherEmptyMessage.ToByteArray()); - var message = SampleMessages.CreateFullTestAllTypes(); + var message = SampleMessages.CreateFullTestAllTypesProto2(); emptyMessage.MergeFrom(message.ToByteArray()); otherEmptyMessage = emptyMessage.Clone(); Assert.AreEqual(message.CalculateSize(), otherEmptyMessage.CalculateSize()); @@ -129,7 +130,7 @@ public void TestClone() [Test] public void TestDiscardUnknownFields() { - var message = SampleMessages.CreateFullTestAllTypes(); + var message = SampleMessages.CreateFullTestAllTypesProto2(); var goldenEmptyMessage = new TestEmptyMessage(); byte[] data = message.ToByteArray(); int fullSize = message.CalculateSize(); From ebf0bfaed8bfc897874ebf0d981bf14327b1bfa8 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 5 May 2019 01:51:08 -0500 Subject: [PATCH 15/34] Add private "_Extensions" property to speed up IsInitialized checks --- .../TestProtos/TestMessagesProto2.cs | 2 ++ csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs | 10 ++++++++++ csharp/src/Google.Protobuf/Reflection/Descriptor.cs | 9 +++++++++ .../src/Google.Protobuf/Reflection/ReflectionUtil.cs | 9 +++++++-- src/google/protobuf/compiler/csharp/csharp_message.cc | 2 ++ 5 files changed, 30 insertions(+), 2 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs index a2577dfc0fb4..04e1dc41ad44 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs @@ -227,6 +227,7 @@ public sealed partial class TestAllTypesProto2 : pb::IExtendableMessage _parser = new pb::MessageParser(() => new TestAllTypesProto2()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; private int _hasBits0; private int _hasBits1; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -3703,6 +3704,7 @@ public sealed partial class MessageSetCorrect : pb::IExtendableMessage _parser = new pb::MessageParser(() => new MessageSetCorrect()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs index 1043d738c873..5d7339f1502f 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs @@ -5139,6 +5139,7 @@ public sealed partial class TestAllExtensions : pb::IExtendableMessage _parser = new pb::MessageParser(() => new TestAllExtensions()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -5913,6 +5914,7 @@ public sealed partial class TestGroupExtension : pb::IExtendableMessage _parser = new pb::MessageParser(() => new TestGroupExtension()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -8483,6 +8485,7 @@ public sealed partial class TestEmptyMessageWithExtensions : pb::IExtendableMess private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestEmptyMessageWithExtensions()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -8623,6 +8626,7 @@ public sealed partial class TestMultipleExtensionRanges : pb::IExtendableMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestMultipleExtensionRanges()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -11932,6 +11936,7 @@ public sealed partial class TestFieldOrderings : pb::IExtendableMessage _parser = new pb::MessageParser(() => new TestFieldOrderings()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -19245,6 +19250,7 @@ public sealed partial class TestPackedExtensions : pb::IExtendableMessage _parser = new pb::MessageParser(() => new TestPackedExtensions()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -19385,6 +19391,7 @@ public sealed partial class TestUnpackedExtensions : pb::IExtendableMessage _parser = new pb::MessageParser(() => new TestUnpackedExtensions()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -20287,6 +20294,7 @@ public sealed partial class TestParsingMerge : pb::IExtendableMessage _parser = new pb::MessageParser(() => new TestParsingMerge()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -22563,6 +22571,7 @@ public sealed partial class TestHugeFieldNumbers : pb::IExtendableMessage _parser = new pb::MessageParser(() => new TestHugeFieldNumbers()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -23417,6 +23426,7 @@ public sealed partial class TestExtensionInsideTable : pb::IExtendableMessage _parser = new pb::MessageParser(() => new TestExtensionInsideTable()); private pb::UnknownFieldSet _unknownFields; private pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs index 20bd4b65d685..8656cb5f8744 100644 --- a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs @@ -1591,6 +1591,7 @@ public sealed partial class ExtensionRangeOptions : pb::IExtendableMessage _parser = new pb::MessageParser(() => new ExtensionRangeOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -3819,6 +3820,7 @@ public sealed partial class FileOptions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -4916,6 +4918,7 @@ public sealed partial class MessageOptions : pb::IExtendableMessage _parser = new pb::MessageParser(() => new MessageOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -5299,6 +5302,7 @@ public sealed partial class FieldOptions : pb::IExtendableMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -5805,6 +5809,7 @@ public sealed partial class OneofOptions : pb::IExtendableMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OneofOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -5968,6 +5973,7 @@ public sealed partial class EnumOptions : pb::IExtendableMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnumOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -6225,6 +6231,7 @@ public sealed partial class EnumValueOptions : pb::IExtendableMessage _parser = new pb::MessageParser(() => new EnumValueOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -6437,6 +6444,7 @@ public sealed partial class ServiceOptions : pb::IExtendableMessage _parser = new pb::MessageParser(() => new ServiceOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } @@ -6649,6 +6657,7 @@ public sealed partial class MethodOptions : pb::IExtendableMessage _parser = new pb::MessageParser(() => new MethodOptions()); private pb::UnknownFieldSet _unknownFields; internal pb::ExtensionSet _extensions; + private pb::ExtensionSet _Extensions => _extensions; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser Parser { get { return _parser; } } diff --git a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs index e92efd52e9d5..8879c5543b25 100644 --- a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs +++ b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs @@ -312,14 +312,19 @@ private class ExtensionSetReflector : IExtensionSetReflector where T1 : IExt { public Func CreateIsInitializedCaller() { - var field = typeof(T1).GetTypeInfo().GetDeclaredField("_extensions"); + var prop = typeof(T1).GetTypeInfo().GetDeclaredProperty("_Extensions"); +#if NET35 + var getFunc = (Func>)prop.GetGetMethod(true).CreateDelegate(typeof(Func>)); +#else + var getFunc = (Func>)prop.GetMethod.CreateDelegate(typeof(Func>)); +#endif var initializedFunc = (Func, bool>) typeof(ExtensionSet) .GetTypeInfo() .GetDeclaredMethod("IsInitialized") .CreateDelegate(typeof(Func, bool>)); return (m) => { - var set = field.GetValue(m) as ExtensionSet; + var set = getFunc((T1)m); return set == null || initializedFunc(set); }; } diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc index 73cc2a46004d..e4b87dfbbe2c 100644 --- a/src/google/protobuf/compiler/csharp/csharp_message.cc +++ b/src/google/protobuf/compiler/csharp/csharp_message.cc @@ -149,6 +149,8 @@ void MessageGenerator::Generate(io::Printer* printer) { } else { printer->Print(vars, "private pb::ExtensionSet<$class_name$> _extensions;\n"); } + + printer->Print(vars, "private pb::ExtensionSet<$class_name$> _Extensions => _extensions;\n"); // a read-only property for fast retrieval of the set in IsInitialized } for (int i = 0; i < has_bit_field_count_; i++) { From b78330b21df8a53eee60f1b89d0cd515b90ca488 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 5 May 2019 13:26:12 -0500 Subject: [PATCH 16/34] Fix RepeatedExtensionValue.IsInitialized --- csharp/src/Google.Protobuf/ExtensionValue.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/csharp/src/Google.Protobuf/ExtensionValue.cs b/csharp/src/Google.Protobuf/ExtensionValue.cs index 6b224ed441dd..986b2fce0de6 100644 --- a/csharp/src/Google.Protobuf/ExtensionValue.cs +++ b/csharp/src/Google.Protobuf/ExtensionValue.cs @@ -213,7 +213,23 @@ public void WriteTo(CodedOutputStream output) public bool IsInitialized() { - return field.All(m => m is IMessage && (m as IMessage).IsInitialized()); + for (int i = 0; i < field.Count; i++) + { + var element = field[i]; + if (element is IMessage) + { + if (!(element as IMessage).IsInitialized()) + { + return false; + } + } + else + { + break; + } + } + + return true; } } } From 8dc69ede45431d8e87ada404e3dab0fa0de5b1a7 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 5 May 2019 13:28:19 -0500 Subject: [PATCH 17/34] Remove unnecessary check in GetIsExtensionsInitialized --- csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs index e375ad9fab15..a6ecfb984b0e 100644 --- a/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs @@ -138,11 +138,6 @@ internal override IReadOnlyList GetNestedDescriptorListForField( internal bool GetIsExtensionsInitialized(IMessage message) { - if (!object.ReferenceEquals(message.Descriptor, this)) - { - throw new InvalidOperationException("message's descriptor reference does not match this"); - } - if (Proto.ExtensionRange.Count == 0) { return true; From f4cfd2def3941402f3531a55b52915e5e2f9cc4f Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 5 May 2019 14:51:13 -0500 Subject: [PATCH 18/34] Remove dead HasValue code for ExtensionValue and add null-checks to ExtensionSet.Set --- csharp/src/Google.Protobuf/ExtensionSet.cs | 2 + csharp/src/Google.Protobuf/ExtensionValue.cs | 39 +++++++------------ .../Reflection/CustomOptions.cs | 14 ++----- 3 files changed, 20 insertions(+), 35 deletions(-) diff --git a/csharp/src/Google.Protobuf/ExtensionSet.cs b/csharp/src/Google.Protobuf/ExtensionSet.cs index f6d1ff2d17dd..5b3b3167aa61 100644 --- a/csharp/src/Google.Protobuf/ExtensionSet.cs +++ b/csharp/src/Google.Protobuf/ExtensionSet.cs @@ -115,6 +115,8 @@ public static class ExtensionSet /// public static void Set(ref ExtensionSet set, Extension extension, TValue value) where TTarget : IExtendableMessage { + ProtoPreconditions.CheckNotNullUnconstrained(value, nameof(value)); + IExtensionValue extensionValue; if (set == null) { diff --git a/csharp/src/Google.Protobuf/ExtensionValue.cs b/csharp/src/Google.Protobuf/ExtensionValue.cs index 986b2fce0de6..6ee737a7b0c9 100644 --- a/csharp/src/Google.Protobuf/ExtensionValue.cs +++ b/csharp/src/Google.Protobuf/ExtensionValue.cs @@ -47,7 +47,6 @@ internal interface IExtensionValue : IEquatable, IDeepCloneable internal sealed class ExtensionValue : IExtensionValue { - private bool hasValue; private T field; private FieldCodec codec; @@ -59,10 +58,6 @@ internal ExtensionValue(FieldCodec codec) public int CalculateSize() { - if (!hasValue) - { - return 0; - } return codec.CalculateSizeWithTag(field); } @@ -70,7 +65,6 @@ public IExtensionValue Clone() { return new ExtensionValue(codec) { - hasValue = hasValue, field = field is IDeepCloneable ? (field as IDeepCloneable).Clone() : field }; } @@ -82,7 +76,6 @@ public bool Equals(IExtensionValue other) return other is ExtensionValue && codec.Equals((other as ExtensionValue).codec) - && hasValue.Equals((other as ExtensionValue).hasValue) && Equals(field, (other as ExtensionValue).field); // we check for equality in the codec since we could have equal field values however the values could be written in different ways } @@ -92,7 +85,6 @@ public override int GetHashCode() unchecked { int hash = 17; - hash = hash * 31 + hasValue.GetHashCode(); hash = hash * 31 + field.GetHashCode(); hash = hash * 31 + codec.GetHashCode(); return hash; @@ -101,7 +93,6 @@ public override int GetHashCode() public void MergeFrom(CodedInputStream input) { - hasValue = true; codec.ValueMerger(input, ref field); } @@ -109,24 +100,18 @@ public void MergeFrom(IExtensionValue value) { if (value is ExtensionValue) { - var extensionValue = value as ExtensionValue; - if (extensionValue.hasValue) - { - hasValue |= codec.FieldMerger(ref field, extensionValue.field); - } + var extensionValue = value as ExtensionValue; + codec.FieldMerger(ref field, extensionValue.field); } } public void WriteTo(CodedOutputStream output) { - if (hasValue) + output.WriteTag(codec.Tag); + codec.ValueWriter(output, field); + if (codec.EndTag != 0) { - output.WriteTag(codec.Tag); - codec.ValueWriter(output, field); - if (codec.EndTag != 0) - { - output.WriteTag(codec.EndTag); - } + output.WriteTag(codec.EndTag); } } @@ -134,15 +119,19 @@ public void WriteTo(CodedOutputStream output) public void SetValue(T value) { - hasValue = true; field = value; } - public bool HasValue => hasValue; - public bool IsInitialized() { - return HasValue && field is IMessage && (field as IMessage).IsInitialized(); + if (field is IMessage) + { + return (field as IMessage).IsInitialized(); + } + else + { + return true; + } } } diff --git a/csharp/src/Google.Protobuf/Reflection/CustomOptions.cs b/csharp/src/Google.Protobuf/Reflection/CustomOptions.cs index 57df2ed4a8ab..9fc3766889b8 100644 --- a/csharp/src/Google.Protobuf/Reflection/CustomOptions.cs +++ b/csharp/src/Google.Protobuf/Reflection/CustomOptions.cs @@ -254,11 +254,8 @@ private bool TryGetPrimitiveValue(int field, out T value) if (extensionValue is ExtensionValue) { ExtensionValue single = extensionValue as ExtensionValue; - if (single.HasValue) - { - value = single.GetValue(); - return true; - } + value = single.GetValue(); + return true; } else if (extensionValue is RepeatedExtensionValue) { @@ -279,11 +276,8 @@ private bool TryGetPrimitiveValue(int field, out T value) var typeArgs = typeInfo.GenericTypeArguments; if (typeArgs.Length == 1 && typeArgs[0].GetTypeInfo().IsEnum) { - if ((bool)typeInfo.GetDeclaredProperty(nameof(ExtensionValue.HasValue)).GetValue(extensionValue)) - { - value = (T)typeInfo.GetDeclaredMethod(nameof(ExtensionValue.GetValue)).Invoke(extensionValue, EmptyParameters); - return true; - } + value = (T)typeInfo.GetDeclaredMethod(nameof(ExtensionValue.GetValue)).Invoke(extensionValue, EmptyParameters); + return true; } } else if (type.GetGenericTypeDefinition() == typeof(RepeatedExtensionValue<>)) From 0c80570a8b104443ded4f230fc607c797abdff34 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 5 May 2019 14:58:20 -0500 Subject: [PATCH 19/34] Add ExtensionSet tests and add checks that non-message extension fields don't fail initialization checks --- .../Google.Protobuf.Test/ExtensionSetTest.cs | 102 ++++++++++++++++++ .../GeneratedMessageTest.cs | 8 ++ 2 files changed, 110 insertions(+) create mode 100644 csharp/src/Google.Protobuf.Test/ExtensionSetTest.cs diff --git a/csharp/src/Google.Protobuf.Test/ExtensionSetTest.cs b/csharp/src/Google.Protobuf.Test/ExtensionSetTest.cs new file mode 100644 index 000000000000..33dc50430d07 --- /dev/null +++ b/csharp/src/Google.Protobuf.Test/ExtensionSetTest.cs @@ -0,0 +1,102 @@ +using Google.Protobuf.TestProtos.Proto2; +using NUnit.Framework; + +using static Google.Protobuf.TestProtos.Proto2.UnittestExtensions; + +namespace Google.Protobuf +{ + public class ExtensionSetTest + { + [Test] + public void EmptyExtensionSet() + { + ExtensionSet extensions = new ExtensionSet(); + Assert.AreEqual(0, extensions.CalculateSize()); + } + + [Test] + public void MergeExtensionSet() + { + ExtensionSet extensions = null; + ExtensionSet.Set(ref extensions, OptionalBoolExtension, true); + + ExtensionSet other = null; + + Assert.IsFalse(ExtensionSet.Has(ref other, OptionalBoolExtension)); + ExtensionSet.MergeFrom(ref other, extensions); + Assert.IsTrue(ExtensionSet.Has(ref other, OptionalBoolExtension)); + } + + [Test] + public void TestMergeCodedInput() + { + var message = new TestAllExtensions(); + message.SetExtension(OptionalBoolExtension, true); + var serialized = message.ToByteArray(); + + var other = TestAllExtensions.Parser + .WithExtensionRegistry(new ExtensionRegistry() { OptionalBoolExtension }) + .ParseFrom(serialized); + + Assert.AreEqual(message, other); + Assert.AreEqual(message.CalculateSize(), other.CalculateSize()); + } + + [Test] + public void TestMergeMessage() + { + var message = new TestAllExtensions(); + message.SetExtension(OptionalBoolExtension, true); + + var other = new TestAllExtensions(); + + Assert.AreNotEqual(message, other); + Assert.AreNotEqual(message.CalculateSize(), other.CalculateSize()); + + other.MergeFrom(message); + + Assert.AreEqual(message, other); + Assert.AreEqual(message.CalculateSize(), other.CalculateSize()); + } + + [Test] + public void TestEquals() + { + var message = new TestAllExtensions(); + message.SetExtension(OptionalBoolExtension, true); + + var other = new TestAllExtensions(); + + Assert.AreNotEqual(message, other); + Assert.AreNotEqual(message.CalculateSize(), other.CalculateSize()); + + other.SetExtension(OptionalBoolExtension, true); + + Assert.AreEqual(message, other); + Assert.AreEqual(message.CalculateSize(), other.CalculateSize()); + } + + [Test] + public void TestHashCode() + { + var message = new TestAllExtensions(); + var hashCode = message.GetHashCode(); + + message.SetExtension(OptionalBoolExtension, true); + + Assert.AreNotEqual(hashCode, message.GetHashCode()); + } + + [Test] + public void TestClone() + { + var message = new TestAllExtensions(); + message.SetExtension(OptionalBoolExtension, true); + + var other = message.Clone(); + + Assert.AreEqual(message, other); + Assert.AreEqual(message.CalculateSize(), message.CalculateSize()); + } + } +} diff --git a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs index e6a685d6053e..6b2af137ba3b 100644 --- a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs +++ b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs @@ -254,6 +254,14 @@ public void RequiredFieldsInExtensions() extensionMessage.C = 3; Assert.True(message.IsInitialized()); + + message.SetExtension(Proto2.UnittestExtensions.OptionalBoolExtension, true); + + Assert.True(message.IsInitialized()); + + message.GetOrRegisterExtension(Proto2.UnittestExtensions.RepeatedBoolExtension).Add(true); + + Assert.True(message.IsInitialized()); } [Test] From 9163a6f1ade17573f82295d18666918340916822 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 5 May 2019 19:22:20 -0500 Subject: [PATCH 20/34] Add tests for extension accessor --- .../Reflection/FieldAccessTest.cs | 122 ++++++++++-------- .../Google.Protobuf.Test/SampleMessages.cs | 60 ++++++++- .../Reflection/FieldDescriptor.cs | 11 +- .../Reflection/ReflectionUtil.cs | 2 +- 4 files changed, 131 insertions(+), 64 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs index 46cb1afcd5fd..32b7a03eee0a 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs @@ -31,10 +31,13 @@ #endregion using Google.Protobuf.TestProtos; +using Proto2 = Google.Protobuf.TestProtos.Proto2; using NUnit.Framework; using System; using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; + +using static Google.Protobuf.TestProtos.Proto2.UnittestExtensions; namespace Google.Protobuf.Reflection { @@ -44,36 +47,36 @@ public class FieldAccessTest public void GetValue() { var message = SampleMessages.CreateFullTestAllTypes(); - var fields = TestAllTypes.Descriptor.Fields; - Assert.AreEqual(message.SingleBool, fields[TestAllTypes.SingleBoolFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleBytes, fields[TestAllTypes.SingleBytesFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleDouble, fields[TestAllTypes.SingleDoubleFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleFixed32, fields[TestAllTypes.SingleFixed32FieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleFixed64, fields[TestAllTypes.SingleFixed64FieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleFloat, fields[TestAllTypes.SingleFloatFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleForeignEnum, fields[TestAllTypes.SingleForeignEnumFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleForeignMessage, fields[TestAllTypes.SingleForeignMessageFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleImportEnum, fields[TestAllTypes.SingleImportEnumFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleImportMessage, fields[TestAllTypes.SingleImportMessageFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleInt32, fields[TestAllTypes.SingleInt32FieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleInt64, fields[TestAllTypes.SingleInt64FieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleNestedEnum, fields[TestAllTypes.SingleNestedEnumFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleNestedMessage, fields[TestAllTypes.SingleNestedMessageFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SinglePublicImportMessage, fields[TestAllTypes.SinglePublicImportMessageFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleSint32, fields[TestAllTypes.SingleSint32FieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleSint64, fields[TestAllTypes.SingleSint64FieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleString, fields[TestAllTypes.SingleStringFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleSfixed32, fields[TestAllTypes.SingleSfixed32FieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleSfixed64, fields[TestAllTypes.SingleSfixed64FieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleUint32, fields[TestAllTypes.SingleUint32FieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.SingleUint64, fields[TestAllTypes.SingleUint64FieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.OneofBytes, fields[TestAllTypes.OneofBytesFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.OneofString, fields[TestAllTypes.OneofStringFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.OneofNestedMessage, fields[TestAllTypes.OneofNestedMessageFieldNumber].Accessor.GetValue(message)); - Assert.AreEqual(message.OneofUint32, fields[TestAllTypes.OneofUint32FieldNumber].Accessor.GetValue(message)); + var fields = TestProtos.TestAllTypes.Descriptor.Fields; + Assert.AreEqual(message.SingleBool, fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleBytes, fields[TestProtos.TestAllTypes.SingleBytesFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleDouble, fields[TestProtos.TestAllTypes.SingleDoubleFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleFixed32, fields[TestProtos.TestAllTypes.SingleFixed32FieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleFixed64, fields[TestProtos.TestAllTypes.SingleFixed64FieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleFloat, fields[TestProtos.TestAllTypes.SingleFloatFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleForeignEnum, fields[TestProtos.TestAllTypes.SingleForeignEnumFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleForeignMessage, fields[TestProtos.TestAllTypes.SingleForeignMessageFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleImportEnum, fields[TestProtos.TestAllTypes.SingleImportEnumFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleImportMessage, fields[TestProtos.TestAllTypes.SingleImportMessageFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleInt32, fields[TestProtos.TestAllTypes.SingleInt32FieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleInt64, fields[TestProtos.TestAllTypes.SingleInt64FieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleNestedEnum, fields[TestProtos.TestAllTypes.SingleNestedEnumFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleNestedMessage, fields[TestProtos.TestAllTypes.SingleNestedMessageFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SinglePublicImportMessage, fields[TestProtos.TestAllTypes.SinglePublicImportMessageFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleSint32, fields[TestProtos.TestAllTypes.SingleSint32FieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleSint64, fields[TestProtos.TestAllTypes.SingleSint64FieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleString, fields[TestProtos.TestAllTypes.SingleStringFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleSfixed32, fields[TestProtos.TestAllTypes.SingleSfixed32FieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleSfixed64, fields[TestProtos.TestAllTypes.SingleSfixed64FieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleUint32, fields[TestProtos.TestAllTypes.SingleUint32FieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.SingleUint64, fields[TestProtos.TestAllTypes.SingleUint64FieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.OneofBytes, fields[TestProtos.TestAllTypes.OneofBytesFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.OneofString, fields[TestProtos.TestAllTypes.OneofStringFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.OneofNestedMessage, fields[TestProtos.TestAllTypes.OneofNestedMessageFieldNumber].Accessor.GetValue(message)); + Assert.AreEqual(message.OneofUint32, fields[TestProtos.TestAllTypes.OneofUint32FieldNumber].Accessor.GetValue(message)); // Just one example for repeated fields - they're all just returning the list - var list = (IList) fields[TestAllTypes.RepeatedInt32FieldNumber].Accessor.GetValue(message); + var list = (IList) fields[TestProtos.TestAllTypes.RepeatedInt32FieldNumber].Accessor.GetValue(message); Assert.AreEqual(message.RepeatedInt32, list); Assert.AreEqual(message.RepeatedInt32[0], list[0]); // Just in case there was any doubt... @@ -85,18 +88,27 @@ public void GetValue() Assert.AreEqual("value1", dictionary["key1"]); } + [Test] + public void GetExtensionValue() + { + var message = SampleMessages.CreateFullTestAllExtensions(); + + // test that the reflector works, since the reflector just runs through IExtendableMessage + Assert.AreEqual(message.GetExtension(OptionalBoolExtension), Proto2.TestAllExtensions.Descriptor.FindFieldByNumber(OptionalBoolExtension.FieldNumber).Accessor.GetValue(message)); + } + [Test] public void Clear() { var message = SampleMessages.CreateFullTestAllTypes(); - var fields = TestAllTypes.Descriptor.Fields; - fields[TestAllTypes.SingleBoolFieldNumber].Accessor.Clear(message); - fields[TestAllTypes.SingleInt32FieldNumber].Accessor.Clear(message); - fields[TestAllTypes.SingleStringFieldNumber].Accessor.Clear(message); - fields[TestAllTypes.SingleBytesFieldNumber].Accessor.Clear(message); - fields[TestAllTypes.SingleForeignEnumFieldNumber].Accessor.Clear(message); - fields[TestAllTypes.SingleForeignMessageFieldNumber].Accessor.Clear(message); - fields[TestAllTypes.RepeatedDoubleFieldNumber].Accessor.Clear(message); + var fields = TestProtos.TestAllTypes.Descriptor.Fields; + fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.SingleInt32FieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.SingleStringFieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.SingleBytesFieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.SingleForeignEnumFieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.SingleForeignMessageFieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.RepeatedDoubleFieldNumber].Accessor.Clear(message); var expected = new TestAllTypes(SampleMessages.CreateFullTestAllTypes()) { @@ -123,14 +135,14 @@ public void SetValue_SingleFields() { // Just a sample (primitives, messages, enums, strings, byte strings) var message = SampleMessages.CreateFullTestAllTypes(); - var fields = TestAllTypes.Descriptor.Fields; - fields[TestAllTypes.SingleBoolFieldNumber].Accessor.SetValue(message, false); - fields[TestAllTypes.SingleInt32FieldNumber].Accessor.SetValue(message, 500); - fields[TestAllTypes.SingleStringFieldNumber].Accessor.SetValue(message, "It's a string"); - fields[TestAllTypes.SingleBytesFieldNumber].Accessor.SetValue(message, ByteString.CopyFrom(99, 98, 97)); - fields[TestAllTypes.SingleForeignEnumFieldNumber].Accessor.SetValue(message, ForeignEnum.ForeignFoo); - fields[TestAllTypes.SingleForeignMessageFieldNumber].Accessor.SetValue(message, new ForeignMessage { C = 12345 }); - fields[TestAllTypes.SingleDoubleFieldNumber].Accessor.SetValue(message, 20150701.5); + var fields = TestProtos.TestAllTypes.Descriptor.Fields; + fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.SetValue(message, false); + fields[TestProtos.TestAllTypes.SingleInt32FieldNumber].Accessor.SetValue(message, 500); + fields[TestProtos.TestAllTypes.SingleStringFieldNumber].Accessor.SetValue(message, "It's a string"); + fields[TestProtos.TestAllTypes.SingleBytesFieldNumber].Accessor.SetValue(message, ByteString.CopyFrom(99, 98, 97)); + fields[TestProtos.TestAllTypes.SingleForeignEnumFieldNumber].Accessor.SetValue(message, ForeignEnum.ForeignFoo); + fields[TestProtos.TestAllTypes.SingleForeignMessageFieldNumber].Accessor.SetValue(message, new ForeignMessage { C = 12345 }); + fields[TestProtos.TestAllTypes.SingleDoubleFieldNumber].Accessor.SetValue(message, 20150701.5); var expected = new TestAllTypes(SampleMessages.CreateFullTestAllTypes()) { @@ -151,7 +163,7 @@ public void SetValue_SingleFields_WrongType() { IMessage message = SampleMessages.CreateFullTestAllTypes(); var fields = message.Descriptor.Fields; - Assert.Throws(() => fields[TestAllTypes.SingleBoolFieldNumber].Accessor.SetValue(message, "This isn't a bool")); + Assert.Throws(() => fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.SetValue(message, "This isn't a bool")); } [Test] @@ -167,7 +179,7 @@ public void SetValue_RepeatedFields() { IMessage message = SampleMessages.CreateFullTestAllTypes(); var fields = message.Descriptor.Fields; - Assert.Throws(() => fields[TestAllTypes.RepeatedDoubleFieldNumber].Accessor.SetValue(message, new double[10])); + Assert.Throws(() => fields[TestProtos.TestAllTypes.RepeatedDoubleFieldNumber].Accessor.SetValue(message, new double[10])); } [Test] @@ -175,42 +187,42 @@ public void GetValue_IncorrectType() { IMessage message = SampleMessages.CreateFullTestAllTypes(); var fields = message.Descriptor.Fields; - Assert.Throws(() => fields[TestAllTypes.SingleBoolFieldNumber].Accessor.GetValue(new TestMap())); + Assert.Throws(() => fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.GetValue(new TestMap())); } [Test] public void Oneof() { var message = new TestAllTypes(); - var descriptor = TestAllTypes.Descriptor; + var descriptor = TestProtos.TestAllTypes.Descriptor; Assert.AreEqual(1, descriptor.Oneofs.Count); var oneof = descriptor.Oneofs[0]; Assert.AreEqual("oneof_field", oneof.Name); Assert.IsNull(oneof.Accessor.GetCaseFieldDescriptor(message)); message.OneofString = "foo"; - Assert.AreSame(descriptor.Fields[TestAllTypes.OneofStringFieldNumber], oneof.Accessor.GetCaseFieldDescriptor(message)); + Assert.AreSame(descriptor.Fields[TestProtos.TestAllTypes.OneofStringFieldNumber], oneof.Accessor.GetCaseFieldDescriptor(message)); message.OneofUint32 = 10; - Assert.AreSame(descriptor.Fields[TestAllTypes.OneofUint32FieldNumber], oneof.Accessor.GetCaseFieldDescriptor(message)); + Assert.AreSame(descriptor.Fields[TestProtos.TestAllTypes.OneofUint32FieldNumber], oneof.Accessor.GetCaseFieldDescriptor(message)); oneof.Accessor.Clear(message); - Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.None, message.OneofFieldCase); + Assert.AreEqual(TestProtos.TestAllTypes.OneofFieldOneofCase.None, message.OneofFieldCase); } [Test] public void FieldDescriptor_ByName() { - var descriptor = TestAllTypes.Descriptor; + var descriptor = TestProtos.TestAllTypes.Descriptor; Assert.AreSame( - descriptor.Fields[TestAllTypes.SingleBoolFieldNumber], + descriptor.Fields[TestProtos.TestAllTypes.SingleBoolFieldNumber], descriptor.Fields["single_bool"]); } [Test] public void FieldDescriptor_NotFound() { - var descriptor = TestAllTypes.Descriptor; + var descriptor = TestProtos.TestAllTypes.Descriptor; Assert.Throws(() => descriptor.Fields[999999].ToString()); Assert.Throws(() => descriptor.Fields["not found"].ToString()); } diff --git a/csharp/src/Google.Protobuf.Test/SampleMessages.cs b/csharp/src/Google.Protobuf.Test/SampleMessages.cs index 0c3781446173..b2c50397d6cf 100644 --- a/csharp/src/Google.Protobuf.Test/SampleMessages.cs +++ b/csharp/src/Google.Protobuf.Test/SampleMessages.cs @@ -32,7 +32,9 @@ using System; using Google.Protobuf.TestProtos; -using Proto2 = Google.Protobuf.TestProtos.Proto2; +using Proto2 = Google.Protobuf.TestProtos.Proto2; + +using static Google.Protobuf.TestProtos.Proto2.UnittestExtensions; namespace Google.Protobuf { @@ -61,7 +63,7 @@ public static TestAllTypes CreateFullTestAllTypes() SingleImportMessage = new ImportMessage { D = 20 }, SingleInt32 = 100, SingleInt64 = 3210987654321, - SingleNestedEnum = TestAllTypes.Types.NestedEnum.Foo, + SingleNestedEnum = TestProtos.TestAllTypes.Types.NestedEnum.Foo, SingleNestedMessage = new TestAllTypes.Types.NestedMessage { Bb = 35 }, SinglePublicImportMessage = new PublicImportMessage { E = 54 }, SingleSfixed32 = -123, @@ -83,7 +85,7 @@ public static TestAllTypes CreateFullTestAllTypes() RepeatedImportMessage = { new ImportMessage { D = 20 }, new ImportMessage { D = 25 } }, RepeatedInt32 = { 100, 200 }, RepeatedInt64 = { 3210987654321, Int64.MaxValue }, - RepeatedNestedEnum = { TestAllTypes.Types.NestedEnum.Foo, TestAllTypes.Types.NestedEnum.Neg }, + RepeatedNestedEnum = { TestProtos.TestAllTypes.Types.NestedEnum.Foo, TestProtos.TestAllTypes.Types.NestedEnum.Neg }, RepeatedNestedMessage = { new TestAllTypes.Types.NestedMessage { Bb = 35 }, new TestAllTypes.Types.NestedMessage { Bb = 10 } }, RepeatedPublicImportMessage = { new PublicImportMessage { E = 54 }, new PublicImportMessage { E = -1 } }, RepeatedSfixed32 = { -123, 123 }, @@ -149,5 +151,57 @@ public static Proto2.TestAllTypes CreateFullTestAllTypesProto2() OneofString = "Oneof string" }; } + + public static Proto2.TestAllExtensions CreateFullTestAllExtensions() + { + var message = new Proto2.TestAllExtensions(); + message.SetExtension(OptionalBoolExtension, true); + message.SetExtension(OptionalBytesExtension, ByteString.CopyFrom(1, 2, 3, 4)); + message.SetExtension(OptionalDoubleExtension, 23.5); + message.SetExtension(OptionalFixed32Extension, 23u); + message.SetExtension(OptionalFixed64Extension, 1234567890123u); + message.SetExtension(OptionalFloatExtension, 12.25f); + message.SetExtension(OptionalForeignEnumExtension, Proto2.ForeignEnum.ForeignBar); + message.SetExtension(OptionalForeignMessageExtension, new Proto2.ForeignMessage { C = 10 }); + message.SetExtension(OptionalImportEnumExtension, Proto2.ImportEnum.ImportBaz); + message.SetExtension(OptionalImportMessageExtension, new Proto2.ImportMessage { D = 20 }); + message.SetExtension(OptionalInt32Extension, 100); + message.SetExtension(OptionalInt64Extension, 3210987654321); + message.SetExtension(OptionalNestedEnumExtension, Proto2.TestAllTypes.Types.NestedEnum.Foo); + message.SetExtension(OptionalNestedMessageExtension, new Proto2.TestAllTypes.Types.NestedMessage { Bb = 35 }); + message.SetExtension(OptionalPublicImportMessageExtension, new Proto2.PublicImportMessage { E = 54 }); + message.SetExtension(OptionalSfixed32Extension, -123); + message.SetExtension(OptionalSfixed64Extension, -12345678901234); + message.SetExtension(OptionalSint32Extension, -456); + message.SetExtension(OptionalSint64Extension, -12345678901235); + message.SetExtension(OptionalStringExtension, "test"); + message.SetExtension(OptionalUint32Extension, UInt32.MaxValue); + message.SetExtension(OptionalUint64Extension, UInt64.MaxValue); + message.SetExtension(OptionalGroupExtension, new Proto2.OptionalGroup_extension { A = 10 }); + message.GetOrRegisterExtension(RepeatedBoolExtension).AddRange(new[] { true, false }); + message.GetOrRegisterExtension(RepeatedBytesExtension).AddRange(new[] { ByteString.CopyFrom(1, 2, 3, 4), ByteString.CopyFrom(5, 6), ByteString.CopyFrom(new byte[1000]) }); + message.GetOrRegisterExtension(RepeatedDoubleExtension).AddRange(new[] { -12.25, 23.5 }); + message.GetOrRegisterExtension(RepeatedFixed32Extension).AddRange(new[] { UInt32.MaxValue, 23u }); + message.GetOrRegisterExtension(RepeatedFixed64Extension).AddRange(new[] { UInt64.MaxValue, 1234567890123ul }); + message.GetOrRegisterExtension(RepeatedFloatExtension).AddRange(new[] { 100f, 12.25f }); + message.GetOrRegisterExtension(RepeatedForeignEnumExtension).AddRange(new[] { Proto2.ForeignEnum.ForeignFoo, Proto2.ForeignEnum.ForeignBar }); + message.GetOrRegisterExtension(RepeatedForeignMessageExtension).AddRange(new[] { new Proto2.ForeignMessage(), new Proto2.ForeignMessage { C = 10 } }); + message.GetOrRegisterExtension(RepeatedImportEnumExtension).AddRange(new[] { Proto2.ImportEnum.ImportBaz, Proto2.ImportEnum.ImportFoo }); + message.GetOrRegisterExtension(RepeatedImportMessageExtension).AddRange(new[] { new Proto2.ImportMessage { D = 20 }, new Proto2.ImportMessage { D = 25 } }); + message.GetOrRegisterExtension(RepeatedInt32Extension).AddRange(new[] { 100, 200 }); + message.GetOrRegisterExtension(RepeatedInt64Extension).AddRange(new[] { 3210987654321, Int64.MaxValue }); + message.GetOrRegisterExtension(RepeatedNestedEnumExtension).AddRange(new[] { Proto2.TestAllTypes.Types.NestedEnum.Foo, Proto2.TestAllTypes.Types.NestedEnum.Neg }); + message.GetOrRegisterExtension(RepeatedNestedMessageExtension).AddRange(new[] { new Proto2.TestAllTypes.Types.NestedMessage { Bb = 35 }, new Proto2.TestAllTypes.Types.NestedMessage { Bb = 10 } }); + message.GetOrRegisterExtension(RepeatedSfixed32Extension).AddRange(new[] { -123, 123 }); + message.GetOrRegisterExtension(RepeatedSfixed64Extension).AddRange(new[] { -12345678901234, 12345678901234 }); + message.GetOrRegisterExtension(RepeatedSint32Extension).AddRange(new[] { -456, 100 }); + message.GetOrRegisterExtension(RepeatedSint64Extension).AddRange(new[] { -12345678901235, 123 }); + message.GetOrRegisterExtension(RepeatedStringExtension).AddRange(new[] { "foo", "bar" }); + message.GetOrRegisterExtension(RepeatedUint32Extension).AddRange(new[] { UInt32.MaxValue, UInt32.MinValue }); + message.GetOrRegisterExtension(RepeatedUint64Extension).AddRange(new[] { UInt64.MaxValue, UInt32.MinValue }); + message.GetOrRegisterExtension(RepeatedGroupExtension).AddRange(new[] { new Proto2.RepeatedGroup_extension { A = 10 }, new Proto2.RepeatedGroup_extension { A = 20 } }); + message.SetExtension(OneofStringExtension, "Oneof string"); + return message; + } } } \ No newline at end of file diff --git a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs index 5c430e68c7ea..807e6ce0d829 100644 --- a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs @@ -380,7 +380,12 @@ internal void CrossLink() } private IFieldAccessor CreateAccessor() - { + { + if (Extension != null) + { + return new ExtensionAccessor(this); + } + // If we're given no property name, that's because we really don't want an accessor. // This could be because it's a map message, or it could be that we're loading a FileDescriptor dynamically. // TODO: Support dynamic messages. @@ -389,10 +394,6 @@ private IFieldAccessor CreateAccessor() return null; } - if (Extension != null) - { - return new ExtensionAccessor(this); - } var property = ContainingType.ClrType.GetProperty(propertyName); if (property == null) { diff --git a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs index 8879c5543b25..672f60f20217 100644 --- a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs +++ b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs @@ -123,7 +123,7 @@ static ReflectionUtil() /// the type that declares the method, and the second argument to the first parameter type of the method. /// internal static IExtensionReflectionHelper CreateExtensionHelper(Extension extension) => - (IExtensionReflectionHelper)Activator.CreateInstance(typeof(ExtensionReflectionHelper<,>).MakeGenericType(extension.TargetType, extension.GetType().GenericTypeArguments[1])); + (IExtensionReflectionHelper)Activator.CreateInstance(typeof(ExtensionReflectionHelper<,>).MakeGenericType(extension.TargetType, extension.GetType().GenericTypeArguments[1]), extension); /// /// Creates a reflection helper for the given type arguments. Currently these are created on demand From bf4f6c5431aaf54a5c19d16b08b31c6f1b4fc23f Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 5 May 2019 20:04:14 -0500 Subject: [PATCH 21/34] Make extension reflection helper use GetOrRegisterExtension --- .../Reflection/FieldAccessTest.cs | 14 ++++++++++++++ .../Google.Protobuf/Reflection/ReflectionUtil.cs | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs index 32b7a03eee0a..6332afc47021 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs @@ -97,6 +97,20 @@ public void GetExtensionValue() Assert.AreEqual(message.GetExtension(OptionalBoolExtension), Proto2.TestAllExtensions.Descriptor.FindFieldByNumber(OptionalBoolExtension.FieldNumber).Accessor.GetValue(message)); } + [Test] + public void GetRepeatedExtensionValue() + { + // check to make sure repeated accessor uses GetOrRegister + var message = new Proto2.TestAllExtensions(); + + Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); + Assert.IsNotNull(Proto2.TestAllExtensions.Descriptor.FindFieldByNumber(RepeatedBoolExtension.FieldNumber).Accessor.GetValue(message)); + Assert.IsNotNull(message.GetExtension(RepeatedBoolExtension)); + + message.ClearExtension(RepeatedBoolExtension); + Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); + } + [Test] public void Clear() { diff --git a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs index 672f60f20217..5e66b6f2e410 100644 --- a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs +++ b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs @@ -230,7 +230,7 @@ public object GetExtension(IMessage message) } else if (extension is RepeatedExtension) { - return extensionMessage.GetExtension(extension as RepeatedExtension); + return extensionMessage.GetOrRegisterExtension(extension as RepeatedExtension); } else { From 6b90ac13e07e619881c627d880215f677c6b6b1c Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Tue, 28 May 2019 15:37:04 -0500 Subject: [PATCH 22/34] Reorganize some tests --- .../GeneratedMessageTest.Proto2.cs | 268 ++++++++++++++++++ .../GeneratedMessageTest.cs | 205 +------------- .../Reflection/CustomOptionsTest.cs | 15 +- .../Reflection/FieldAccessTest.cs | 138 +++++---- 4 files changed, 358 insertions(+), 268 deletions(-) create mode 100644 csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs diff --git a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs new file mode 100644 index 000000000000..b613cc803751 --- /dev/null +++ b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs @@ -0,0 +1,268 @@ +using Google.Protobuf.TestProtos.Proto2; +using NUnit.Framework; + +namespace Google.Protobuf +{ + /// + /// Tests around the generated TestAllTypes message in unittest.proto + /// + public partial class GeneratedMessageTest + { + [Test] + public void DefaultProto2Values() + { + var message = new TestAllTypes(); + Assert.AreEqual(false, message.OptionalBool); + Assert.AreEqual(ByteString.Empty, message.OptionalBytes); + Assert.AreEqual(0.0, message.OptionalDouble); + Assert.AreEqual(0, message.OptionalFixed32); + Assert.AreEqual(0L, message.OptionalFixed64); + Assert.AreEqual(0.0f, message.OptionalFloat); + Assert.AreEqual(ForeignEnum.ForeignFoo, message.OptionalForeignEnum); + Assert.IsNull(message.OptionalForeignMessage); + Assert.AreEqual(ImportEnum.ImportFoo, message.OptionalImportEnum); + Assert.IsNull(message.OptionalImportMessage); + Assert.AreEqual(0, message.OptionalInt32); + Assert.AreEqual(0L, message.OptionalInt64); + Assert.AreEqual(TestAllTypes.Types.NestedEnum.Foo, message.OptionalNestedEnum); + Assert.IsNull(message.OptionalNestedMessage); + Assert.IsNull(message.OptionalPublicImportMessage); + Assert.AreEqual(0, message.OptionalSfixed32); + Assert.AreEqual(0L, message.OptionalSfixed64); + Assert.AreEqual(0, message.OptionalSint32); + Assert.AreEqual(0L, message.OptionalSint64); + Assert.AreEqual("", message.OptionalString); + Assert.AreEqual(0U, message.OptionalUint32); + Assert.AreEqual(0UL, message.OptionalUint64); + + // Repeated fields + Assert.AreEqual(0, message.RepeatedBool.Count); + Assert.AreEqual(0, message.RepeatedBytes.Count); + Assert.AreEqual(0, message.RepeatedDouble.Count); + Assert.AreEqual(0, message.RepeatedFixed32.Count); + Assert.AreEqual(0, message.RepeatedFixed64.Count); + Assert.AreEqual(0, message.RepeatedFloat.Count); + Assert.AreEqual(0, message.RepeatedForeignEnum.Count); + Assert.AreEqual(0, message.RepeatedForeignMessage.Count); + Assert.AreEqual(0, message.RepeatedImportEnum.Count); + Assert.AreEqual(0, message.RepeatedImportMessage.Count); + Assert.AreEqual(0, message.RepeatedNestedEnum.Count); + Assert.AreEqual(0, message.RepeatedNestedMessage.Count); + Assert.AreEqual(0, message.RepeatedSfixed32.Count); + Assert.AreEqual(0, message.RepeatedSfixed64.Count); + Assert.AreEqual(0, message.RepeatedSint32.Count); + Assert.AreEqual(0, message.RepeatedSint64.Count); + Assert.AreEqual(0, message.RepeatedString.Count); + Assert.AreEqual(0, message.RepeatedUint32.Count); + Assert.AreEqual(0, message.RepeatedUint64.Count); + + // Oneof fields + Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.None, message.OneofFieldCase); + Assert.AreEqual(0, message.OneofUint32); + Assert.AreEqual("", message.OneofString); + Assert.AreEqual(ByteString.Empty, message.OneofBytes); + Assert.IsNull(message.OneofNestedMessage); + + Assert.AreEqual(true, message.DefaultBool); + Assert.AreEqual(ByteString.CopyFromUtf8("world"), message.DefaultBytes); + Assert.AreEqual("123", message.DefaultCord); + Assert.AreEqual(52e3, message.DefaultDouble); + Assert.AreEqual(47, message.DefaultFixed32); + Assert.AreEqual(48, message.DefaultFixed64); + Assert.AreEqual(51.5, message.DefaultFloat); + Assert.AreEqual(ForeignEnum.ForeignBar, message.DefaultForeignEnum); + Assert.AreEqual(ImportEnum.ImportBar, message.DefaultImportEnum); + Assert.AreEqual(41, message.DefaultInt32); + Assert.AreEqual(42, message.DefaultInt64); + Assert.AreEqual(TestAllTypes.Types.NestedEnum.Bar, message.DefaultNestedEnum); + Assert.AreEqual(49, message.DefaultSfixed32); + Assert.AreEqual(-50, message.DefaultSfixed64); + Assert.AreEqual(-45, message.DefaultSint32); + Assert.AreEqual(46, message.DefaultSint64); + Assert.AreEqual("hello", message.DefaultString); + Assert.AreEqual("abc", message.DefaultStringPiece); + Assert.AreEqual(43, message.DefaultUint32); + Assert.AreEqual(44, message.DefaultUint64); + + Assert.False(message.HasDefaultBool); + Assert.False(message.HasDefaultBytes); + Assert.False(message.HasDefaultCord); + Assert.False(message.HasDefaultDouble); + Assert.False(message.HasDefaultFixed32); + Assert.False(message.HasDefaultFixed64); + Assert.False(message.HasDefaultFloat); + Assert.False(message.HasDefaultForeignEnum); + Assert.False(message.HasDefaultImportEnum); + Assert.False(message.HasDefaultInt32); + Assert.False(message.HasDefaultInt64); + Assert.False(message.HasDefaultNestedEnum); + Assert.False(message.HasDefaultSfixed32); + Assert.False(message.HasDefaultSfixed64); + Assert.False(message.HasDefaultSint32); + Assert.False(message.HasDefaultSint64); + Assert.False(message.HasDefaultString); + Assert.False(message.HasDefaultStringPiece); + Assert.False(message.HasDefaultUint32); + Assert.False(message.HasDefaultUint64); + } + + [Test] + public void FieldPresence() + { + var message = new TestAllTypes(); + + Assert.False(message.HasOptionalBool); + Assert.False(message.OptionalBool); + + message.OptionalBool = true; + + Assert.True(message.HasOptionalBool); + Assert.True(message.OptionalBool); + + message.OptionalBool = false; + + Assert.True(message.HasOptionalBool); + Assert.False(message.OptionalBool); + + message.ClearOptionalBool(); + + Assert.False(message.HasOptionalBool); + Assert.False(message.OptionalBool); + + Assert.False(message.HasDefaultBool); + Assert.True(message.DefaultBool); + + message.DefaultBool = false; + + Assert.True(message.HasDefaultBool); + Assert.False(message.DefaultBool); + + message.DefaultBool = true; + + Assert.True(message.HasDefaultBool); + Assert.True(message.DefaultBool); + + message.ClearDefaultBool(); + + Assert.False(message.HasDefaultBool); + Assert.True(message.DefaultBool); + } + + [Test] + public void RequiredFields() + { + var message = new TestRequired(); + Assert.False(message.IsInitialized()); + + message.A = 1; + message.B = 2; + message.C = 3; + + Assert.True(message.IsInitialized()); + } + + [Test] + public void RequiredFieldsInExtensions() + { + var message = new TestAllExtensions(); + Assert.True(message.IsInitialized()); + + message.SetExtension(TestRequired.Extensions.Single, new TestRequired()); + + Assert.False(message.IsInitialized()); + + var extensionMessage = message.GetExtension(TestRequired.Extensions.Single); + extensionMessage.A = 1; + extensionMessage.B = 2; + extensionMessage.C = 3; + + Assert.True(message.IsInitialized()); + + message.GetOrRegisterExtension(TestRequired.Extensions.Multi); + + Assert.True(message.IsInitialized()); + + message.GetExtension(TestRequired.Extensions.Multi).Add(new TestRequired()); + + Assert.False(message.IsInitialized()); + + extensionMessage = message.GetExtension(TestRequired.Extensions.Multi)[0]; + extensionMessage.A = 1; + extensionMessage.B = 2; + extensionMessage.C = 3; + + Assert.True(message.IsInitialized()); + + message.SetExtension(UnittestExtensions.OptionalBoolExtension, true); + + Assert.True(message.IsInitialized()); + + message.GetOrRegisterExtension(UnittestExtensions.RepeatedBoolExtension).Add(true); + + Assert.True(message.IsInitialized()); + } + + [Test] + public void RequiredFieldInNestedMessageMapValue() + { + var message = new TestRequiredMap(); + message.Foo.Add(0, new TestRequiredMap.Types.NestedMessage()); + + Assert.False(message.IsInitialized()); + + message.Foo[0].RequiredInt32 = 12; + + Assert.True(message.IsInitialized()); + } + + [Test] + public void RoundTrip_Groups() + { + var message = new TestAllTypes + { + OptionalGroup = new TestAllTypes.Types.OptionalGroup + { + A = 10 + }, + RepeatedGroup = + { + new TestAllTypes.Types.RepeatedGroup { A = 10 }, + new TestAllTypes.Types.RepeatedGroup { A = 20 }, + new TestAllTypes.Types.RepeatedGroup { A = 30 } + } + }; + + byte[] bytes = message.ToByteArray(); + TestAllTypes parsed = TestAllTypes.Parser.ParseFrom(bytes); + Assert.AreEqual(message, parsed); + } + + [Test] + public void RoundTrip_ExtensionGroups() + { + var message = new TestAllExtensions(); + message.SetExtension(UnittestExtensions.OptionalGroupExtension, new OptionalGroup_extension { A = 10 }); + message.GetOrRegisterExtension(UnittestExtensions.RepeatedGroupExtension).AddRange(new[] + { + new RepeatedGroup_extension { A = 10 }, + new RepeatedGroup_extension { A = 20 }, + new RepeatedGroup_extension { A = 30 } + }); + + byte[] bytes = message.ToByteArray(); + TestAllExtensions extendable_parsed = TestAllExtensions.Parser.WithExtensionRegistry(new ExtensionRegistry() { UnittestExtensions.OptionalGroupExtension, UnittestExtensions.RepeatedGroupExtension }).ParseFrom(bytes); + Assert.AreEqual(message, extendable_parsed); + } + + [Test] + public void RoundTrip_NestedExtensionGroup() + { + var message = new TestGroupExtension(); + message.SetExtension(TestNestedExtension.Extensions.OptionalGroupExtension, new TestNestedExtension.Types.OptionalGroup_extension { A = 10 }); + + byte[] bytes = message.ToByteArray(); + TestGroupExtension extendable_parsed = TestGroupExtension.Parser.WithExtensionRegistry(new ExtensionRegistry() { TestNestedExtension.Extensions.OptionalGroupExtension }).ParseFrom(bytes); + Assert.AreEqual(message, extendable_parsed); + } + } +} diff --git a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs index 6b2af137ba3b..103df7dd2fef 100644 --- a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs +++ b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs @@ -45,7 +45,7 @@ namespace Google.Protobuf /// /// Tests around the generated TestAllTypes message. /// - public class GeneratedMessageTest + public partial class GeneratedMessageTest { [Test] public void EmptyMessageFieldDistinctFromMissingMessageField() @@ -112,50 +112,6 @@ public void DefaultValues() Assert.AreEqual("", message.OneofString); Assert.AreEqual(ByteString.Empty, message.OneofBytes); Assert.IsNull(message.OneofNestedMessage); - - // proto2 default values - var message2 = new Proto2.TestAllTypes(); - Assert.AreEqual(true, message2.DefaultBool); - Assert.AreEqual(ByteString.CopyFromUtf8("world"), message2.DefaultBytes); - Assert.AreEqual("123", message2.DefaultCord); - Assert.AreEqual(52e3, message2.DefaultDouble); - Assert.AreEqual(47, message2.DefaultFixed32); - Assert.AreEqual(48, message2.DefaultFixed64); - Assert.AreEqual(51.5, message2.DefaultFloat); - Assert.AreEqual(Proto2.ForeignEnum.ForeignBar, message2.DefaultForeignEnum); - Assert.AreEqual(Proto2.ImportEnum.ImportBar, message2.DefaultImportEnum); - Assert.AreEqual(41, message2.DefaultInt32); - Assert.AreEqual(42, message2.DefaultInt64); - Assert.AreEqual(Proto2.TestAllTypes.Types.NestedEnum.Bar, message2.DefaultNestedEnum); - Assert.AreEqual(49, message2.DefaultSfixed32); - Assert.AreEqual(-50, message2.DefaultSfixed64); - Assert.AreEqual(-45, message2.DefaultSint32); - Assert.AreEqual(46, message2.DefaultSint64); - Assert.AreEqual("hello", message2.DefaultString); - Assert.AreEqual("abc", message2.DefaultStringPiece); - Assert.AreEqual(43, message2.DefaultUint32); - Assert.AreEqual(44, message2.DefaultUint64); - - Assert.False(message2.HasDefaultBool); - Assert.False(message2.HasDefaultBytes); - Assert.False(message2.HasDefaultCord); - Assert.False(message2.HasDefaultDouble); - Assert.False(message2.HasDefaultFixed32); - Assert.False(message2.HasDefaultFixed64); - Assert.False(message2.HasDefaultFloat); - Assert.False(message2.HasDefaultForeignEnum); - Assert.False(message2.HasDefaultImportEnum); - Assert.False(message2.HasDefaultInt32); - Assert.False(message2.HasDefaultInt64); - Assert.False(message2.HasDefaultNestedEnum); - Assert.False(message2.HasDefaultSfixed32); - Assert.False(message2.HasDefaultSfixed64); - Assert.False(message2.HasDefaultSint32); - Assert.False(message2.HasDefaultSint64); - Assert.False(message2.HasDefaultString); - Assert.False(message2.HasDefaultStringPiece); - Assert.False(message2.HasDefaultUint32); - Assert.False(message2.HasDefaultUint64); } [Test] @@ -168,115 +124,6 @@ public void NullStringAndBytesRejected() Assert.Throws(() => message.OneofBytes = null); } - [Test] - public void FieldPresence() - { - var message = new Proto2.TestAllTypes(); - - Assert.False(message.HasOptionalBool); - Assert.False(message.OptionalBool); - - message.OptionalBool = true; - - Assert.True(message.HasOptionalBool); - Assert.True(message.OptionalBool); - - message.OptionalBool = false; - - Assert.True(message.HasOptionalBool); - Assert.False(message.OptionalBool); - - message.ClearOptionalBool(); - - Assert.False(message.HasOptionalBool); - Assert.False(message.OptionalBool); - - Assert.False(message.HasDefaultBool); - Assert.True(message.DefaultBool); - - message.DefaultBool = false; - - Assert.True(message.HasDefaultBool); - Assert.False(message.DefaultBool); - - message.DefaultBool = true; - - Assert.True(message.HasDefaultBool); - Assert.True(message.DefaultBool); - - message.ClearDefaultBool(); - - Assert.False(message.HasDefaultBool); - Assert.True(message.DefaultBool); - } - - [Test] - public void RequiredFields() - { - var message = new Proto2.TestRequired(); - Assert.False(message.IsInitialized()); - - message.A = 1; - message.B = 2; - message.C = 3; - - Assert.True(message.IsInitialized()); - } - - [Test] - public void RequiredFieldsInExtensions() - { - var message = new Proto2.TestAllExtensions(); - Assert.True(message.IsInitialized()); - - message.SetExtension(Proto2.TestRequired.Extensions.Single, new Proto2.TestRequired()); - - Assert.False(message.IsInitialized()); - - var extensionMessage = message.GetExtension(Proto2.TestRequired.Extensions.Single); - extensionMessage.A = 1; - extensionMessage.B = 2; - extensionMessage.C = 3; - - Assert.True(message.IsInitialized()); - - message.GetOrRegisterExtension(Proto2.TestRequired.Extensions.Multi); - - Assert.True(message.IsInitialized()); - - message.GetExtension(Proto2.TestRequired.Extensions.Multi).Add(new Proto2.TestRequired()); - - Assert.False(message.IsInitialized()); - - extensionMessage = message.GetExtension(Proto2.TestRequired.Extensions.Multi)[0]; - extensionMessage.A = 1; - extensionMessage.B = 2; - extensionMessage.C = 3; - - Assert.True(message.IsInitialized()); - - message.SetExtension(Proto2.UnittestExtensions.OptionalBoolExtension, true); - - Assert.True(message.IsInitialized()); - - message.GetOrRegisterExtension(Proto2.UnittestExtensions.RepeatedBoolExtension).Add(true); - - Assert.True(message.IsInitialized()); - } - - [Test] - public void RequiredFieldInNestedMessageMapValue() - { - var message = new Proto2.TestRequiredMap(); - message.Foo.Add(0, new Proto2.TestRequiredMap.Types.NestedMessage()); - - Assert.False(message.IsInitialized()); - - message.Foo[0].RequiredInt32 = 12; - - Assert.True(message.IsInitialized()); - } - [Test] public void RoundTrip_Empty() { @@ -356,56 +203,6 @@ public void RoundTrip_RepeatedValues() Assert.AreEqual(message, parsed); } - [Test] - public void RoundTrip_Groups() - { - var message = new Proto2.TestAllTypes - { - OptionalGroup = new Proto2.TestAllTypes.Types.OptionalGroup - { - A = 10 - }, - RepeatedGroup = - { - new Proto2.TestAllTypes.Types.RepeatedGroup { A = 10 }, - new Proto2.TestAllTypes.Types.RepeatedGroup { A = 20 }, - new Proto2.TestAllTypes.Types.RepeatedGroup { A = 30 } - } - }; - - byte[] bytes = message.ToByteArray(); - Proto2.TestAllTypes parsed = Proto2.TestAllTypes.Parser.ParseFrom(bytes); - Assert.AreEqual(message, parsed); - } - - [Test] - public void RoundTrip_ExtensionGroups() - { - var message = new Proto2.TestAllExtensions(); - message.SetExtension(Proto2.UnittestExtensions.OptionalGroupExtension, new Proto2.OptionalGroup_extension { A = 10 }); - message.GetOrRegisterExtension(Proto2.UnittestExtensions.RepeatedGroupExtension).AddRange(new[] - { - new Proto2.RepeatedGroup_extension { A = 10 }, - new Proto2.RepeatedGroup_extension { A = 20 }, - new Proto2.RepeatedGroup_extension { A = 30 } - }); - - byte[] bytes = message.ToByteArray(); - Proto2.TestAllExtensions extendable_parsed = Proto2.TestAllExtensions.Parser.WithExtensionRegistry(new ExtensionRegistry() { Proto2.UnittestExtensions.OptionalGroupExtension, Proto2.UnittestExtensions.RepeatedGroupExtension }).ParseFrom(bytes); - Assert.AreEqual(message, extendable_parsed); - } - - [Test] - public void RoundTrip_NestedExtensionGroup() - { - var message = new Proto2.TestGroupExtension(); - message.SetExtension(Proto2.TestNestedExtension.Extensions.OptionalGroupExtension, new Proto2.TestNestedExtension.Types.OptionalGroup_extension { A = 10 }); - - byte[] bytes = message.ToByteArray(); - Proto2.TestGroupExtension extendable_parsed = Proto2.TestGroupExtension.Parser.WithExtensionRegistry(new ExtensionRegistry() { Proto2.TestNestedExtension.Extensions.OptionalGroupExtension }).ParseFrom(bytes); - Assert.AreEqual(message, extendable_parsed); - } - // Note that not every map within map_unittest_proto3 is used. They all go through very // similar code paths. The fact that all maps are present is validation that we have codecs // for every type. diff --git a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs index 527fa8ae1cf5..02fe778fbcf6 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs @@ -73,8 +73,8 @@ OptionFetcher EnumFetcher(CustomOptions options) [Test] public void ScalarOptions() { - var options = CustomOptionOtherValues.Descriptor.CustomOptions; var d = CustomOptionOtherValues.Descriptor; + var options = d.CustomOptions; AssertOption(-100, options.TryGetInt32, Int32Opt, d.GetOption); AssertOption(12.3456789f, options.TryGetFloat, FloatOpt, d.GetOption); AssertOption(1.234567890123456789d, options.TryGetDouble, DoubleOpt, d.GetOption); @@ -86,8 +86,9 @@ public void ScalarOptions() [Test] public void MessageOptions() { - var options = VariousComplexOptions.Descriptor.CustomOptions; - AssertOption(new ComplexOptionType1 { Foo = 42, Foo4 = { 99, 88 } }, options.TryGetMessage, ComplexOpt1, VariousComplexOptions.Descriptor.GetOption); + var d = VariousComplexOptions.Descriptor; + var options = d.CustomOptions; + AssertOption(new ComplexOptionType1 { Foo = 42, Foo4 = { 99, 88 } }, options.TryGetMessage, ComplexOpt1, d.GetOption); AssertOption(new ComplexOptionType2 { Baz = 987, @@ -95,8 +96,8 @@ public void MessageOptions() Fred = new ComplexOptionType4 { Waldo = 321 }, Barney = { new ComplexOptionType4 { Waldo = 101 }, new ComplexOptionType4 { Waldo = 212 } } }, - options.TryGetMessage, ComplexOpt2, VariousComplexOptions.Descriptor.GetOption); - AssertOption(new ComplexOptionType3 { Qux = 9 }, options.TryGetMessage, ComplexOpt3, VariousComplexOptions.Descriptor.GetOption); + options.TryGetMessage, ComplexOpt2, d.GetOption); + AssertOption(new ComplexOptionType3 { Qux = 9 }, options.TryGetMessage, ComplexOpt3, d.GetOption); } [Test] @@ -132,8 +133,8 @@ public void OptionLocations() [Test] public void MinValues() { - var options = CustomOptionMinIntegerValues.Descriptor.CustomOptions; var d = CustomOptionMinIntegerValues.Descriptor; + var options = d.CustomOptions; AssertOption(false, options.TryGetBool, BoolOpt, d.GetOption); AssertOption(int.MinValue, options.TryGetInt32, Int32Opt, d.GetOption); AssertOption(long.MinValue, options.TryGetInt64, Int64Opt, d.GetOption); @@ -150,8 +151,8 @@ public void MinValues() [Test] public void MaxValues() { - var options = CustomOptionMaxIntegerValues.Descriptor.CustomOptions; var d = CustomOptionMaxIntegerValues.Descriptor; + var options = d.CustomOptions; AssertOption(true, options.TryGetBool, BoolOpt, d.GetOption); AssertOption(int.MaxValue, options.TryGetInt32, Int32Opt, d.GetOption); AssertOption(long.MaxValue, options.TryGetInt64, Int64Opt, d.GetOption); diff --git a/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs index 6332afc47021..fcfff4f7ac69 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs @@ -86,64 +86,40 @@ public void GetValue() var dictionary = (IDictionary) fields[TestMap.MapStringStringFieldNumber].Accessor.GetValue(mapMessage); Assert.AreEqual(mapMessage.MapStringString, dictionary); Assert.AreEqual("value1", dictionary["key1"]); + } + + [Test] + public void GetValue_IncorrectType() + { + IMessage message = SampleMessages.CreateFullTestAllTypes(); + var fields = message.Descriptor.Fields; + Assert.Throws(() => fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.GetValue(new TestMap())); } [Test] - public void GetExtensionValue() + public void HasValue_Proto3() { - var message = SampleMessages.CreateFullTestAllExtensions(); - - // test that the reflector works, since the reflector just runs through IExtendableMessage - Assert.AreEqual(message.GetExtension(OptionalBoolExtension), Proto2.TestAllExtensions.Descriptor.FindFieldByNumber(OptionalBoolExtension.FieldNumber).Accessor.GetValue(message)); + IMessage message = SampleMessages.CreateFullTestAllTypes(); + var fields = message.Descriptor.Fields; + Assert.Throws(() => fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.HasValue(message)); } [Test] - public void GetRepeatedExtensionValue() + public void HasValue() { - // check to make sure repeated accessor uses GetOrRegister - var message = new Proto2.TestAllExtensions(); + IMessage message = new Proto2.TestAllTypes(); + var fields = message.Descriptor.Fields; + var accessor = fields[Proto2.TestAllTypes.OptionalBoolFieldNumber].Accessor; - Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); - Assert.IsNotNull(Proto2.TestAllExtensions.Descriptor.FindFieldByNumber(RepeatedBoolExtension.FieldNumber).Accessor.GetValue(message)); - Assert.IsNotNull(message.GetExtension(RepeatedBoolExtension)); + Assert.False(accessor.HasValue(message)); - message.ClearExtension(RepeatedBoolExtension); - Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); - } - - [Test] - public void Clear() - { - var message = SampleMessages.CreateFullTestAllTypes(); - var fields = TestProtos.TestAllTypes.Descriptor.Fields; - fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.Clear(message); - fields[TestProtos.TestAllTypes.SingleInt32FieldNumber].Accessor.Clear(message); - fields[TestProtos.TestAllTypes.SingleStringFieldNumber].Accessor.Clear(message); - fields[TestProtos.TestAllTypes.SingleBytesFieldNumber].Accessor.Clear(message); - fields[TestProtos.TestAllTypes.SingleForeignEnumFieldNumber].Accessor.Clear(message); - fields[TestProtos.TestAllTypes.SingleForeignMessageFieldNumber].Accessor.Clear(message); - fields[TestProtos.TestAllTypes.RepeatedDoubleFieldNumber].Accessor.Clear(message); - - var expected = new TestAllTypes(SampleMessages.CreateFullTestAllTypes()) - { - SingleBool = false, - SingleInt32 = 0, - SingleString = "", - SingleBytes = ByteString.Empty, - SingleForeignEnum = 0, - SingleForeignMessage = null, - }; - expected.RepeatedDouble.Clear(); - - Assert.AreEqual(expected, message); - - // Separately, maps. - var mapMessage = new TestMap { MapStringString = { { "key1", "value1" }, { "key2", "value2" } } }; - fields = TestMap.Descriptor.Fields; - fields[TestMap.MapStringStringFieldNumber].Accessor.Clear(mapMessage); - Assert.AreEqual(0, mapMessage.MapStringString.Count); + accessor.SetValue(message, true); + Assert.True(accessor.HasValue(message)); + + accessor.Clear(message); + Assert.False(accessor.HasValue(message)); } - + [Test] public void SetValue_SingleFields() { @@ -170,8 +146,8 @@ public void SetValue_SingleFields() }; Assert.AreEqual(expected, message); - } - + } + [Test] public void SetValue_SingleFields_WrongType() { @@ -196,14 +172,6 @@ public void SetValue_RepeatedFields() Assert.Throws(() => fields[TestProtos.TestAllTypes.RepeatedDoubleFieldNumber].Accessor.SetValue(message, new double[10])); } - [Test] - public void GetValue_IncorrectType() - { - IMessage message = SampleMessages.CreateFullTestAllTypes(); - var fields = message.Descriptor.Fields; - Assert.Throws(() => fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.GetValue(new TestMap())); - } - [Test] public void Oneof() { @@ -222,6 +190,39 @@ public void Oneof() oneof.Accessor.Clear(message); Assert.AreEqual(TestProtos.TestAllTypes.OneofFieldOneofCase.None, message.OneofFieldCase); + } + + [Test] + public void Clear() + { + var message = SampleMessages.CreateFullTestAllTypes(); + var fields = TestProtos.TestAllTypes.Descriptor.Fields; + fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.SingleInt32FieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.SingleStringFieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.SingleBytesFieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.SingleForeignEnumFieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.SingleForeignMessageFieldNumber].Accessor.Clear(message); + fields[TestProtos.TestAllTypes.RepeatedDoubleFieldNumber].Accessor.Clear(message); + + var expected = new TestAllTypes(SampleMessages.CreateFullTestAllTypes()) + { + SingleBool = false, + SingleInt32 = 0, + SingleString = "", + SingleBytes = ByteString.Empty, + SingleForeignEnum = 0, + SingleForeignMessage = null, + }; + expected.RepeatedDouble.Clear(); + + Assert.AreEqual(expected, message); + + // Separately, maps. + var mapMessage = new TestMap { MapStringString = { { "key1", "value1" }, { "key2", "value2" } } }; + fields = TestMap.Descriptor.Fields; + fields[TestMap.MapStringStringFieldNumber].Accessor.Clear(mapMessage); + Assert.AreEqual(0, mapMessage.MapStringString.Count); } [Test] @@ -240,5 +241,28 @@ public void FieldDescriptor_NotFound() Assert.Throws(() => descriptor.Fields[999999].ToString()); Assert.Throws(() => descriptor.Fields["not found"].ToString()); } + + [Test] + public void GetExtensionValue() + { + var message = SampleMessages.CreateFullTestAllExtensions(); + + // test that the reflector works, since the reflector just runs through IExtendableMessage + Assert.AreEqual(message.GetExtension(OptionalBoolExtension), Proto2.TestAllExtensions.Descriptor.FindFieldByNumber(OptionalBoolExtension.FieldNumber).Accessor.GetValue(message)); + } + + [Test] + public void GetRepeatedExtensionValue() + { + // check to make sure repeated accessor uses GetOrRegister + var message = new Proto2.TestAllExtensions(); + + Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); + Assert.IsNotNull(Proto2.TestAllExtensions.Descriptor.FindFieldByNumber(RepeatedBoolExtension.FieldNumber).Accessor.GetValue(message)); + Assert.IsNotNull(message.GetExtension(RepeatedBoolExtension)); + + message.ClearExtension(RepeatedBoolExtension); + Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); + } } } From 2b9d0fdfba4659ddac8211d7dcb63004882e1f54 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Tue, 28 May 2019 15:42:41 -0500 Subject: [PATCH 23/34] Add missing files to Makefile.am --- Makefile.am | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.am b/Makefile.am index 8054f9866941..3c5ce07b07f4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -68,9 +68,12 @@ csharp_EXTRA_DIST= \ csharp/protos/map_unittest_proto3.proto \ csharp/protos/unittest_custom_options_proto3.proto \ csharp/protos/unittest_import_public_proto3.proto \ + csharp/protos/unittest_import_public.proto \ csharp/protos/unittest_import_proto3.proto \ + csharp/protos/unittest_import.proto \ csharp/protos/unittest_issues.proto \ csharp/protos/unittest_proto3.proto \ + csharp/protos/unittest.proto \ csharp/src/AddressBook/AddPerson.cs \ csharp/src/AddressBook/Addressbook.cs \ csharp/src/AddressBook/AddressBook.csproj \ @@ -100,6 +103,7 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf.Test/Compatibility/TypeExtensionsTest.cs \ csharp/src/Google.Protobuf.Test/DeprecatedMemberTest.cs \ csharp/src/Google.Protobuf.Test/EqualityTester.cs \ + csharp/src/Google.Protobuf.Test/ExtensionSetTest.cs \ csharp/src/Google.Protobuf.Test/FieldCodecTest.cs \ csharp/src/Google.Protobuf.Test/FieldMaskTreeTest.cs \ csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs \ @@ -119,13 +123,17 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf.Test/TestCornerCases.cs \ csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs \ csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs \ + csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs \ csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs \ csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs \ csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs \ csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs \ + csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs \ + csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs \ csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs \ csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs \ csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs \ + csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/AnyTest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/DurationTest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/FieldMaskTest.cs \ From 29d5186867cef4cce9b434a63698288daa8bb7db Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Tue, 2 Jul 2019 17:46:01 -0500 Subject: [PATCH 24/34] Regenerate testprotos.pb --- .../TestProtos/TestMessagesProto2.cs | 855 +++++++++++++++--- csharp/src/Google.Protobuf.Test/testprotos.pb | Bin 204502 -> 326118 bytes 2 files changed, 735 insertions(+), 120 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs index 04e1dc41ad44..ac6ba48f8e23 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs @@ -25,7 +25,7 @@ public static partial class TestMessagesProto2Reflection { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "Cipnb29nbGUvcHJvdG9idWYvdGVzdF9tZXNzYWdlc19wcm90bzIucHJvdG8S", - "HXByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8yIuYyChJUZXN0QWxsVHlw", + "HXByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8yIv45ChJUZXN0QWxsVHlw", "ZXNQcm90bzISFgoOb3B0aW9uYWxfaW50MzIYASABKAUSFgoOb3B0aW9uYWxf", "aW50NjQYAiABKAMSFwoPb3B0aW9uYWxfdWludDMyGAMgASgNEhcKD29wdGlv", "bmFsX3VpbnQ2NBgEIAEoBBIXCg9vcHRpb25hbF9zaW50MzIYBSABKBESFwoP", @@ -63,130 +63,151 @@ public static partial class TestMessagesProto2Reflection { "bnVtEk8KFXJlcGVhdGVkX2ZvcmVpZ25fZW51bRg0IAMoDjIwLnByb3RvYnVm", "X3Rlc3RfbWVzc2FnZXMucHJvdG8yLkZvcmVpZ25FbnVtUHJvdG8yEiEKFXJl", "cGVhdGVkX3N0cmluZ19waWVjZRg2IAMoCUICCAISGQoNcmVwZWF0ZWRfY29y", - "ZBg3IAMoCUICCAESXQoPbWFwX2ludDMyX2ludDMyGDggAygLMkQucHJvdG9i", - "dWZfdGVzdF9tZXNzYWdlcy5wcm90bzIuVGVzdEFsbFR5cGVzUHJvdG8yLk1h", - "cEludDMySW50MzJFbnRyeRJdCg9tYXBfaW50NjRfaW50NjQYOSADKAsyRC5w", - "cm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMi5UZXN0QWxsVHlwZXNQcm90", - "bzIuTWFwSW50NjRJbnQ2NEVudHJ5EmEKEW1hcF91aW50MzJfdWludDMyGDog", - "AygLMkYucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzIuVGVzdEFsbFR5", - "cGVzUHJvdG8yLk1hcFVpbnQzMlVpbnQzMkVudHJ5EmEKEW1hcF91aW50NjRf", - "dWludDY0GDsgAygLMkYucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzIu", - "VGVzdEFsbFR5cGVzUHJvdG8yLk1hcFVpbnQ2NFVpbnQ2NEVudHJ5EmEKEW1h", - "cF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gHEJBOIiEKFEZvcmVpZ25NZXNz", + "YWdlUHJvdG8yEgkKAWMYASABKAUiwQIKFVVua25vd25Ub1Rlc3RBbGxUeXBl", + "cxIXCg5vcHRpb25hbF9pbnQzMhjpByABKAUSGAoPb3B0aW9uYWxfc3RyaW5n", + "GOoHIAEoCRJMCg5uZXN0ZWRfbWVzc2FnZRjrByABKAsyMy5wcm90b2J1Zl90", + "ZXN0X21lc3NhZ2VzLnByb3RvMi5Gb3JlaWduTWVzc2FnZVByb3RvMhJaCg1v", + "cHRpb25hbGdyb3VwGOwHIAEoCjJCLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMu", + "cHJvdG8yLlVua25vd25Ub1Rlc3RBbGxUeXBlcy5PcHRpb25hbEdyb3VwEhYK", + "DW9wdGlvbmFsX2Jvb2wY7gcgASgIEhcKDnJlcGVhdGVkX2ludDMyGPMHIAMo", + "BRoaCg1PcHRpb25hbEdyb3VwEgkKAWEYASABKAUqRgoRRm9yZWlnbkVudW1Q", + "cm90bzISDwoLRk9SRUlHTl9GT08QABIPCgtGT1JFSUdOX0JBUhABEg8KC0ZP", + "UkVJR05fQkFaEAI6SgoPZXh0ZW5zaW9uX2ludDMyEjEucHJvdG9idWZfdGVz", + "dF9tZXNzYWdlcy5wcm90bzIuVGVzdEFsbFR5cGVzUHJvdG8yGHggASgFQi8K", + "KGNvbS5nb29nbGUucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzJIAfgB", + "AQ==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ProtobufTestMessages.Proto2.ForeignEnumProto2), }, new pb::Extension[] { TestMessagesProto2Extensions.ExtensionInt32 }, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalStringPiece", "OptionalCord", "RecursiveMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedStringPiece", "RepeatedCord", "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapStringBytes", "MapStringNestedMessage", "MapStringForeignMessage", "MapStringNestedEnum", "MapStringForeignEnum", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes", "OneofBool", "OneofUint64", "OneofFloat", "OneofDouble", "OneofEnum", "Data", "Fieldname1", "FieldName2", "FieldName3", "FieldName4", "Field0Name5", "Field0Name6", "FieldName7", "FieldName8", "FieldName9", "FieldName10", "FIELDNAME11", "FIELDName12", "FieldName13", "FieldName14", "FieldName15", "FieldName16", "FieldName17", "FieldName18" }, new[]{ "OneofField" }, new[]{ typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage.Parser, new[]{ "A", "Corecursive" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalStringPiece", "OptionalCord", "RecursiveMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedStringPiece", "RepeatedCord", "PackedInt32", "PackedInt64", "PackedUint32", "PackedUint64", "PackedSint32", "PackedSint64", "PackedFixed32", "PackedFixed64", "PackedSfixed32", "PackedSfixed64", "PackedFloat", "PackedDouble", "PackedBool", "PackedNestedEnum", "UnpackedInt32", "UnpackedInt64", "UnpackedUint32", "UnpackedUint64", "UnpackedSint32", "UnpackedSint64", "UnpackedFixed32", "UnpackedFixed64", "UnpackedSfixed32", "UnpackedSfixed64", "UnpackedFloat", "UnpackedDouble", "UnpackedBool", "UnpackedNestedEnum", "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapStringBytes", "MapStringNestedMessage", "MapStringForeignMessage", "MapStringNestedEnum", "MapStringForeignEnum", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes", "OneofBool", "OneofUint64", "OneofFloat", "OneofDouble", "OneofEnum", "Data", "Fieldname1", "FieldName2", "FieldName3", "FieldName4", "Field0Name5", "Field0Name6", "FieldName7", "FieldName8", "FieldName9", "FieldName10", "FIELDNAME11", "FIELDName12", "FieldName13", "FieldName14", "FieldName15", "FieldName16", "FieldName17", "FieldName18" }, new[]{ "OneofField" }, new[]{ typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedMessage.Parser, new[]{ "A", "Corecursive" }, null, null, null, null), null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.Data), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.Data.Parser, new[]{ "GroupInt32", "GroupUint32" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrect), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrect.Parser, null, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension1), global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension1.Parser, new[]{ "Str" }, null, null, new pb::Extension[] { global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.MessageSetCorrectExtension1.Extensions.MessageSetExtension }, null), @@ -297,6 +318,34 @@ public sealed partial class TestAllTypesProto2 : pb::IExtendableMessageField number for the "packed_int32" field. + public const int PackedInt32FieldNumber = 75; + private static readonly pb::FieldCodec _repeated_packedInt32_codec + = pb::FieldCodec.ForInt32(602); + private readonly pbc::RepeatedField packedInt32_ = new pbc::RepeatedField(); + /// + /// Packed + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedInt32 { + get { return packedInt32_; } + } + + /// Field number for the "packed_int64" field. + public const int PackedInt64FieldNumber = 76; + private static readonly pb::FieldCodec _repeated_packedInt64_codec + = pb::FieldCodec.ForInt64(610); + private readonly pbc::RepeatedField packedInt64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedInt64 { + get { return packedInt64_; } + } + + /// Field number for the "packed_uint32" field. + public const int PackedUint32FieldNumber = 77; + private static readonly pb::FieldCodec _repeated_packedUint32_codec + = pb::FieldCodec.ForUInt32(618); + private readonly pbc::RepeatedField packedUint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedUint32 { + get { return packedUint32_; } + } + + /// Field number for the "packed_uint64" field. + public const int PackedUint64FieldNumber = 78; + private static readonly pb::FieldCodec _repeated_packedUint64_codec + = pb::FieldCodec.ForUInt64(626); + private readonly pbc::RepeatedField packedUint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedUint64 { + get { return packedUint64_; } + } + + /// Field number for the "packed_sint32" field. + public const int PackedSint32FieldNumber = 79; + private static readonly pb::FieldCodec _repeated_packedSint32_codec + = pb::FieldCodec.ForSInt32(634); + private readonly pbc::RepeatedField packedSint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedSint32 { + get { return packedSint32_; } + } + + /// Field number for the "packed_sint64" field. + public const int PackedSint64FieldNumber = 80; + private static readonly pb::FieldCodec _repeated_packedSint64_codec + = pb::FieldCodec.ForSInt64(642); + private readonly pbc::RepeatedField packedSint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedSint64 { + get { return packedSint64_; } + } + + /// Field number for the "packed_fixed32" field. + public const int PackedFixed32FieldNumber = 81; + private static readonly pb::FieldCodec _repeated_packedFixed32_codec + = pb::FieldCodec.ForFixed32(650); + private readonly pbc::RepeatedField packedFixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedFixed32 { + get { return packedFixed32_; } + } + + /// Field number for the "packed_fixed64" field. + public const int PackedFixed64FieldNumber = 82; + private static readonly pb::FieldCodec _repeated_packedFixed64_codec + = pb::FieldCodec.ForFixed64(658); + private readonly pbc::RepeatedField packedFixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedFixed64 { + get { return packedFixed64_; } + } + + /// Field number for the "packed_sfixed32" field. + public const int PackedSfixed32FieldNumber = 83; + private static readonly pb::FieldCodec _repeated_packedSfixed32_codec + = pb::FieldCodec.ForSFixed32(666); + private readonly pbc::RepeatedField packedSfixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedSfixed32 { + get { return packedSfixed32_; } + } + + /// Field number for the "packed_sfixed64" field. + public const int PackedSfixed64FieldNumber = 84; + private static readonly pb::FieldCodec _repeated_packedSfixed64_codec + = pb::FieldCodec.ForSFixed64(674); + private readonly pbc::RepeatedField packedSfixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedSfixed64 { + get { return packedSfixed64_; } + } + + /// Field number for the "packed_float" field. + public const int PackedFloatFieldNumber = 85; + private static readonly pb::FieldCodec _repeated_packedFloat_codec + = pb::FieldCodec.ForFloat(682); + private readonly pbc::RepeatedField packedFloat_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedFloat { + get { return packedFloat_; } + } + + /// Field number for the "packed_double" field. + public const int PackedDoubleFieldNumber = 86; + private static readonly pb::FieldCodec _repeated_packedDouble_codec + = pb::FieldCodec.ForDouble(690); + private readonly pbc::RepeatedField packedDouble_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedDouble { + get { return packedDouble_; } + } + + /// Field number for the "packed_bool" field. + public const int PackedBoolFieldNumber = 87; + private static readonly pb::FieldCodec _repeated_packedBool_codec + = pb::FieldCodec.ForBool(698); + private readonly pbc::RepeatedField packedBool_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedBool { + get { return packedBool_; } + } + + /// Field number for the "packed_nested_enum" field. + public const int PackedNestedEnumFieldNumber = 88; + private static readonly pb::FieldCodec _repeated_packedNestedEnum_codec + = pb::FieldCodec.ForEnum(706, x => (int) x, x => (global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum) x); + private readonly pbc::RepeatedField packedNestedEnum_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PackedNestedEnum { + get { return packedNestedEnum_; } + } + + /// Field number for the "unpacked_int32" field. + public const int UnpackedInt32FieldNumber = 89; + private static readonly pb::FieldCodec _repeated_unpackedInt32_codec + = pb::FieldCodec.ForInt32(712); + private readonly pbc::RepeatedField unpackedInt32_ = new pbc::RepeatedField(); + /// + /// Unpacked + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedInt32 { + get { return unpackedInt32_; } + } + + /// Field number for the "unpacked_int64" field. + public const int UnpackedInt64FieldNumber = 90; + private static readonly pb::FieldCodec _repeated_unpackedInt64_codec + = pb::FieldCodec.ForInt64(720); + private readonly pbc::RepeatedField unpackedInt64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedInt64 { + get { return unpackedInt64_; } + } + + /// Field number for the "unpacked_uint32" field. + public const int UnpackedUint32FieldNumber = 91; + private static readonly pb::FieldCodec _repeated_unpackedUint32_codec + = pb::FieldCodec.ForUInt32(728); + private readonly pbc::RepeatedField unpackedUint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedUint32 { + get { return unpackedUint32_; } + } + + /// Field number for the "unpacked_uint64" field. + public const int UnpackedUint64FieldNumber = 92; + private static readonly pb::FieldCodec _repeated_unpackedUint64_codec + = pb::FieldCodec.ForUInt64(736); + private readonly pbc::RepeatedField unpackedUint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedUint64 { + get { return unpackedUint64_; } + } + + /// Field number for the "unpacked_sint32" field. + public const int UnpackedSint32FieldNumber = 93; + private static readonly pb::FieldCodec _repeated_unpackedSint32_codec + = pb::FieldCodec.ForSInt32(744); + private readonly pbc::RepeatedField unpackedSint32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedSint32 { + get { return unpackedSint32_; } + } + + /// Field number for the "unpacked_sint64" field. + public const int UnpackedSint64FieldNumber = 94; + private static readonly pb::FieldCodec _repeated_unpackedSint64_codec + = pb::FieldCodec.ForSInt64(752); + private readonly pbc::RepeatedField unpackedSint64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedSint64 { + get { return unpackedSint64_; } + } + + /// Field number for the "unpacked_fixed32" field. + public const int UnpackedFixed32FieldNumber = 95; + private static readonly pb::FieldCodec _repeated_unpackedFixed32_codec + = pb::FieldCodec.ForFixed32(765); + private readonly pbc::RepeatedField unpackedFixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedFixed32 { + get { return unpackedFixed32_; } + } + + /// Field number for the "unpacked_fixed64" field. + public const int UnpackedFixed64FieldNumber = 96; + private static readonly pb::FieldCodec _repeated_unpackedFixed64_codec + = pb::FieldCodec.ForFixed64(769); + private readonly pbc::RepeatedField unpackedFixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedFixed64 { + get { return unpackedFixed64_; } + } + + /// Field number for the "unpacked_sfixed32" field. + public const int UnpackedSfixed32FieldNumber = 97; + private static readonly pb::FieldCodec _repeated_unpackedSfixed32_codec + = pb::FieldCodec.ForSFixed32(781); + private readonly pbc::RepeatedField unpackedSfixed32_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedSfixed32 { + get { return unpackedSfixed32_; } + } + + /// Field number for the "unpacked_sfixed64" field. + public const int UnpackedSfixed64FieldNumber = 98; + private static readonly pb::FieldCodec _repeated_unpackedSfixed64_codec + = pb::FieldCodec.ForSFixed64(785); + private readonly pbc::RepeatedField unpackedSfixed64_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedSfixed64 { + get { return unpackedSfixed64_; } + } + + /// Field number for the "unpacked_float" field. + public const int UnpackedFloatFieldNumber = 99; + private static readonly pb::FieldCodec _repeated_unpackedFloat_codec + = pb::FieldCodec.ForFloat(797); + private readonly pbc::RepeatedField unpackedFloat_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedFloat { + get { return unpackedFloat_; } + } + + /// Field number for the "unpacked_double" field. + public const int UnpackedDoubleFieldNumber = 100; + private static readonly pb::FieldCodec _repeated_unpackedDouble_codec + = pb::FieldCodec.ForDouble(801); + private readonly pbc::RepeatedField unpackedDouble_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedDouble { + get { return unpackedDouble_; } + } + + /// Field number for the "unpacked_bool" field. + public const int UnpackedBoolFieldNumber = 101; + private static readonly pb::FieldCodec _repeated_unpackedBool_codec + = pb::FieldCodec.ForBool(808); + private readonly pbc::RepeatedField unpackedBool_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedBool { + get { return unpackedBool_; } + } + + /// Field number for the "unpacked_nested_enum" field. + public const int UnpackedNestedEnumFieldNumber = 102; + private static readonly pb::FieldCodec _repeated_unpackedNestedEnum_codec + = pb::FieldCodec.ForEnum(816, x => (int) x, x => (global::ProtobufTestMessages.Proto2.TestAllTypesProto2.Types.NestedEnum) x); + private readonly pbc::RepeatedField unpackedNestedEnum_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UnpackedNestedEnum { + get { return unpackedNestedEnum_; } + } + /// Field number for the "map_int32_int32" field. public const int MapInt32Int32FieldNumber = 56; private static readonly pbc::MapField.Codec _map_mapInt32Int32_codec @@ -2044,6 +2379,34 @@ public enum OneofFieldOneofCase { if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false; if(!repeatedStringPiece_.Equals(other.repeatedStringPiece_)) return false; if(!repeatedCord_.Equals(other.repeatedCord_)) return false; + 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(!packedNestedEnum_.Equals(other.packedNestedEnum_)) return false; + 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(!unpackedNestedEnum_.Equals(other.unpackedNestedEnum_)) return false; if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false; if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false; if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false; @@ -2144,6 +2507,34 @@ public enum OneofFieldOneofCase { hash ^= repeatedForeignEnum_.GetHashCode(); hash ^= repeatedStringPiece_.GetHashCode(); hash ^= repeatedCord_.GetHashCode(); + 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 ^= packedNestedEnum_.GetHashCode(); + 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 ^= unpackedNestedEnum_.GetHashCode(); hash ^= MapInt32Int32.GetHashCode(); hash ^= MapInt64Int64.GetHashCode(); hash ^= MapUint32Uint32.GetHashCode(); @@ -2336,6 +2727,34 @@ public enum OneofFieldOneofCase { mapStringForeignMessage_.WriteTo(output, _map_mapStringForeignMessage_codec); mapStringNestedEnum_.WriteTo(output, _map_mapStringNestedEnum_codec); mapStringForeignEnum_.WriteTo(output, _map_mapStringForeignEnum_codec); + 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); + packedNestedEnum_.WriteTo(output, _repeated_packedNestedEnum_codec); + 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); + unpackedNestedEnum_.WriteTo(output, _repeated_unpackedNestedEnum_codec); if (HasOneofUint32) { output.WriteRawTag(248, 6); output.WriteUInt32(OneofUint32); @@ -2547,6 +2966,34 @@ public enum OneofFieldOneofCase { size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec); size += repeatedStringPiece_.CalculateSize(_repeated_repeatedStringPiece_codec); size += repeatedCord_.CalculateSize(_repeated_repeatedCord_codec); + 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 += packedNestedEnum_.CalculateSize(_repeated_packedNestedEnum_codec); + 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 += unpackedNestedEnum_.CalculateSize(_repeated_unpackedNestedEnum_codec); size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec); size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec); size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec); @@ -2760,6 +3207,34 @@ public enum OneofFieldOneofCase { repeatedForeignEnum_.Add(other.repeatedForeignEnum_); repeatedStringPiece_.Add(other.repeatedStringPiece_); repeatedCord_.Add(other.repeatedCord_); + 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_); + packedNestedEnum_.Add(other.packedNestedEnum_); + 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_); + unpackedNestedEnum_.Add(other.unpackedNestedEnum_); mapInt32Int32_.Add(other.mapInt32Int32_); mapInt64Int64_.Add(other.mapInt64Int64_); mapUint32Uint32_.Add(other.mapUint32Uint32_); @@ -3158,6 +3633,146 @@ public enum OneofFieldOneofCase { mapStringForeignEnum_.AddEntriesFrom(input, _map_mapStringForeignEnum_codec); break; } + case 602: + case 600: { + packedInt32_.AddEntriesFrom(input, _repeated_packedInt32_codec); + break; + } + case 610: + case 608: { + packedInt64_.AddEntriesFrom(input, _repeated_packedInt64_codec); + break; + } + case 618: + case 616: { + packedUint32_.AddEntriesFrom(input, _repeated_packedUint32_codec); + break; + } + case 626: + case 624: { + packedUint64_.AddEntriesFrom(input, _repeated_packedUint64_codec); + break; + } + case 634: + case 632: { + packedSint32_.AddEntriesFrom(input, _repeated_packedSint32_codec); + break; + } + case 642: + case 640: { + packedSint64_.AddEntriesFrom(input, _repeated_packedSint64_codec); + break; + } + case 650: + case 653: { + packedFixed32_.AddEntriesFrom(input, _repeated_packedFixed32_codec); + break; + } + case 658: + case 657: { + packedFixed64_.AddEntriesFrom(input, _repeated_packedFixed64_codec); + break; + } + case 666: + case 669: { + packedSfixed32_.AddEntriesFrom(input, _repeated_packedSfixed32_codec); + break; + } + case 674: + case 673: { + packedSfixed64_.AddEntriesFrom(input, _repeated_packedSfixed64_codec); + break; + } + case 682: + case 685: { + packedFloat_.AddEntriesFrom(input, _repeated_packedFloat_codec); + break; + } + case 690: + case 689: { + packedDouble_.AddEntriesFrom(input, _repeated_packedDouble_codec); + break; + } + case 698: + case 696: { + packedBool_.AddEntriesFrom(input, _repeated_packedBool_codec); + break; + } + case 706: + case 704: { + packedNestedEnum_.AddEntriesFrom(input, _repeated_packedNestedEnum_codec); + break; + } + case 714: + case 712: { + unpackedInt32_.AddEntriesFrom(input, _repeated_unpackedInt32_codec); + break; + } + case 722: + case 720: { + unpackedInt64_.AddEntriesFrom(input, _repeated_unpackedInt64_codec); + break; + } + case 730: + case 728: { + unpackedUint32_.AddEntriesFrom(input, _repeated_unpackedUint32_codec); + break; + } + case 738: + case 736: { + unpackedUint64_.AddEntriesFrom(input, _repeated_unpackedUint64_codec); + break; + } + case 746: + case 744: { + unpackedSint32_.AddEntriesFrom(input, _repeated_unpackedSint32_codec); + break; + } + case 754: + case 752: { + unpackedSint64_.AddEntriesFrom(input, _repeated_unpackedSint64_codec); + break; + } + case 762: + case 765: { + unpackedFixed32_.AddEntriesFrom(input, _repeated_unpackedFixed32_codec); + break; + } + case 770: + case 769: { + unpackedFixed64_.AddEntriesFrom(input, _repeated_unpackedFixed64_codec); + break; + } + case 778: + case 781: { + unpackedSfixed32_.AddEntriesFrom(input, _repeated_unpackedSfixed32_codec); + break; + } + case 786: + case 785: { + unpackedSfixed64_.AddEntriesFrom(input, _repeated_unpackedSfixed64_codec); + break; + } + case 794: + case 797: { + unpackedFloat_.AddEntriesFrom(input, _repeated_unpackedFloat_codec); + break; + } + case 802: + case 801: { + unpackedDouble_.AddEntriesFrom(input, _repeated_unpackedDouble_codec); + break; + } + case 810: + case 808: { + unpackedBool_.AddEntriesFrom(input, _repeated_unpackedBool_codec); + break; + } + case 818: + case 816: { + unpackedNestedEnum_.AddEntriesFrom(input, _repeated_unpackedNestedEnum_codec); + break; + } case 888: { OneofUint32 = input.ReadUInt32(); break; diff --git a/csharp/src/Google.Protobuf.Test/testprotos.pb b/csharp/src/Google.Protobuf.Test/testprotos.pb index 95fe4f345ef9221eb2e0361657823b6aaf035bdb..4404d162585edd6847a228df006fd61c6bb483aa 100644 GIT binary patch delta 96935 zcmd44d0<^twLhM-&(2M9lC(FcX?vSax9L2k$<3S=+NN_UZMiKVPz-5u+eXqP<|aT< z-zlIX;s9Kr3^IchAIc~Q6a}6GJ{4tj0F zuN1^fmwDa>QEpAo;NHxF!s=rd)Ob;ww6?eZ`1U@(*ef`3^KqNEoV+=j=NEYH+AUk6 z4*k)(G8tv9^Vd6nbsSaG@w%qpEB7KkpOv@T@va(k-_#|?N1X3x&aA&Y(=~QV=5u2w zm;A-?9OkEH}u4X@`D3i-Bo+yXQ$$wyFx}O&JKod2He-ptCVLm^RKGb_;&8mW0~RFy zjPg)$J#=z>z9MgR;8ZM&Z|{u{rc?3uo_GqwA>P#!Z;$V7?^_h_8i?;5Ob^8Ow5Q_( zds6XTUHy>GYVRII>2$mr?T+@!Cv8^bi}uQQsJ&LQF`^C-khPK(X$kx*OG-tJ98#_I zWZ9N@j6hmhzA8yoYAq~MB_XUb1?jm}rXW>mRbkQAJa7NA`Q8{kLNeDDRLFNAQ8E0x zQF-YsuVg#kn3dh#+xPXQ(hsH{Vtd$xQ@zsOzJadZp7!qD{k?;Iv1r_x=Vc!2FRxYa zQC0YGs{JSb5yZ+!&jX*FbB2jtBnqDBD%M&zq)`GmlkFbSg48R>r8J+cd(~!JXY*9a;5C zPS(#1lj(PRrZw8S+t1x+nsG8=hdab?W%HcmI1RQ5g&+L)Z?ax78v0XxsrG?XryLDc zad))QkW_`$XvlgNqha#nEPf#WT4uUj42O?BPQxMd$JmUDc_TJ?CO&DNvn#Vfge7>+AGkq zx@Ore+kEAuLGqtOIup4Vu&p>S=b_|A1ehaIsNtURL4V0c! zu%Rw?EDB;WtV@IoHq`m^y)hbbP(m&bP_z_9Ym=Jn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O~D1;3MJ7X)>Vya3RLTiY6?{AtWXjZ zVx1N0Og!XyhM`kA6DptEBVg7x`S6fXZ|(Os^W#xiGzIOy|mMz^g_zgFOM(K4(A$RH_+Jy=GK1pnA=k=L`z< znl;b!*f3yB=fMP2rt@HWJut~^=y_1RZdB(%^}12bWIut`ZzfbgrJ4!V8&;^9Fuh^* zn+ek!R=xAtZD362!}Mk(6XCuKJRhnzjp}@;-ZZN7p?XuO`pLkxMWy^}8MyW!a4eB( z{};hwah9t)-@8p}T-lj8Iuha4^&(p^IQ+U8L$@fw4)ohQ;lqyr+-^s_v*-tt?JL<^ zQT$$%)OH|ruiLdC{-!<>{CFa`hrqE|Li83+tYL`SJ|}ccRF=p@%(5ig=OjDqN3iXw zZG5zL?A<`ig>A#&!39e8ZZXs*J5;g{qWDuCY7-Xi%O6BFGUzdm zBs&m>@WZJ5ag+v$9V8IpM^ScUAOu7BVZ@S{8=k6Uk#Q0ee-gcLNYuoSqHTIw9#lSx zdJVM;JdTf|gN{%Y8GAp8%KmhFDBRe~1sx{2K-E97VUi1QeiBvri16biS0Mc);vjMN zO`Ggk$v%(b-xpQIwV?dDRdq+I`bAX!vZ(5gQq|vCRl!vCi=wIt7pN%~T2n4msp{{n zs$45C19lnYu_E>P94>??x{aDElx1zBW)^Q%ZgnN)Ge zB#P%Bqtc%uA9)dXyYe5S5WLNW?EG4Pllp+2K>yAFQTkfn86T|k>xkea(%OKid>w7S z18+dg_gwZ(RQk?~xMucElFJ>#n z1*$Cxz`_>vSF@F@K()mqvRwVE82g|z-$$i?P(BIaM0x%mv0N^}WaKG+ALToFz|AJb z$DEPs|6Qu@%pm`Jv>k5vl837QT|T)agcD&!FN&ShElFi5#6>X&DoDQ&SEcH+Vx;7r z`3Rywe}jQ2%! Date: Tue, 2 Jul 2019 18:06:55 -0500 Subject: [PATCH 25/34] Review changes * Add Syntax enum and make file syntax checks check the enum * Made IsPacked a normal get method without ternary op * Moved IFieldAccessor.HasValue to IFieldPresenceAccessor * Change naming of GetIsExtensionsInitialized * Fixed stray text in summary text --- .../Reflection/FieldAccessTest.cs | 4 +- .../src/Google.Protobuf/MessageExtensions.cs | 8 ++-- .../Reflection/FieldDescriptor.cs | 15 +++++++- .../Reflection/FileDescriptor.cs | 37 +++++++++++++++++++ .../Reflection/IFieldAccessor.cs | 16 +++++--- .../Reflection/MessageDescriptor.cs | 2 +- .../Reflection/ReflectionUtil.cs | 2 +- .../Reflection/SingleFieldAccessor.cs | 4 +- 8 files changed, 72 insertions(+), 16 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs index fcfff4f7ac69..dd753e8df4de 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs @@ -101,7 +101,7 @@ public void HasValue_Proto3() { IMessage message = SampleMessages.CreateFullTestAllTypes(); var fields = message.Descriptor.Fields; - Assert.Throws(() => fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.HasValue(message)); + Assert.Throws(() => (fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor as IFieldPresenceAccessor).HasValue(message)); } [Test] @@ -109,7 +109,7 @@ public void HasValue() { IMessage message = new Proto2.TestAllTypes(); var fields = message.Descriptor.Fields; - var accessor = fields[Proto2.TestAllTypes.OptionalBoolFieldNumber].Accessor; + var accessor = fields[Proto2.TestAllTypes.OptionalBoolFieldNumber].Accessor as IFieldPresenceAccessor; Assert.False(accessor.HasValue(message)); diff --git a/csharp/src/Google.Protobuf/MessageExtensions.cs b/csharp/src/Google.Protobuf/MessageExtensions.cs index d297a118c508..986c3798dd9f 100644 --- a/csharp/src/Google.Protobuf/MessageExtensions.cs +++ b/csharp/src/Google.Protobuf/MessageExtensions.cs @@ -148,12 +148,12 @@ public static ByteString ToByteString(this IMessage message) /// public static bool IsInitialized(this IMessage message) { - if (message.Descriptor.File.Proto.Syntax == "proto3") + if (message.Descriptor.File.Syntax == Syntax.Proto3) { return true; } - if (!message.Descriptor.GetIsExtensionsInitialized(message)) + if (!message.Descriptor.IsExtensionsInitialized(message)) { return false; } @@ -183,7 +183,7 @@ public static bool IsInitialized(this IMessage message) } else if (f.FieldType == FieldType.Message || f.FieldType == FieldType.Group) { - if (f.Accessor.HasValue(message)) + if ((f.Accessor as IFieldPresenceAccessor).HasValue(message)) { return ((IMessage)f.Accessor.GetValue(message)).IsInitialized(); } @@ -194,7 +194,7 @@ public static bool IsInitialized(this IMessage message) } else if (f.IsRequired) { - return f.Accessor.HasValue(message); + return (f.Accessor as IFieldPresenceAccessor).HasValue(message); } else { diff --git a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs index 807e6ce0d829..a8b9e69f44aa 100644 --- a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs @@ -201,7 +201,20 @@ private static FieldType GetFieldTypeFromProtoType(FieldDescriptorProto.Types.Ty /// /// Returns true if this field is a packed, repeated field; false otherwise. /// - public bool IsPacked => File.Proto.Syntax != "proto3" ? Proto.Options?.Packed ?? false : !Proto.Options.HasPacked || Proto.Options.Packed; + public bool IsPacked + { + get + { + if (File.Syntax != Syntax.Proto3) + { + return Proto.Options?.Packed ?? false; + } + else + { + return !Proto.Options.HasPacked || Proto.Options.Packed; + } + } + } /// /// Returns true if this field extends another message type; false otherwise. diff --git a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs index 13266f725dd9..993f428cab78 100644 --- a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs @@ -42,6 +42,25 @@ namespace Google.Protobuf.Reflection { + /// + /// The syntax of a .proto file + /// + public enum Syntax + { + /// + /// Proto2 syntax + /// + Proto2, + /// + /// Proto3 syntax + /// + Proto3, + /// + /// An unknown declared syntax + /// + Unknown + } + /// /// Describes a .proto file, including everything defined within. /// IDescriptor is implemented such that the File property returns this descriptor, @@ -87,6 +106,19 @@ private FileDescriptor(ByteString descriptorData, FileDescriptorProto proto, IEn Extensions = new ExtensionCollection(this, generatedCodeInfo?.Extensions); declarations = new Lazy>(CreateDeclarationMap, LazyThreadSafetyMode.ExecutionAndPublication); + + if (!proto.HasSyntax || proto.Syntax == "proto2") + { + Syntax = Syntax.Proto2; + } + else if (proto.Syntax == "proto3") + { + Syntax = Syntax.Proto3; + } + else + { + Syntax = Syntax.Unknown; + } } private Dictionary CreateDeclarationMap() @@ -217,6 +249,11 @@ private static IList DeterminePublicDependencies(FileDescriptor /// internal FileDescriptorProto Proto { get; } + /// + /// The syntax of the file + /// + public Syntax Syntax { get; } + /// /// The file name. /// diff --git a/csharp/src/Google.Protobuf/Reflection/IFieldAccessor.cs b/csharp/src/Google.Protobuf/Reflection/IFieldAccessor.cs index 8f7ef3c67c92..373984e9b144 100644 --- a/csharp/src/Google.Protobuf/Reflection/IFieldAccessor.cs +++ b/csharp/src/Google.Protobuf/Reflection/IFieldAccessor.cs @@ -51,11 +51,6 @@ public interface IFieldAccessor /// void Clear(IMessage message); - /// - /// Indicates whether the field in the specified message is set. For proto3 fields, this throws an - /// - bool HasValue(IMessage message); - /// /// Fetches the field value. For repeated values, this will be an /// implementation. For map values, this will be an @@ -73,4 +68,15 @@ public interface IFieldAccessor /// The field is not a "simple" field. void SetValue(IMessage message, object value); } + + /// + /// Allows field presence to be checked reflectively. This is implemented for all single field accessors + /// + public interface IFieldPresenceAccessor : IFieldAccessor + { + /// + /// Indicates whether the field in the specified message is set. For proto3 fields, this throws an + /// + bool HasValue(IMessage message); + } } \ No newline at end of file diff --git a/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs index a6ecfb984b0e..6a93a8faa827 100644 --- a/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs @@ -136,7 +136,7 @@ internal override IReadOnlyList GetNestedDescriptorListForField( internal DescriptorProto Proto { get; } - internal bool GetIsExtensionsInitialized(IMessage message) + internal bool IsExtensionsInitialized(IMessage message) { if (Proto.ExtensionRange.Count == 0) { diff --git a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs index 5e66b6f2e410..28f724b2d8b3 100644 --- a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs +++ b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs @@ -71,7 +71,7 @@ static ReflectionUtil() /// /// Empty Type[] used when calling GetProperty to force property instead of indexer fetching. - /// getFieldFunc + /// internal static readonly Type[] EmptyTypes = new Type[0]; /// diff --git a/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs b/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs index dc6e0ca9ae18..d5a8e6ff7dd3 100644 --- a/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs +++ b/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs @@ -39,7 +39,7 @@ namespace Google.Protobuf.Reflection /// /// Accessor for single fields. /// - internal sealed class SingleFieldAccessor : FieldAccessorBase + internal sealed class SingleFieldAccessor : FieldAccessorBase, IFieldPresenceAccessor { // All the work here is actually done in the constructor - it creates the appropriate delegates. // There are various cases to consider, based on the property type (message, string/bytes, or "genuine" primitive) @@ -57,7 +57,7 @@ internal SingleFieldAccessor(PropertyInfo property, FieldDescriptor descriptor) throw new ArgumentException("Not all required properties/methods available"); } setValueDelegate = ReflectionUtil.CreateActionIMessageObject(property.GetSetMethod()); - if (descriptor.File.Proto.Syntax == "proto3") + if (descriptor.File.Syntax == Syntax.Proto3) { hasDelegate = message => { throw new InvalidOperationException("HasValue is not implemented for proto3 fields"); From 29141f482c52504b995f625e3744c8f0b7c2dc3d Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 14 Jul 2019 00:14:36 -0500 Subject: [PATCH 26/34] Fix default extension values being unused in FieldCodec --- .../GeneratedMessageTest.Proto2.cs | 108 +++++++++++++++++- csharp/src/Google.Protobuf/FieldCodec.cs | 37 +++--- 2 files changed, 123 insertions(+), 22 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs index b613cc803751..aa977db1415e 100644 --- a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs +++ b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs @@ -1,6 +1,9 @@ using Google.Protobuf.TestProtos.Proto2; +using Proto2 = Google.Protobuf.TestProtos.Proto2; using NUnit.Framework; +using static Google.Protobuf.TestProtos.Proto2.UnittestExtensions; + namespace Google.Protobuf { /// @@ -24,7 +27,7 @@ public void DefaultProto2Values() Assert.IsNull(message.OptionalImportMessage); Assert.AreEqual(0, message.OptionalInt32); Assert.AreEqual(0L, message.OptionalInt64); - Assert.AreEqual(TestAllTypes.Types.NestedEnum.Foo, message.OptionalNestedEnum); + Assert.AreEqual(Proto2.TestAllTypes.Types.NestedEnum.Foo, message.OptionalNestedEnum); Assert.IsNull(message.OptionalNestedMessage); Assert.IsNull(message.OptionalPublicImportMessage); Assert.AreEqual(0, message.OptionalSfixed32); @@ -57,7 +60,7 @@ public void DefaultProto2Values() Assert.AreEqual(0, message.RepeatedUint64.Count); // Oneof fields - Assert.AreEqual(TestAllTypes.OneofFieldOneofCase.None, message.OneofFieldCase); + Assert.AreEqual(Proto2.TestAllTypes.OneofFieldOneofCase.None, message.OneofFieldCase); Assert.AreEqual(0, message.OneofUint32); Assert.AreEqual("", message.OneofString); Assert.AreEqual(ByteString.Empty, message.OneofBytes); @@ -74,7 +77,7 @@ public void DefaultProto2Values() Assert.AreEqual(ImportEnum.ImportBar, message.DefaultImportEnum); Assert.AreEqual(41, message.DefaultInt32); Assert.AreEqual(42, message.DefaultInt64); - Assert.AreEqual(TestAllTypes.Types.NestedEnum.Bar, message.DefaultNestedEnum); + Assert.AreEqual(Proto2.TestAllTypes.Types.NestedEnum.Bar, message.DefaultNestedEnum); Assert.AreEqual(49, message.DefaultSfixed32); Assert.AreEqual(-50, message.DefaultSfixed64); Assert.AreEqual(-45, message.DefaultSint32); @@ -106,6 +109,103 @@ public void DefaultProto2Values() Assert.False(message.HasDefaultUint64); } + [Test] + public void DefaultExtensionValues() + { + var message = new TestAllExtensions(); + Assert.AreEqual(false, message.GetExtension(OptionalBoolExtension)); + Assert.AreEqual(ByteString.Empty, message.GetExtension(OptionalBytesExtension)); + Assert.AreEqual(0.0, message.GetExtension(OptionalDoubleExtension)); + Assert.AreEqual(0, message.GetExtension(OptionalFixed32Extension)); + Assert.AreEqual(0L, message.GetExtension(OptionalFixed64Extension)); + Assert.AreEqual(0.0f, message.GetExtension(OptionalFloatExtension)); + Assert.AreEqual(ForeignEnum.ForeignFoo, message.GetExtension(OptionalForeignEnumExtension)); + Assert.IsNull(message.GetExtension(OptionalForeignMessageExtension)); + Assert.AreEqual(ImportEnum.ImportFoo, message.GetExtension(OptionalImportEnumExtension)); + Assert.IsNull(message.GetExtension(OptionalImportMessageExtension)); + Assert.AreEqual(0, message.GetExtension(OptionalInt32Extension)); + Assert.AreEqual(0L, message.GetExtension(OptionalInt64Extension)); + Assert.AreEqual(Proto2.TestAllTypes.Types.NestedEnum.Foo, message.GetExtension(OptionalNestedEnumExtension)); + Assert.IsNull(message.GetExtension(OptionalNestedMessageExtension)); + Assert.IsNull(message.GetExtension(OptionalPublicImportMessageExtension)); + Assert.AreEqual(0, message.GetExtension(OptionalSfixed32Extension)); + Assert.AreEqual(0L, message.GetExtension(OptionalSfixed64Extension)); + Assert.AreEqual(0, message.GetExtension(OptionalSint32Extension)); + Assert.AreEqual(0L, message.GetExtension(OptionalSint64Extension)); + Assert.AreEqual("", message.GetExtension(OptionalStringExtension)); + Assert.AreEqual(0U, message.GetExtension(OptionalUint32Extension)); + Assert.AreEqual(0UL, message.GetExtension(OptionalUint64Extension)); + + // Repeated fields + Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); + Assert.IsNull(message.GetExtension(RepeatedBytesExtension)); + Assert.IsNull(message.GetExtension(RepeatedDoubleExtension)); + Assert.IsNull(message.GetExtension(RepeatedFixed32Extension)); + Assert.IsNull(message.GetExtension(RepeatedFixed64Extension)); + Assert.IsNull(message.GetExtension(RepeatedFloatExtension)); + Assert.IsNull(message.GetExtension(RepeatedForeignEnumExtension)); + Assert.IsNull(message.GetExtension(RepeatedForeignMessageExtension)); + Assert.IsNull(message.GetExtension(RepeatedImportEnumExtension)); + Assert.IsNull(message.GetExtension(RepeatedImportMessageExtension)); + Assert.IsNull(message.GetExtension(RepeatedNestedEnumExtension)); + Assert.IsNull(message.GetExtension(RepeatedNestedMessageExtension)); + Assert.IsNull(message.GetExtension(RepeatedSfixed32Extension)); + Assert.IsNull(message.GetExtension(RepeatedSfixed64Extension)); + Assert.IsNull(message.GetExtension(RepeatedSint32Extension)); + Assert.IsNull(message.GetExtension(RepeatedSint64Extension)); + Assert.IsNull(message.GetExtension(RepeatedStringExtension)); + Assert.IsNull(message.GetExtension(RepeatedUint32Extension)); + Assert.IsNull(message.GetExtension(RepeatedUint64Extension)); + + // Oneof fields + Assert.AreEqual(0, message.GetExtension(OneofUint32Extension)); + Assert.AreEqual("", message.GetExtension(OneofStringExtension)); + Assert.AreEqual(ByteString.Empty, message.GetExtension(OneofBytesExtension)); + Assert.IsNull(message.GetExtension(OneofNestedMessageExtension)); + + Assert.AreEqual(true, message.GetExtension(DefaultBoolExtension)); + Assert.AreEqual(ByteString.CopyFromUtf8("world"), message.GetExtension(DefaultBytesExtension)); + Assert.AreEqual("123", message.GetExtension(DefaultCordExtension)); + Assert.AreEqual(52e3, message.GetExtension(DefaultDoubleExtension)); + Assert.AreEqual(47, message.GetExtension(DefaultFixed32Extension)); + Assert.AreEqual(48, message.GetExtension(DefaultFixed64Extension)); + Assert.AreEqual(51.5, message.GetExtension(DefaultFloatExtension)); + Assert.AreEqual(ForeignEnum.ForeignBar, message.GetExtension(DefaultForeignEnumExtension)); + Assert.AreEqual(ImportEnum.ImportBar, message.GetExtension(DefaultImportEnumExtension)); + Assert.AreEqual(41, message.GetExtension(DefaultInt32Extension)); + Assert.AreEqual(42, message.GetExtension(DefaultInt64Extension)); + Assert.AreEqual(Proto2.TestAllTypes.Types.NestedEnum.Bar, message.GetExtension(DefaultNestedEnumExtension)); + Assert.AreEqual(49, message.GetExtension(DefaultSfixed32Extension)); + Assert.AreEqual(-50, message.GetExtension(DefaultSfixed64Extension)); + Assert.AreEqual(-45, message.GetExtension(DefaultSint32Extension)); + Assert.AreEqual(46, message.GetExtension(DefaultSint64Extension)); + Assert.AreEqual("hello", message.GetExtension(DefaultStringExtension)); + Assert.AreEqual("abc", message.GetExtension(DefaultStringPieceExtension)); + Assert.AreEqual(43, message.GetExtension(DefaultUint32Extension)); + Assert.AreEqual(44, message.GetExtension(DefaultUint64Extension)); + + Assert.False(message.HasExtension(DefaultBoolExtension)); + Assert.False(message.HasExtension(DefaultBytesExtension)); + Assert.False(message.HasExtension(DefaultCordExtension)); + Assert.False(message.HasExtension(DefaultDoubleExtension)); + Assert.False(message.HasExtension(DefaultFixed32Extension)); + Assert.False(message.HasExtension(DefaultFixed64Extension)); + Assert.False(message.HasExtension(DefaultFloatExtension)); + Assert.False(message.HasExtension(DefaultForeignEnumExtension)); + Assert.False(message.HasExtension(DefaultImportEnumExtension)); + Assert.False(message.HasExtension(DefaultInt32Extension)); + Assert.False(message.HasExtension(DefaultInt64Extension)); + Assert.False(message.HasExtension(DefaultNestedEnumExtension)); + Assert.False(message.HasExtension(DefaultSfixed32Extension)); + Assert.False(message.HasExtension(DefaultSfixed64Extension)); + Assert.False(message.HasExtension(DefaultSint32Extension)); + Assert.False(message.HasExtension(DefaultSint64Extension)); + Assert.False(message.HasExtension(DefaultStringExtension)); + Assert.False(message.HasExtension(DefaultStringPieceExtension)); + Assert.False(message.HasExtension(DefaultUint32Extension)); + Assert.False(message.HasExtension(DefaultUint64Extension)); + } + [Test] public void FieldPresence() { @@ -233,7 +333,7 @@ public void RoundTrip_Groups() }; byte[] bytes = message.ToByteArray(); - TestAllTypes parsed = TestAllTypes.Parser.ParseFrom(bytes); + TestAllTypes parsed = Proto2.TestAllTypes.Parser.ParseFrom(bytes); Assert.AreEqual(message, parsed); } diff --git a/csharp/src/Google.Protobuf/FieldCodec.cs b/csharp/src/Google.Protobuf/FieldCodec.cs index c2c4b57c39c9..4beb998f6b06 100644 --- a/csharp/src/Google.Protobuf/FieldCodec.cs +++ b/csharp/src/Google.Protobuf/FieldCodec.cs @@ -218,7 +218,7 @@ public static FieldCodec ForEnum(uint tag, Func toInt32, FuncA codec for the given tag. public static FieldCodec ForString(uint tag, string defaultValue) { - return new FieldCodec(input => input.ReadString(), (output, value) => output.WriteString(value), CodedOutputStream.ComputeStringSize, tag); + return new FieldCodec(input => input.ReadString(), (output, value) => output.WriteString(value), CodedOutputStream.ComputeStringSize, tag, defaultValue); } /// @@ -229,7 +229,7 @@ public static FieldCodec ForString(uint tag, string defaultValue) /// A codec for the given tag. public static FieldCodec ForBytes(uint tag, ByteString defaultValue) { - return new FieldCodec(input => input.ReadBytes(), (output, value) => output.WriteBytes(value), CodedOutputStream.ComputeBytesSize, tag); + return new FieldCodec(input => input.ReadBytes(), (output, value) => output.WriteBytes(value), CodedOutputStream.ComputeBytesSize, tag, defaultValue); } /// @@ -240,7 +240,7 @@ public static FieldCodec ForBytes(uint tag, ByteString defaultValue) /// A codec for the given tag. public static FieldCodec ForBool(uint tag, bool defaultValue) { - return new FieldCodec(input => input.ReadBool(), (output, value) => output.WriteBool(value), CodedOutputStream.BoolSize, tag); + return new FieldCodec(input => input.ReadBool(), (output, value) => output.WriteBool(value), CodedOutputStream.BoolSize, tag, defaultValue); } /// @@ -251,7 +251,7 @@ public static FieldCodec ForBool(uint tag, bool defaultValue) /// A codec for the given tag. public static FieldCodec ForInt32(uint tag, int defaultValue) { - return new FieldCodec(input => input.ReadInt32(), (output, value) => output.WriteInt32(value), CodedOutputStream.ComputeInt32Size, tag); + return new FieldCodec(input => input.ReadInt32(), (output, value) => output.WriteInt32(value), CodedOutputStream.ComputeInt32Size, tag, defaultValue); } /// @@ -262,7 +262,7 @@ public static FieldCodec ForInt32(uint tag, int defaultValue) /// A codec for the given tag. public static FieldCodec ForSInt32(uint tag, int defaultValue) { - return new FieldCodec(input => input.ReadSInt32(), (output, value) => output.WriteSInt32(value), CodedOutputStream.ComputeSInt32Size, tag); + return new FieldCodec(input => input.ReadSInt32(), (output, value) => output.WriteSInt32(value), CodedOutputStream.ComputeSInt32Size, tag, defaultValue); } /// @@ -273,7 +273,7 @@ public static FieldCodec ForSInt32(uint tag, int defaultValue) /// A codec for the given tag. public static FieldCodec ForFixed32(uint tag, uint defaultValue) { - return new FieldCodec(input => input.ReadFixed32(), (output, value) => output.WriteFixed32(value), 4, tag); + return new FieldCodec(input => input.ReadFixed32(), (output, value) => output.WriteFixed32(value), 4, tag, defaultValue); } /// @@ -284,7 +284,7 @@ public static FieldCodec ForFixed32(uint tag, uint defaultValue) /// A codec for the given tag. public static FieldCodec ForSFixed32(uint tag, int defaultValue) { - return new FieldCodec(input => input.ReadSFixed32(), (output, value) => output.WriteSFixed32(value), 4, tag); + return new FieldCodec(input => input.ReadSFixed32(), (output, value) => output.WriteSFixed32(value), 4, tag, defaultValue); } /// @@ -295,7 +295,7 @@ public static FieldCodec ForSFixed32(uint tag, int defaultValue) /// A codec for the given tag. public static FieldCodec ForUInt32(uint tag, uint defaultValue) { - return new FieldCodec(input => input.ReadUInt32(), (output, value) => output.WriteUInt32(value), CodedOutputStream.ComputeUInt32Size, tag); + return new FieldCodec(input => input.ReadUInt32(), (output, value) => output.WriteUInt32(value), CodedOutputStream.ComputeUInt32Size, tag, defaultValue); } /// @@ -306,7 +306,7 @@ public static FieldCodec ForUInt32(uint tag, uint defaultValue) /// A codec for the given tag. public static FieldCodec ForInt64(uint tag, long defaultValue) { - return new FieldCodec(input => input.ReadInt64(), (output, value) => output.WriteInt64(value), CodedOutputStream.ComputeInt64Size, tag); + return new FieldCodec(input => input.ReadInt64(), (output, value) => output.WriteInt64(value), CodedOutputStream.ComputeInt64Size, tag, defaultValue); } /// @@ -317,7 +317,7 @@ public static FieldCodec ForInt64(uint tag, long defaultValue) /// A codec for the given tag. public static FieldCodec ForSInt64(uint tag, long defaultValue) { - return new FieldCodec(input => input.ReadSInt64(), (output, value) => output.WriteSInt64(value), CodedOutputStream.ComputeSInt64Size, tag); + return new FieldCodec(input => input.ReadSInt64(), (output, value) => output.WriteSInt64(value), CodedOutputStream.ComputeSInt64Size, tag, defaultValue); } /// @@ -328,7 +328,7 @@ public static FieldCodec ForSInt64(uint tag, long defaultValue) /// A codec for the given tag. public static FieldCodec ForFixed64(uint tag, ulong defaultValue) { - return new FieldCodec(input => input.ReadFixed64(), (output, value) => output.WriteFixed64(value), 8, tag); + return new FieldCodec(input => input.ReadFixed64(), (output, value) => output.WriteFixed64(value), 8, tag, defaultValue); } /// @@ -339,7 +339,7 @@ public static FieldCodec ForFixed64(uint tag, ulong defaultValue) /// A codec for the given tag. public static FieldCodec ForSFixed64(uint tag, long defaultValue) { - return new FieldCodec(input => input.ReadSFixed64(), (output, value) => output.WriteSFixed64(value), 8, tag); + return new FieldCodec(input => input.ReadSFixed64(), (output, value) => output.WriteSFixed64(value), 8, tag, defaultValue); } /// @@ -350,7 +350,7 @@ public static FieldCodec ForSFixed64(uint tag, long defaultValue) /// A codec for the given tag. public static FieldCodec ForUInt64(uint tag, ulong defaultValue) { - return new FieldCodec(input => input.ReadUInt64(), (output, value) => output.WriteUInt64(value), CodedOutputStream.ComputeUInt64Size, tag); + return new FieldCodec(input => input.ReadUInt64(), (output, value) => output.WriteUInt64(value), CodedOutputStream.ComputeUInt64Size, tag, defaultValue); } /// @@ -361,7 +361,7 @@ public static FieldCodec ForUInt64(uint tag, ulong defaultValue) /// A codec for the given tag. public static FieldCodec ForFloat(uint tag, float defaultValue) { - return new FieldCodec(input => input.ReadFloat(), (output, value) => output.WriteFloat(value), CodedOutputStream.FloatSize, tag); + return new FieldCodec(input => input.ReadFloat(), (output, value) => output.WriteFloat(value), CodedOutputStream.FloatSize, tag, defaultValue); } /// @@ -372,7 +372,7 @@ public static FieldCodec ForFloat(uint tag, float defaultValue) /// A codec for the given tag. public static FieldCodec ForDouble(uint tag, double defaultValue) { - return new FieldCodec(input => input.ReadDouble(), (output, value) => output.WriteDouble(value), CodedOutputStream.DoubleSize, tag); + return new FieldCodec(input => input.ReadDouble(), (output, value) => output.WriteDouble(value), CodedOutputStream.DoubleSize, tag, defaultValue); } // Enums are tricky. We can probably use expression trees to build these delegates automatically, @@ -391,7 +391,7 @@ public static FieldCodec ForEnum(uint tag, Func toInt32, Func(input => fromInt32( input.ReadEnum()), (output, value) => output.WriteEnum(toInt32(value)), - value => CodedOutputStream.ComputeEnumSize(toInt32(value)), tag); + value => CodedOutputStream.ComputeEnumSize(toInt32(value)), tag, defaultValue); } /// @@ -689,7 +689,8 @@ static FieldCodec() Func reader, Action writer, int fixedSize, - uint tag) : this(reader, writer, _ => fixedSize, tag) + uint tag, + T defaultValue) : this(reader, writer, _ => fixedSize, tag, defaultValue) { FixedSize = fixedSize; } @@ -699,7 +700,7 @@ static FieldCodec() Action writer, Func sizeCalculator, uint tag, - uint endTag = 0) : this(reader, writer, (CodedInputStream i, ref T v) => v = reader(i), (ref T v, T v2) => { v = v2; return true; }, sizeCalculator, tag, endTag, DefaultDefault) + T defaultValue) : this(reader, writer, (CodedInputStream i, ref T v) => v = reader(i), (ref T v, T v2) => { v = v2; return true; }, sizeCalculator, tag, 0, defaultValue) { } From 930db675ca010b09372e92df107a739d06e36ad0 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 21 Jul 2019 04:00:21 -0500 Subject: [PATCH 27/34] Revert changes for FieldPresenceAccessor --- .../Reflection/FieldAccessTest.cs | 88 +++++++++---------- .../src/Google.Protobuf/MessageExtensions.cs | 4 +- .../Reflection/IFieldAccessor.cs | 16 ++-- .../Reflection/SingleFieldAccessor.cs | 2 +- 4 files changed, 52 insertions(+), 58 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs index dd753e8df4de..9651ec30d8c5 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs @@ -35,8 +35,8 @@ using NUnit.Framework; using System; using System.Collections; -using System.Collections.Generic; - +using System.Collections.Generic; + using static Google.Protobuf.TestProtos.Proto2.UnittestExtensions; namespace Google.Protobuf.Reflection @@ -86,8 +86,8 @@ public void GetValue() var dictionary = (IDictionary) fields[TestMap.MapStringStringFieldNumber].Accessor.GetValue(mapMessage); Assert.AreEqual(mapMessage.MapStringString, dictionary); Assert.AreEqual("value1", dictionary["key1"]); - } - + } + [Test] public void GetValue_IncorrectType() { @@ -97,29 +97,29 @@ public void GetValue_IncorrectType() } [Test] - public void HasValue_Proto3() - { - IMessage message = SampleMessages.CreateFullTestAllTypes(); - var fields = message.Descriptor.Fields; - Assert.Throws(() => (fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor as IFieldPresenceAccessor).HasValue(message)); + public void HasValue_Proto3() + { + IMessage message = SampleMessages.CreateFullTestAllTypes(); + var fields = message.Descriptor.Fields; + Assert.Throws(() => fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.HasValue(message)); } [Test] - public void HasValue() - { - IMessage message = new Proto2.TestAllTypes(); - var fields = message.Descriptor.Fields; - var accessor = fields[Proto2.TestAllTypes.OptionalBoolFieldNumber].Accessor as IFieldPresenceAccessor; - - Assert.False(accessor.HasValue(message)); - - accessor.SetValue(message, true); - Assert.True(accessor.HasValue(message)); - - accessor.Clear(message); - Assert.False(accessor.HasValue(message)); + public void HasValue() + { + IMessage message = new Proto2.TestAllTypes(); + var fields = message.Descriptor.Fields; + var accessor = fields[Proto2.TestAllTypes.OptionalBoolFieldNumber].Accessor; + + Assert.False(accessor.HasValue(message)); + + accessor.SetValue(message, true); + Assert.True(accessor.HasValue(message)); + + accessor.Clear(message); + Assert.False(accessor.HasValue(message)); } - + [Test] public void SetValue_SingleFields() { @@ -146,8 +146,8 @@ public void SetValue_SingleFields() }; Assert.AreEqual(expected, message); - } - + } + [Test] public void SetValue_SingleFields_WrongType() { @@ -190,8 +190,8 @@ public void Oneof() oneof.Accessor.Clear(message); Assert.AreEqual(TestProtos.TestAllTypes.OneofFieldOneofCase.None, message.OneofFieldCase); - } - + } + [Test] public void Clear() { @@ -243,26 +243,26 @@ public void FieldDescriptor_NotFound() } [Test] - public void GetExtensionValue() - { - var message = SampleMessages.CreateFullTestAllExtensions(); - - // test that the reflector works, since the reflector just runs through IExtendableMessage - Assert.AreEqual(message.GetExtension(OptionalBoolExtension), Proto2.TestAllExtensions.Descriptor.FindFieldByNumber(OptionalBoolExtension.FieldNumber).Accessor.GetValue(message)); + public void GetExtensionValue() + { + var message = SampleMessages.CreateFullTestAllExtensions(); + + // test that the reflector works, since the reflector just runs through IExtendableMessage + Assert.AreEqual(message.GetExtension(OptionalBoolExtension), Proto2.TestAllExtensions.Descriptor.FindFieldByNumber(OptionalBoolExtension.FieldNumber).Accessor.GetValue(message)); } [Test] - public void GetRepeatedExtensionValue() - { - // check to make sure repeated accessor uses GetOrRegister - var message = new Proto2.TestAllExtensions(); - - Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); - Assert.IsNotNull(Proto2.TestAllExtensions.Descriptor.FindFieldByNumber(RepeatedBoolExtension.FieldNumber).Accessor.GetValue(message)); - Assert.IsNotNull(message.GetExtension(RepeatedBoolExtension)); - - message.ClearExtension(RepeatedBoolExtension); - Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); + public void GetRepeatedExtensionValue() + { + // check to make sure repeated accessor uses GetOrRegister + var message = new Proto2.TestAllExtensions(); + + Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); + Assert.IsNotNull(Proto2.TestAllExtensions.Descriptor.FindFieldByNumber(RepeatedBoolExtension.FieldNumber).Accessor.GetValue(message)); + Assert.IsNotNull(message.GetExtension(RepeatedBoolExtension)); + + message.ClearExtension(RepeatedBoolExtension); + Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); } } } diff --git a/csharp/src/Google.Protobuf/MessageExtensions.cs b/csharp/src/Google.Protobuf/MessageExtensions.cs index 986c3798dd9f..06e0980ec2b1 100644 --- a/csharp/src/Google.Protobuf/MessageExtensions.cs +++ b/csharp/src/Google.Protobuf/MessageExtensions.cs @@ -183,7 +183,7 @@ public static bool IsInitialized(this IMessage message) } else if (f.FieldType == FieldType.Message || f.FieldType == FieldType.Group) { - if ((f.Accessor as IFieldPresenceAccessor).HasValue(message)) + if (f.Accessor.HasValue(message)) { return ((IMessage)f.Accessor.GetValue(message)).IsInitialized(); } @@ -194,7 +194,7 @@ public static bool IsInitialized(this IMessage message) } else if (f.IsRequired) { - return (f.Accessor as IFieldPresenceAccessor).HasValue(message); + return f.Accessor.HasValue(message); } else { diff --git a/csharp/src/Google.Protobuf/Reflection/IFieldAccessor.cs b/csharp/src/Google.Protobuf/Reflection/IFieldAccessor.cs index 373984e9b144..b48c4f9df576 100644 --- a/csharp/src/Google.Protobuf/Reflection/IFieldAccessor.cs +++ b/csharp/src/Google.Protobuf/Reflection/IFieldAccessor.cs @@ -58,6 +58,11 @@ public interface IFieldAccessor /// object GetValue(IMessage message); + /// + /// Indicates whether the field in the specified message is set. For proto3 fields, this throws an + /// + bool HasValue(IMessage message); + /// /// Mutator for single "simple" fields only. /// @@ -68,15 +73,4 @@ public interface IFieldAccessor /// The field is not a "simple" field. void SetValue(IMessage message, object value); } - - /// - /// Allows field presence to be checked reflectively. This is implemented for all single field accessors - /// - public interface IFieldPresenceAccessor : IFieldAccessor - { - /// - /// Indicates whether the field in the specified message is set. For proto3 fields, this throws an - /// - bool HasValue(IMessage message); - } } \ No newline at end of file diff --git a/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs b/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs index d5a8e6ff7dd3..de10226511f1 100644 --- a/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs +++ b/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs @@ -39,7 +39,7 @@ namespace Google.Protobuf.Reflection /// /// Accessor for single fields. /// - internal sealed class SingleFieldAccessor : FieldAccessorBase, IFieldPresenceAccessor + internal sealed class SingleFieldAccessor : FieldAccessorBase { // All the work here is actually done in the constructor - it creates the appropriate delegates. // There are various cases to consider, based on the property type (message, string/bytes, or "genuine" primitive) From 3237ad39f810e30b2bcc797460086e8bbc5565bb Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 21 Jul 2019 05:17:42 -0500 Subject: [PATCH 28/34] Rename ExtensionRegistry.Add(IEnumerable) overload to AddRange --- .../Reflection/FileDescriptor.cs | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs index 993f428cab78..17f008202311 100644 --- a/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FileDescriptor.cs @@ -42,23 +42,23 @@ namespace Google.Protobuf.Reflection { - /// - /// The syntax of a .proto file + /// + /// The syntax of a .proto file /// - public enum Syntax - { - /// - /// Proto2 syntax - /// - Proto2, - /// - /// Proto3 syntax - /// - Proto3, - /// - /// An unknown declared syntax - /// - Unknown + public enum Syntax + { + /// + /// Proto2 syntax + /// + Proto2, + /// + /// Proto3 syntax + /// + Proto3, + /// + /// An unknown declared syntax + /// + Unknown } /// @@ -107,17 +107,17 @@ private FileDescriptor(ByteString descriptorData, FileDescriptorProto proto, IEn declarations = new Lazy>(CreateDeclarationMap, LazyThreadSafetyMode.ExecutionAndPublication); - if (!proto.HasSyntax || proto.Syntax == "proto2") - { - Syntax = Syntax.Proto2; + if (!proto.HasSyntax || proto.Syntax == "proto2") + { + Syntax = Syntax.Proto2; } - else if (proto.Syntax == "proto3") - { - Syntax = Syntax.Proto3; + else if (proto.Syntax == "proto3") + { + Syntax = Syntax.Proto3; } - else - { - Syntax = Syntax.Unknown; + else + { + Syntax = Syntax.Unknown; } } @@ -249,8 +249,8 @@ private static IList DeterminePublicDependencies(FileDescriptor /// internal FileDescriptorProto Proto { get; } - /// - /// The syntax of the file + /// + /// The syntax of the file /// public Syntax Syntax { get; } From 79cf8a8baeef406fba615580e5d06fc44389ee4f Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 21 Jul 2019 06:13:59 -0500 Subject: [PATCH 29/34] Fix readability in FieldCodec.ForMessage/Group factories --- csharp/src/Google.Protobuf/FieldCodec.cs | 29 +++++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/csharp/src/Google.Protobuf/FieldCodec.cs b/csharp/src/Google.Protobuf/FieldCodec.cs index 4beb998f6b06..ebd00b702206 100644 --- a/csharp/src/Google.Protobuf/FieldCodec.cs +++ b/csharp/src/Google.Protobuf/FieldCodec.cs @@ -402,8 +402,15 @@ public static FieldCodec ForEnum(uint tag, Func toInt32, FuncA codec for the given tag. public static FieldCodec ForMessage(uint tag, MessageParser parser) where T : class, IMessage { - return new FieldCodec(input => { T message = parser.CreateTemplate(); input.ReadMessage(message); return message; }, - (output, value) => output.WriteMessage(value), (CodedInputStream i, ref T v) => + return new FieldCodec( + input => + { + T message = parser.CreateTemplate(); + input.ReadMessage(message); + return message; + }, + (output, value) => output.WriteMessage(value), + (CodedInputStream i, ref T v) => { if (v == null) { @@ -427,7 +434,8 @@ public static FieldCodec ForEnum(uint tag, Func toInt32, Func CodedOutputStream.ComputeMessageSize(message), tag); + }, + message => CodedOutputStream.ComputeMessageSize(message), tag); } /// @@ -439,8 +447,16 @@ public static FieldCodec ForEnum(uint tag, Func toInt32, FuncA codec for given tag public static FieldCodec ForGroup(uint startTag, uint endTag, MessageParser parser) where T : class, IMessage { - return new FieldCodec(input => { T message = parser.CreateTemplate(); input.ReadGroup(message); return message; }, - (output, value) => output.WriteGroup(value), (CodedInputStream i, ref T v) => { + return new FieldCodec( + input => + { + T message = parser.CreateTemplate(); + input.ReadGroup(message); + return message; + }, + (output, value) => output.WriteGroup(value), + (CodedInputStream i, ref T v) => + { if (v == null) { v = parser.CreateTemplate(); @@ -463,7 +479,8 @@ public static FieldCodec ForEnum(uint tag, Func toInt32, Func CodedOutputStream.ComputeGroupSize(message), startTag, endTag); + }, + message => CodedOutputStream.ComputeGroupSize(message), startTag, endTag); } /// From c5fa0e08c759c75b02910acf0ed58e45d9bffe0c Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 21 Jul 2019 06:14:21 -0500 Subject: [PATCH 30/34] Fix comment on IExtendableMessage.GetOrRegisterExtension --- csharp/src/Google.Protobuf/IExtendableMessage.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/csharp/src/Google.Protobuf/IExtendableMessage.cs b/csharp/src/Google.Protobuf/IExtendableMessage.cs index 5cc2ae31a6da..885749382698 100644 --- a/csharp/src/Google.Protobuf/IExtendableMessage.cs +++ b/csharp/src/Google.Protobuf/IExtendableMessage.cs @@ -50,8 +50,8 @@ public interface IExtendableMessage : IMessage where T : IExtendableMessag /// RepeatedField GetExtension(RepeatedExtension extension); - /// - /// Gets the value of the specified repeated extension, registering it if it isn't + /// + /// Gets the value of the specified repeated extension, registering it if it hasn't already been registered. /// RepeatedField GetOrRegisterExtension(RepeatedExtension extension); @@ -65,13 +65,13 @@ public interface IExtendableMessage : IMessage where T : IExtendableMessag /// bool HasExtension(Extension extension); - /// - /// Clears the value of the specified extension + /// + /// Clears the value of the specified extension /// void ClearExtension(Extension extension); - /// - /// Clears the value of the specified repeated extension + /// + /// Clears the value of the specified repeated extension /// void ClearExtension(RepeatedExtension extension); } From 0436b8db856204d23d0980bfe7b2f87dc269bc2c Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Thu, 1 Aug 2019 03:06:03 -0500 Subject: [PATCH 31/34] GetOrRegisterExtension -> GetOrInitializeExtension Add comment explaining IExtensionMessage instability --- .../GeneratedMessageTest.Proto2.cs | 6 +- .../Google.Protobuf.Test/SampleMessages.cs | 58 +++++++++---------- .../TestProtos/TestMessagesProto2.cs | 8 +-- .../TestProtos/Unittest.cs | 40 ++++++------- csharp/src/Google.Protobuf/ExtensionSet.cs | 2 +- .../src/Google.Protobuf/IExtendableMessage.cs | 7 ++- .../Google.Protobuf/Reflection/Descriptor.cs | 36 ++++++------ .../Reflection/ReflectionUtil.cs | 6 +- .../compiler/csharp/csharp_message.cc | 4 +- 9 files changed, 84 insertions(+), 83 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs index aa977db1415e..e1d4d7809ad6 100644 --- a/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs +++ b/csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs @@ -278,7 +278,7 @@ public void RequiredFieldsInExtensions() Assert.True(message.IsInitialized()); - message.GetOrRegisterExtension(TestRequired.Extensions.Multi); + message.GetOrInitializeExtension(TestRequired.Extensions.Multi); Assert.True(message.IsInitialized()); @@ -297,7 +297,7 @@ public void RequiredFieldsInExtensions() Assert.True(message.IsInitialized()); - message.GetOrRegisterExtension(UnittestExtensions.RepeatedBoolExtension).Add(true); + message.GetOrInitializeExtension(UnittestExtensions.RepeatedBoolExtension).Add(true); Assert.True(message.IsInitialized()); } @@ -342,7 +342,7 @@ public void RoundTrip_ExtensionGroups() { var message = new TestAllExtensions(); message.SetExtension(UnittestExtensions.OptionalGroupExtension, new OptionalGroup_extension { A = 10 }); - message.GetOrRegisterExtension(UnittestExtensions.RepeatedGroupExtension).AddRange(new[] + message.GetOrInitializeExtension(UnittestExtensions.RepeatedGroupExtension).AddRange(new[] { new RepeatedGroup_extension { A = 10 }, new RepeatedGroup_extension { A = 20 }, diff --git a/csharp/src/Google.Protobuf.Test/SampleMessages.cs b/csharp/src/Google.Protobuf.Test/SampleMessages.cs index b2c50397d6cf..03a20d6685a2 100644 --- a/csharp/src/Google.Protobuf.Test/SampleMessages.cs +++ b/csharp/src/Google.Protobuf.Test/SampleMessages.cs @@ -32,8 +32,8 @@ using System; using Google.Protobuf.TestProtos; -using Proto2 = Google.Protobuf.TestProtos.Proto2; - +using Proto2 = Google.Protobuf.TestProtos.Proto2; + using static Google.Protobuf.TestProtos.Proto2.UnittestExtensions; namespace Google.Protobuf @@ -152,9 +152,9 @@ public static Proto2.TestAllTypes CreateFullTestAllTypesProto2() }; } - public static Proto2.TestAllExtensions CreateFullTestAllExtensions() - { - var message = new Proto2.TestAllExtensions(); + public static Proto2.TestAllExtensions CreateFullTestAllExtensions() + { + var message = new Proto2.TestAllExtensions(); message.SetExtension(OptionalBoolExtension, true); message.SetExtension(OptionalBytesExtension, ByteString.CopyFrom(1, 2, 3, 4)); message.SetExtension(OptionalDoubleExtension, 23.5); @@ -178,30 +178,30 @@ public static Proto2.TestAllExtensions CreateFullTestAllExtensions() message.SetExtension(OptionalUint32Extension, UInt32.MaxValue); message.SetExtension(OptionalUint64Extension, UInt64.MaxValue); message.SetExtension(OptionalGroupExtension, new Proto2.OptionalGroup_extension { A = 10 }); - message.GetOrRegisterExtension(RepeatedBoolExtension).AddRange(new[] { true, false }); - message.GetOrRegisterExtension(RepeatedBytesExtension).AddRange(new[] { ByteString.CopyFrom(1, 2, 3, 4), ByteString.CopyFrom(5, 6), ByteString.CopyFrom(new byte[1000]) }); - message.GetOrRegisterExtension(RepeatedDoubleExtension).AddRange(new[] { -12.25, 23.5 }); - message.GetOrRegisterExtension(RepeatedFixed32Extension).AddRange(new[] { UInt32.MaxValue, 23u }); - message.GetOrRegisterExtension(RepeatedFixed64Extension).AddRange(new[] { UInt64.MaxValue, 1234567890123ul }); - message.GetOrRegisterExtension(RepeatedFloatExtension).AddRange(new[] { 100f, 12.25f }); - message.GetOrRegisterExtension(RepeatedForeignEnumExtension).AddRange(new[] { Proto2.ForeignEnum.ForeignFoo, Proto2.ForeignEnum.ForeignBar }); - message.GetOrRegisterExtension(RepeatedForeignMessageExtension).AddRange(new[] { new Proto2.ForeignMessage(), new Proto2.ForeignMessage { C = 10 } }); - message.GetOrRegisterExtension(RepeatedImportEnumExtension).AddRange(new[] { Proto2.ImportEnum.ImportBaz, Proto2.ImportEnum.ImportFoo }); - message.GetOrRegisterExtension(RepeatedImportMessageExtension).AddRange(new[] { new Proto2.ImportMessage { D = 20 }, new Proto2.ImportMessage { D = 25 } }); - message.GetOrRegisterExtension(RepeatedInt32Extension).AddRange(new[] { 100, 200 }); - message.GetOrRegisterExtension(RepeatedInt64Extension).AddRange(new[] { 3210987654321, Int64.MaxValue }); - message.GetOrRegisterExtension(RepeatedNestedEnumExtension).AddRange(new[] { Proto2.TestAllTypes.Types.NestedEnum.Foo, Proto2.TestAllTypes.Types.NestedEnum.Neg }); - message.GetOrRegisterExtension(RepeatedNestedMessageExtension).AddRange(new[] { new Proto2.TestAllTypes.Types.NestedMessage { Bb = 35 }, new Proto2.TestAllTypes.Types.NestedMessage { Bb = 10 } }); - message.GetOrRegisterExtension(RepeatedSfixed32Extension).AddRange(new[] { -123, 123 }); - message.GetOrRegisterExtension(RepeatedSfixed64Extension).AddRange(new[] { -12345678901234, 12345678901234 }); - message.GetOrRegisterExtension(RepeatedSint32Extension).AddRange(new[] { -456, 100 }); - message.GetOrRegisterExtension(RepeatedSint64Extension).AddRange(new[] { -12345678901235, 123 }); - message.GetOrRegisterExtension(RepeatedStringExtension).AddRange(new[] { "foo", "bar" }); - message.GetOrRegisterExtension(RepeatedUint32Extension).AddRange(new[] { UInt32.MaxValue, UInt32.MinValue }); - message.GetOrRegisterExtension(RepeatedUint64Extension).AddRange(new[] { UInt64.MaxValue, UInt32.MinValue }); - message.GetOrRegisterExtension(RepeatedGroupExtension).AddRange(new[] { new Proto2.RepeatedGroup_extension { A = 10 }, new Proto2.RepeatedGroup_extension { A = 20 } }); - message.SetExtension(OneofStringExtension, "Oneof string"); - return message; + message.GetOrInitializeExtension(RepeatedBoolExtension).AddRange(new[] { true, false }); + message.GetOrInitializeExtension(RepeatedBytesExtension).AddRange(new[] { ByteString.CopyFrom(1, 2, 3, 4), ByteString.CopyFrom(5, 6), ByteString.CopyFrom(new byte[1000]) }); + message.GetOrInitializeExtension(RepeatedDoubleExtension).AddRange(new[] { -12.25, 23.5 }); + message.GetOrInitializeExtension(RepeatedFixed32Extension).AddRange(new[] { UInt32.MaxValue, 23u }); + message.GetOrInitializeExtension(RepeatedFixed64Extension).AddRange(new[] { UInt64.MaxValue, 1234567890123ul }); + message.GetOrInitializeExtension(RepeatedFloatExtension).AddRange(new[] { 100f, 12.25f }); + message.GetOrInitializeExtension(RepeatedForeignEnumExtension).AddRange(new[] { Proto2.ForeignEnum.ForeignFoo, Proto2.ForeignEnum.ForeignBar }); + message.GetOrInitializeExtension(RepeatedForeignMessageExtension).AddRange(new[] { new Proto2.ForeignMessage(), new Proto2.ForeignMessage { C = 10 } }); + message.GetOrInitializeExtension(RepeatedImportEnumExtension).AddRange(new[] { Proto2.ImportEnum.ImportBaz, Proto2.ImportEnum.ImportFoo }); + message.GetOrInitializeExtension(RepeatedImportMessageExtension).AddRange(new[] { new Proto2.ImportMessage { D = 20 }, new Proto2.ImportMessage { D = 25 } }); + message.GetOrInitializeExtension(RepeatedInt32Extension).AddRange(new[] { 100, 200 }); + message.GetOrInitializeExtension(RepeatedInt64Extension).AddRange(new[] { 3210987654321, Int64.MaxValue }); + message.GetOrInitializeExtension(RepeatedNestedEnumExtension).AddRange(new[] { Proto2.TestAllTypes.Types.NestedEnum.Foo, Proto2.TestAllTypes.Types.NestedEnum.Neg }); + message.GetOrInitializeExtension(RepeatedNestedMessageExtension).AddRange(new[] { new Proto2.TestAllTypes.Types.NestedMessage { Bb = 35 }, new Proto2.TestAllTypes.Types.NestedMessage { Bb = 10 } }); + message.GetOrInitializeExtension(RepeatedSfixed32Extension).AddRange(new[] { -123, 123 }); + message.GetOrInitializeExtension(RepeatedSfixed64Extension).AddRange(new[] { -12345678901234, 12345678901234 }); + message.GetOrInitializeExtension(RepeatedSint32Extension).AddRange(new[] { -456, 100 }); + message.GetOrInitializeExtension(RepeatedSint64Extension).AddRange(new[] { -12345678901235, 123 }); + message.GetOrInitializeExtension(RepeatedStringExtension).AddRange(new[] { "foo", "bar" }); + message.GetOrInitializeExtension(RepeatedUint32Extension).AddRange(new[] { UInt32.MaxValue, UInt32.MinValue }); + message.GetOrInitializeExtension(RepeatedUint64Extension).AddRange(new[] { UInt64.MaxValue, UInt32.MinValue }); + message.GetOrInitializeExtension(RepeatedGroupExtension).AddRange(new[] { new Proto2.RepeatedGroup_extension { A = 10 }, new Proto2.RepeatedGroup_extension { A = 20 } }); + message.SetExtension(OneofStringExtension, "Oneof string"); + return message; } } } \ No newline at end of file diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs index ac6ba48f8e23..2f25195a1d37 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs @@ -3904,8 +3904,8 @@ public enum OneofFieldOneofCase { public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -4438,8 +4438,8 @@ public sealed partial class MessageSetCorrect : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs index 5d7339f1502f..5daf9fb8e2ff 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs @@ -5258,8 +5258,8 @@ public sealed partial class TestAllExtensions : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -6033,8 +6033,8 @@ public sealed partial class TestGroupExtension : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -8604,8 +8604,8 @@ public sealed partial class TestEmptyMessageWithExtensions : pb::IExtendableMess public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -8745,8 +8745,8 @@ public sealed partial class TestMultipleExtensionRanges : pb::IExtendableMessage public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -12223,8 +12223,8 @@ public sealed partial class TestFieldOrderings : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -19369,8 +19369,8 @@ public sealed partial class TestPackedExtensions : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -19510,8 +19510,8 @@ public sealed partial class TestUnpackedExtensions : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -20586,8 +20586,8 @@ public sealed partial class TestParsingMerge : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -23251,8 +23251,8 @@ public enum OneofFieldOneofCase { public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -23916,8 +23916,8 @@ public sealed partial class TestExtensionInsideTable : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); diff --git a/csharp/src/Google.Protobuf/ExtensionSet.cs b/csharp/src/Google.Protobuf/ExtensionSet.cs index 5b3b3167aa61..d1bbf6910247 100644 --- a/csharp/src/Google.Protobuf/ExtensionSet.cs +++ b/csharp/src/Google.Protobuf/ExtensionSet.cs @@ -89,7 +89,7 @@ public static class ExtensionSet /// /// Gets the value of the specified repeated extension, registering it if it doesn't exist /// - public static RepeatedField GetOrRegister(ref ExtensionSet set, RepeatedExtension extension) where TTarget : IExtendableMessage + public static RepeatedField GetOrInitialize(ref ExtensionSet set, RepeatedExtension extension) where TTarget : IExtendableMessage { IExtensionValue value; if (set == null) diff --git a/csharp/src/Google.Protobuf/IExtendableMessage.cs b/csharp/src/Google.Protobuf/IExtendableMessage.cs index 885749382698..8fca2b427b8b 100644 --- a/csharp/src/Google.Protobuf/IExtendableMessage.cs +++ b/csharp/src/Google.Protobuf/IExtendableMessage.cs @@ -35,7 +35,8 @@ namespace Google.Protobuf { /// - /// Generic interface for a Protocol Buffers message containing one or more extensions, where the type parameter is expected to be the same type as the implementation class + /// Generic interface for a Protocol Buffers message containing one or more extensions, where the type parameter is expected to be the same type as the implementation class. + /// This interface is experiemental and is subject to change. /// public interface IExtendableMessage : IMessage where T : IExtendableMessage { @@ -46,14 +47,14 @@ public interface IExtendableMessage : IMessage where T : IExtendableMessag /// /// Gets the value of the specified repeated extension or null if the extension isn't registered in this set. - /// For a version of this method that never returns null, use + /// For a version of this method that never returns null, use /// RepeatedField GetExtension(RepeatedExtension extension); /// /// Gets the value of the specified repeated extension, registering it if it hasn't already been registered. /// - RepeatedField GetOrRegisterExtension(RepeatedExtension extension); + RepeatedField GetOrInitializeExtension(RepeatedExtension extension); /// /// Sets the value of the specified extension diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs index 8656cb5f8744..7759a33cbc9d 100644 --- a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs @@ -1733,8 +1733,8 @@ public sealed partial class ExtensionRangeOptions : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -4871,8 +4871,8 @@ public sealed partial class FileOptions : pb::IExtendableMessage { public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -5280,8 +5280,8 @@ public sealed partial class MessageOptions : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -5756,8 +5756,8 @@ public sealed partial class FieldOptions : pb::IExtendableMessage public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -5951,8 +5951,8 @@ public sealed partial class OneofOptions : pb::IExtendableMessage public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -6209,8 +6209,8 @@ public sealed partial class EnumOptions : pb::IExtendableMessage { public pbc::RepeatedField GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -6422,8 +6422,8 @@ public sealed partial class EnumValueOptions : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -6635,8 +6635,8 @@ public sealed partial class ServiceOptions : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); @@ -6889,8 +6889,8 @@ public sealed partial class MethodOptions : pb::IExtendableMessage GetExtension(pb::RepeatedExtension extension) { return pb::ExtensionSet.Get(ref _extensions, extension); } - public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension extension) { - return pb::ExtensionSet.GetOrRegister(ref _extensions, extension); + public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension extension) { + return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); } public void SetExtension(pb::Extension extension, TValue value) { pb::ExtensionSet.Set(ref _extensions, extension, value); diff --git a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs index 28f724b2d8b3..fd1ad4e3e086 100644 --- a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs +++ b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs @@ -230,7 +230,7 @@ public object GetExtension(IMessage message) } else if (extension is RepeatedExtension) { - return extensionMessage.GetOrRegisterExtension(extension as RepeatedExtension); + return extensionMessage.GetOrInitializeExtension(extension as RepeatedExtension); } else { @@ -312,11 +312,11 @@ private class ExtensionSetReflector : IExtensionSetReflector where T1 : IExt { public Func CreateIsInitializedCaller() { - var prop = typeof(T1).GetTypeInfo().GetDeclaredProperty("_Extensions"); + var prop = typeof(T1).GetTypeInfo().GetDeclaredProperty("_Extensions"); #if NET35 var getFunc = (Func>)prop.GetGetMethod(true).CreateDelegate(typeof(Func>)); #else - var getFunc = (Func>)prop.GetMethod.CreateDelegate(typeof(Func>)); + var getFunc = (Func>)prop.GetMethod.CreateDelegate(typeof(Func>)); #endif var initializedFunc = (Func, bool>) typeof(ExtensionSet) diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc index e4b87dfbbe2c..fe2421a80eb0 100644 --- a/src/google/protobuf/compiler/csharp/csharp_message.cc +++ b/src/google/protobuf/compiler/csharp/csharp_message.cc @@ -272,8 +272,8 @@ void MessageGenerator::Generate(io::Printer* printer) { "public pbc::RepeatedField GetExtension(pb::RepeatedExtension<$class_name$, TValue> extension) {\n" " return pb::ExtensionSet.Get(ref _extensions, extension);\n" "}\n" - "public pbc::RepeatedField GetOrRegisterExtension(pb::RepeatedExtension<$class_name$, TValue> extension) {\n" - " return pb::ExtensionSet.GetOrRegister(ref _extensions, extension);\n" + "public pbc::RepeatedField GetOrInitializeExtension(pb::RepeatedExtension<$class_name$, TValue> extension) {\n" + " return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension);\n" "}\n" "public void SetExtension(pb::Extension<$class_name$, TValue> extension, TValue value) {\n" " pb::ExtensionSet.Set(ref _extensions, extension, value);\n" From 6da14fa94dfc4c3ff9290e1f3b34e6bdb54faff7 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Mon, 12 Aug 2019 18:29:01 -0500 Subject: [PATCH 32/34] Add GeneratedMessageTest.Proto2.cs to EXTRA_DIST --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 3c5ce07b07f4..62e8a782dd0d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -107,6 +107,7 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf.Test/FieldCodecTest.cs \ csharp/src/Google.Protobuf.Test/FieldMaskTreeTest.cs \ csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs \ + csharp/src/Google.Protobuf.Test/GeneratedMessageTest.Proto2.cs \ csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj \ csharp/src/Google.Protobuf.Test/IssuesTest.cs \ csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs \ From bdc6cd1d0bbe49e2b2cb3b06a71c7d9c320cdb29 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Tue, 13 Aug 2019 01:31:50 -0500 Subject: [PATCH 33/34] Expose Extension field in FieldDescriptor --- .../Reflection/FieldDescriptor.cs | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs index a8b9e69f44aa..dee091350269 100644 --- a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs @@ -66,7 +66,10 @@ public sealed class FieldDescriptor : DescriptorBase, IComparable + /// An extension identifier for this field, or null if this field isn't an extension. + /// + public Extension Extension { get; } internal FieldDescriptor(FieldDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, string propertyName, Extension extension) @@ -201,19 +204,19 @@ private static FieldType GetFieldTypeFromProtoType(FieldDescriptorProto.Types.Ty /// /// Returns true if this field is a packed, repeated field; false otherwise. /// - public bool IsPacked - { - get - { - if (File.Syntax != Syntax.Proto3) - { - return Proto.Options?.Packed ?? false; - } - else - { - return !Proto.Options.HasPacked || Proto.Options.Packed; - } - } + public bool IsPacked + { + get + { + if (File.Syntax != Syntax.Proto3) + { + return Proto.Options?.Packed ?? false; + } + else + { + return !Proto.Options.HasPacked || Proto.Options.Packed; + } + } } /// @@ -393,7 +396,7 @@ internal void CrossLink() } private IFieldAccessor CreateAccessor() - { + { if (Extension != null) { return new ExtensionAccessor(this); From 4d5ae5b4a4b184def86c0cc4efb4980cf3d44f41 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Thu, 29 Aug 2019 18:07:02 -0500 Subject: [PATCH 34/34] Use proto2 and proto3 in unknown field tests --- .../UnknownFieldSetTest.cs | 39 ++++++++++++------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/UnknownFieldSetTest.cs b/csharp/src/Google.Protobuf.Test/UnknownFieldSetTest.cs index 0663465808b2..886937d70620 100644 --- a/csharp/src/Google.Protobuf.Test/UnknownFieldSetTest.cs +++ b/csharp/src/Google.Protobuf.Test/UnknownFieldSetTest.cs @@ -40,6 +40,18 @@ namespace Google.Protobuf { public class UnknownFieldSetTest { + public class Data + { + public static System.Collections.IEnumerable Messages + { + get + { + yield return SampleMessages.CreateFullTestAllTypesProto2(); + yield return SampleMessages.CreateFullTestAllTypes(); + } + } + } + [Test] public void EmptyUnknownFieldSet() { @@ -61,24 +73,23 @@ public void MergeUnknownFieldSet() } [Test] - public void TestMergeCodedInput() + [TestCaseSource(typeof(Data), "Messages")] + public void TestMergeCodedInput(IMessage message) { - var message = SampleMessages.CreateFullTestAllTypesProto2(); var emptyMessage = new TestEmptyMessage(); emptyMessage.MergeFrom(message.ToByteArray()); Assert.AreEqual(message.CalculateSize(), emptyMessage.CalculateSize()); Assert.AreEqual(message.ToByteArray(), emptyMessage.ToByteArray()); - var newMessage = new Proto2.TestAllTypes(); - newMessage.MergeFrom(emptyMessage.ToByteArray()); + var newMessage = message.Descriptor.Parser.ParseFrom(emptyMessage.ToByteArray()); Assert.AreEqual(message, newMessage); Assert.AreEqual(message.CalculateSize(), newMessage.CalculateSize()); } [Test] - public void TestMergeMessage() + [TestCaseSource(typeof(Data), "Messages")] + public void TestMergeMessage(IMessage message) { - var message = SampleMessages.CreateFullTestAllTypesProto2(); var emptyMessage = new TestEmptyMessage(); var otherEmptyMessage = new TestEmptyMessage(); emptyMessage.MergeFrom(message.ToByteArray()); @@ -89,9 +100,9 @@ public void TestMergeMessage() } [Test] - public void TestEquals() + [TestCaseSource(typeof(Data), "Messages")] + public void TestEquals(IMessage message) { - var message = SampleMessages.CreateFullTestAllTypesProto2(); var emptyMessage = new TestEmptyMessage(); var otherEmptyMessage = new TestEmptyMessage(); Assert.AreEqual(emptyMessage, otherEmptyMessage); @@ -102,9 +113,9 @@ public void TestEquals() } [Test] - public void TestHashCode() + [TestCaseSource(typeof(Data), "Messages")] + public void TestHashCode(IMessage message) { - var message = SampleMessages.CreateFullTestAllTypesProto2(); var emptyMessage = new TestEmptyMessage(); int hashCode = emptyMessage.GetHashCode(); emptyMessage.MergeFrom(message.ToByteArray()); @@ -112,7 +123,8 @@ public void TestHashCode() } [Test] - public void TestClone() + [TestCaseSource(typeof(Data), "Messages")] + public void TestClone(IMessage message) { var emptyMessage = new TestEmptyMessage(); var otherEmptyMessage = new TestEmptyMessage(); @@ -120,7 +132,6 @@ public void TestClone() Assert.AreEqual(emptyMessage.CalculateSize(), otherEmptyMessage.CalculateSize()); Assert.AreEqual(emptyMessage.ToByteArray(), otherEmptyMessage.ToByteArray()); - var message = SampleMessages.CreateFullTestAllTypesProto2(); emptyMessage.MergeFrom(message.ToByteArray()); otherEmptyMessage = emptyMessage.Clone(); Assert.AreEqual(message.CalculateSize(), otherEmptyMessage.CalculateSize()); @@ -128,9 +139,9 @@ public void TestClone() } [Test] - public void TestDiscardUnknownFields() + [TestCaseSource(typeof(Data), "Messages")] + public void TestDiscardUnknownFields(IMessage message) { - var message = SampleMessages.CreateFullTestAllTypesProto2(); var goldenEmptyMessage = new TestEmptyMessage(); byte[] data = message.ToByteArray(); int fullSize = message.CalculateSize();