xref: /aosp_15_r20/external/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssues.cs (revision 1b3f573f81763fcece89efc2b6a5209149e44ab8)
1 // <auto-generated>
2 //     Generated by the protocol buffer compiler.  DO NOT EDIT!
3 //     source: unittest_issues.proto
4 // </auto-generated>
5 #pragma warning disable 1591, 0612, 3021, 8981
6 #region Designer generated code
7 
8 using pb = global::Google.Protobuf;
9 using pbc = global::Google.Protobuf.Collections;
10 using pbr = global::Google.Protobuf.Reflection;
11 using scg = global::System.Collections.Generic;
12 namespace UnitTest.Issues.TestProtos {
13 
14   /// <summary>Holder for reflection information generated from unittest_issues.proto</summary>
15   public static partial class UnittestIssuesReflection {
16 
17     #region Descriptor
18     /// <summary>File descriptor for unittest_issues.proto</summary>
19     public static pbr::FileDescriptor Descriptor {
20       get { return descriptor; }
21     }
22     private static pbr::FileDescriptor descriptor;
23 
UnittestIssuesReflection()24     static UnittestIssuesReflection() {
25       byte[] descriptorData = global::System.Convert.FromBase64String(
26           string.Concat(
27             "ChV1bml0dGVzdF9pc3N1ZXMucHJvdG8SD3VuaXR0ZXN0X2lzc3VlcxocZ29v",
28             "Z2xlL3Byb3RvYnVmL3N0cnVjdC5wcm90byInCghJc3N1ZTMwNxobCgpOZXN0",
29             "ZWRPbmNlGg0KC05lc3RlZFR3aWNlIrABChNOZWdhdGl2ZUVudW1NZXNzYWdl",
30             "EiwKBXZhbHVlGAEgASgOMh0udW5pdHRlc3RfaXNzdWVzLk5lZ2F0aXZlRW51",
31             "bRIxCgZ2YWx1ZXMYAiADKA4yHS51bml0dGVzdF9pc3N1ZXMuTmVnYXRpdmVF",
32             "bnVtQgIQABI4Cg1wYWNrZWRfdmFsdWVzGAMgAygOMh0udW5pdHRlc3RfaXNz",
33             "dWVzLk5lZ2F0aXZlRW51bUICEAEiEQoPRGVwcmVjYXRlZENoaWxkIrkCChdE",
34             "ZXByZWNhdGVkRmllbGRzTWVzc2FnZRIaCg5QcmltaXRpdmVWYWx1ZRgBIAEo",
35             "BUICGAESGgoOUHJpbWl0aXZlQXJyYXkYAiADKAVCAhgBEjoKDE1lc3NhZ2VW",
36             "YWx1ZRgDIAEoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkQ2hpbGRC",
37             "AhgBEjoKDE1lc3NhZ2VBcnJheRgEIAMoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5E",
38             "ZXByZWNhdGVkQ2hpbGRCAhgBEjYKCUVudW1WYWx1ZRgFIAEoDjIfLnVuaXR0",
39             "ZXN0X2lzc3Vlcy5EZXByZWNhdGVkRW51bUICGAESNgoJRW51bUFycmF5GAYg",
40             "AygOMh8udW5pdHRlc3RfaXNzdWVzLkRlcHJlY2F0ZWRFbnVtQgIYASIZCglJ",
41             "dGVtRmllbGQSDAoEaXRlbRgBIAEoBSJECg1SZXNlcnZlZE5hbWVzEg0KBXR5",
42             "cGVzGAEgASgFEhIKCmRlc2NyaXB0b3IYAiABKAUaEAoOU29tZU5lc3RlZFR5",
43             "cGUioAEKFVRlc3RKc29uRmllbGRPcmRlcmluZxITCgtwbGFpbl9pbnQzMhgE",
44             "IAEoBRITCglvMV9zdHJpbmcYAiABKAlIABISCghvMV9pbnQzMhgFIAEoBUgA",
45             "EhQKDHBsYWluX3N0cmluZxgBIAEoCRISCghvMl9pbnQzMhgGIAEoBUgBEhMK",
46             "CW8yX3N0cmluZxgDIAEoCUgBQgQKAm8xQgQKAm8yIksKDFRlc3RKc29uTmFt",
47             "ZRIMCgRuYW1lGAEgASgJEhkKC2Rlc2NyaXB0aW9uGAIgASgJUgRkZXNjEhIK",
48             "BGd1aWQYAyABKAlSBGV4aWQifwoMT25lb2ZNZXJnaW5nEg4KBHRleHQYASAB",
49             "KAlIABI2CgZuZXN0ZWQYAiABKAsyJC51bml0dGVzdF9pc3N1ZXMuT25lb2ZN",
50             "ZXJnaW5nLk5lc3RlZEgAGh4KBk5lc3RlZBIJCgF4GAEgASgFEgkKAXkYAiAB",
51             "KAVCBwoFdmFsdWUiawoWTnVsbFZhbHVlT3V0c2lkZVN0cnVjdBIWCgxzdHJp",
52             "bmdfdmFsdWUYASABKAlIABIwCgpudWxsX3ZhbHVlGAIgASgOMhouZ29vZ2xl",
53             "LnByb3RvYnVmLk51bGxWYWx1ZUgAQgcKBXZhbHVlIkUKE051bGxWYWx1ZU5v",
54             "dEluT25lb2YSLgoKbnVsbF92YWx1ZRgCIAEoDjIaLmdvb2dsZS5wcm90b2J1",
55             "Zi5OdWxsVmFsdWUiYAoXTWl4ZWRSZWd1bGFyQW5kT3B0aW9uYWwSFQoNcmVn",
56             "dWxhcl9maWVsZBgBIAEoCRIbCg5vcHRpb25hbF9maWVsZBgCIAEoCUgAiAEB",
57             "QhEKD19vcHRpb25hbF9maWVsZCI5ChJPbmVvZldpdGhOb25lRmllbGQSCwoB",
58             "eBgBIAEoCUgAEg4KBG5vbmUYAiABKAlIAEIGCgR0ZXN0IjUKEU9uZW9mV2l0",
59             "aE5vbmVOYW1lEgsKAXgYASABKAlIABILCgF5GAIgASgJSABCBgoEbm9uZSpV",
60             "CgxOZWdhdGl2ZUVudW0SFgoSTkVHQVRJVkVfRU5VTV9aRVJPEAASFgoJRml2",
61             "ZUJlbG93EPv//////////wESFQoITWludXNPbmUQ////////////ASouCg5E",
62             "ZXByZWNhdGVkRW51bRITCg9ERVBSRUNBVEVEX1pFUk8QABIHCgNvbmUQAUId",
63             "qgIaVW5pdFRlc3QuSXNzdWVzLlRlc3RQcm90b3NiBnByb3RvMw=="));
64       descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
65           new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, },
66           new pbr::GeneratedClrTypeInfo(new[] {typeof(global::UnitTest.Issues.TestProtos.NegativeEnum), typeof(global::UnitTest.Issues.TestProtos.DeprecatedEnum), }, null, new pbr::GeneratedClrTypeInfo[] {
67             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307), global::UnitTest.Issues.TestProtos.Issue307.Parser, null, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce), global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Parser, null, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice), global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice.Parser, null, null, null, null, null)})}),
68             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NegativeEnumMessage), global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Parser, new[]{ "Value", "Values", "PackedValues" }, null, null, null, null),
69             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.DeprecatedChild), global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser, null, null, null, null, null),
70             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage), global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.Parser, new[]{ "PrimitiveValue", "PrimitiveArray", "MessageValue", "MessageArray", "EnumValue", "EnumArray" }, null, null, null, null),
71             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ItemField), global::UnitTest.Issues.TestProtos.ItemField.Parser, new[]{ "Item" }, null, null, null, null),
72             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames), global::UnitTest.Issues.TestProtos.ReservedNames.Parser, new[]{ "Types_", "Descriptor_" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ReservedNames.Types.SomeNestedType), global::UnitTest.Issues.TestProtos.ReservedNames.Types.SomeNestedType.Parser, null, null, null, null, null)}),
73             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonFieldOrdering), global::UnitTest.Issues.TestProtos.TestJsonFieldOrdering.Parser, new[]{ "PlainInt32", "O1String", "O1Int32", "PlainString", "O2Int32", "O2String" }, new[]{ "O1", "O2" }, null, null, null),
74             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonName), global::UnitTest.Issues.TestProtos.TestJsonName.Parser, new[]{ "Name", "Description", "Guid" }, null, null, null, null),
75             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofMerging), global::UnitTest.Issues.TestProtos.OneofMerging.Parser, new[]{ "Text", "Nested" }, new[]{ "Value" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested), global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested.Parser, new[]{ "X", "Y" }, null, null, null, null)}),
76             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NullValueOutsideStruct), global::UnitTest.Issues.TestProtos.NullValueOutsideStruct.Parser, new[]{ "StringValue", "NullValue" }, new[]{ "Value" }, null, null, null),
77             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NullValueNotInOneof), global::UnitTest.Issues.TestProtos.NullValueNotInOneof.Parser, new[]{ "NullValue" }, null, null, null, null),
78             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.MixedRegularAndOptional), global::UnitTest.Issues.TestProtos.MixedRegularAndOptional.Parser, new[]{ "RegularField", "OptionalField" }, new[]{ "OptionalField" }, null, null, null),
79             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofWithNoneField), global::UnitTest.Issues.TestProtos.OneofWithNoneField.Parser, new[]{ "X", "None" }, new[]{ "Test" }, null, null, null),
80             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.OneofWithNoneName), global::UnitTest.Issues.TestProtos.OneofWithNoneName.Parser, new[]{ "X", "Y" }, new[]{ "None" }, null, null, null)
81           }));
82     }
83     #endregion
84 
85   }
86   #region Enums
87   public enum NegativeEnum {
88     [pbr::OriginalName("NEGATIVE_ENUM_ZERO")] Zero = 0,
89     [pbr::OriginalName("FiveBelow")] FiveBelow = -5,
90     [pbr::OriginalName("MinusOne")] MinusOne = -1,
91   }
92 
93   public enum DeprecatedEnum {
94     [pbr::OriginalName("DEPRECATED_ZERO")] DeprecatedZero = 0,
95     [pbr::OriginalName("one")] One = 1,
96   }
97 
98   #endregion
99 
100   #region Messages
101   /// <summary>
102   /// Issue 307: when generating doubly-nested types, any references
103   /// should be of the form A.Types.B.Types.C.
104   /// </summary>
105   public sealed partial class Issue307 : pb::IMessage<Issue307>
106   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
107       , pb::IBufferMessage
108   #endif
109   {
110     private static readonly pb::MessageParser<Issue307> _parser = new pb::MessageParser<Issue307>(() => new Issue307());
111     private pb::UnknownFieldSet _unknownFields;
112     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
113     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
114     public static pb::MessageParser<Issue307> Parser { get { return _parser; } }
115 
116     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
117     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
118     public static pbr::MessageDescriptor Descriptor {
119       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[0]; }
120     }
121 
122     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
123     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
124     pbr::MessageDescriptor pb::IMessage.Descriptor {
125       get { return Descriptor; }
126     }
127 
128     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
129     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Issue307()130     public Issue307() {
131       OnConstruction();
132     }
133 
OnConstruction()134     partial void OnConstruction();
135 
136     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
137     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Issue307(Issue307 other)138     public Issue307(Issue307 other) : this() {
139       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
140     }
141 
142     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
143     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()144     public Issue307 Clone() {
145       return new Issue307(this);
146     }
147 
148     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
149     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)150     public override bool Equals(object other) {
151       return Equals(other as Issue307);
152     }
153 
154     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
155     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(Issue307 other)156     public bool Equals(Issue307 other) {
157       if (ReferenceEquals(other, null)) {
158         return false;
159       }
160       if (ReferenceEquals(other, this)) {
161         return true;
162       }
163       return Equals(_unknownFields, other._unknownFields);
164     }
165 
166     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
167     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()168     public override int GetHashCode() {
169       int hash = 1;
170       if (_unknownFields != null) {
171         hash ^= _unknownFields.GetHashCode();
172       }
173       return hash;
174     }
175 
176     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
177     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()178     public override string ToString() {
179       return pb::JsonFormatter.ToDiagnosticString(this);
180     }
181 
182     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
183     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)184     public void WriteTo(pb::CodedOutputStream output) {
185     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
186       output.WriteRawMessage(this);
187     #else
188       if (_unknownFields != null) {
189         _unknownFields.WriteTo(output);
190       }
191     #endif
192     }
193 
194     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
195     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
196     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)197     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
198       if (_unknownFields != null) {
199         _unknownFields.WriteTo(ref output);
200       }
201     }
202     #endif
203 
204     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
205     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()206     public int CalculateSize() {
207       int size = 0;
208       if (_unknownFields != null) {
209         size += _unknownFields.CalculateSize();
210       }
211       return size;
212     }
213 
214     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
215     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(Issue307 other)216     public void MergeFrom(Issue307 other) {
217       if (other == null) {
218         return;
219       }
220       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
221     }
222 
223     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
224     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)225     public void MergeFrom(pb::CodedInputStream input) {
226     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
227       input.ReadRawMessage(this);
228     #else
229       uint tag;
230       while ((tag = input.ReadTag()) != 0) {
231         switch(tag) {
232           default:
233             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
234             break;
235         }
236       }
237     #endif
238     }
239 
240     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
241     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
242     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)243     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
244       uint tag;
245       while ((tag = input.ReadTag()) != 0) {
246         switch(tag) {
247           default:
248             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
249             break;
250         }
251       }
252     }
253     #endif
254 
255     #region Nested types
256     /// <summary>Container for nested types declared in the Issue307 message type.</summary>
257     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
258     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
259     public static partial class Types {
260       public sealed partial class NestedOnce : pb::IMessage<NestedOnce>
261       #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
262           , pb::IBufferMessage
263       #endif
264       {
265         private static readonly pb::MessageParser<NestedOnce> _parser = new pb::MessageParser<NestedOnce>(() => new NestedOnce());
266         private pb::UnknownFieldSet _unknownFields;
267         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
268         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
269         public static pb::MessageParser<NestedOnce> Parser { get { return _parser; } }
270 
271         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
272         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
273         public static pbr::MessageDescriptor Descriptor {
274           get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.NestedTypes[0]; }
275         }
276 
277         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
278         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
279         pbr::MessageDescriptor pb::IMessage.Descriptor {
280           get { return Descriptor; }
281         }
282 
283         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
284         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
NestedOnce()285         public NestedOnce() {
286           OnConstruction();
287         }
288 
OnConstruction()289         partial void OnConstruction();
290 
291         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
292         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
NestedOnce(NestedOnce other)293         public NestedOnce(NestedOnce other) : this() {
294           _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
295         }
296 
297         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
298         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()299         public NestedOnce Clone() {
300           return new NestedOnce(this);
301         }
302 
303         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
304         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)305         public override bool Equals(object other) {
306           return Equals(other as NestedOnce);
307         }
308 
309         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
310         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(NestedOnce other)311         public bool Equals(NestedOnce other) {
312           if (ReferenceEquals(other, null)) {
313             return false;
314           }
315           if (ReferenceEquals(other, this)) {
316             return true;
317           }
318           return Equals(_unknownFields, other._unknownFields);
319         }
320 
321         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
322         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()323         public override int GetHashCode() {
324           int hash = 1;
325           if (_unknownFields != null) {
326             hash ^= _unknownFields.GetHashCode();
327           }
328           return hash;
329         }
330 
331         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
332         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()333         public override string ToString() {
334           return pb::JsonFormatter.ToDiagnosticString(this);
335         }
336 
337         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
338         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)339         public void WriteTo(pb::CodedOutputStream output) {
340         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
341           output.WriteRawMessage(this);
342         #else
343           if (_unknownFields != null) {
344             _unknownFields.WriteTo(output);
345           }
346         #endif
347         }
348 
349         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
350         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
351         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)352         void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
353           if (_unknownFields != null) {
354             _unknownFields.WriteTo(ref output);
355           }
356         }
357         #endif
358 
359         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
360         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()361         public int CalculateSize() {
362           int size = 0;
363           if (_unknownFields != null) {
364             size += _unknownFields.CalculateSize();
365           }
366           return size;
367         }
368 
369         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
370         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(NestedOnce other)371         public void MergeFrom(NestedOnce other) {
372           if (other == null) {
373             return;
374           }
375           _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
376         }
377 
378         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
379         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)380         public void MergeFrom(pb::CodedInputStream input) {
381         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
382           input.ReadRawMessage(this);
383         #else
384           uint tag;
385           while ((tag = input.ReadTag()) != 0) {
386             switch(tag) {
387               default:
388                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
389                 break;
390             }
391           }
392         #endif
393         }
394 
395         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
396         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
397         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)398         void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
399           uint tag;
400           while ((tag = input.ReadTag()) != 0) {
401             switch(tag) {
402               default:
403                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
404                 break;
405             }
406           }
407         }
408         #endif
409 
410         #region Nested types
411         /// <summary>Container for nested types declared in the NestedOnce message type.</summary>
412         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
413         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
414         public static partial class Types {
415           public sealed partial class NestedTwice : pb::IMessage<NestedTwice>
416           #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
417               , pb::IBufferMessage
418           #endif
419           {
420             private static readonly pb::MessageParser<NestedTwice> _parser = new pb::MessageParser<NestedTwice>(() => new NestedTwice());
421             private pb::UnknownFieldSet _unknownFields;
422             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
423             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
424             public static pb::MessageParser<NestedTwice> Parser { get { return _parser; } }
425 
426             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
427             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
428             public static pbr::MessageDescriptor Descriptor {
429               get { return global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Descriptor.NestedTypes[0]; }
430             }
431 
432             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
433             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
434             pbr::MessageDescriptor pb::IMessage.Descriptor {
435               get { return Descriptor; }
436             }
437 
438             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
439             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
NestedTwice()440             public NestedTwice() {
441               OnConstruction();
442             }
443 
OnConstruction()444             partial void OnConstruction();
445 
446             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
447             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
NestedTwice(NestedTwice other)448             public NestedTwice(NestedTwice other) : this() {
449               _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
450             }
451 
452             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
453             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()454             public NestedTwice Clone() {
455               return new NestedTwice(this);
456             }
457 
458             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
459             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)460             public override bool Equals(object other) {
461               return Equals(other as NestedTwice);
462             }
463 
464             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
465             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(NestedTwice other)466             public bool Equals(NestedTwice other) {
467               if (ReferenceEquals(other, null)) {
468                 return false;
469               }
470               if (ReferenceEquals(other, this)) {
471                 return true;
472               }
473               return Equals(_unknownFields, other._unknownFields);
474             }
475 
476             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
477             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()478             public override int GetHashCode() {
479               int hash = 1;
480               if (_unknownFields != null) {
481                 hash ^= _unknownFields.GetHashCode();
482               }
483               return hash;
484             }
485 
486             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
487             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()488             public override string ToString() {
489               return pb::JsonFormatter.ToDiagnosticString(this);
490             }
491 
492             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
493             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)494             public void WriteTo(pb::CodedOutputStream output) {
495             #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
496               output.WriteRawMessage(this);
497             #else
498               if (_unknownFields != null) {
499                 _unknownFields.WriteTo(output);
500               }
501             #endif
502             }
503 
504             #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
505             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
506             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)507             void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
508               if (_unknownFields != null) {
509                 _unknownFields.WriteTo(ref output);
510               }
511             }
512             #endif
513 
514             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
515             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()516             public int CalculateSize() {
517               int size = 0;
518               if (_unknownFields != null) {
519                 size += _unknownFields.CalculateSize();
520               }
521               return size;
522             }
523 
524             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
525             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(NestedTwice other)526             public void MergeFrom(NestedTwice other) {
527               if (other == null) {
528                 return;
529               }
530               _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
531             }
532 
533             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
534             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)535             public void MergeFrom(pb::CodedInputStream input) {
536             #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
537               input.ReadRawMessage(this);
538             #else
539               uint tag;
540               while ((tag = input.ReadTag()) != 0) {
541                 switch(tag) {
542                   default:
543                     _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
544                     break;
545                 }
546               }
547             #endif
548             }
549 
550             #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
551             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
552             [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)553             void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
554               uint tag;
555               while ((tag = input.ReadTag()) != 0) {
556                 switch(tag) {
557                   default:
558                     _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
559                     break;
560                 }
561               }
562             }
563             #endif
564 
565           }
566 
567         }
568         #endregion
569 
570       }
571 
572     }
573     #endregion
574 
575   }
576 
577   public sealed partial class NegativeEnumMessage : pb::IMessage<NegativeEnumMessage>
578   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
579       , pb::IBufferMessage
580   #endif
581   {
582     private static readonly pb::MessageParser<NegativeEnumMessage> _parser = new pb::MessageParser<NegativeEnumMessage>(() => new NegativeEnumMessage());
583     private pb::UnknownFieldSet _unknownFields;
584     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
585     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
586     public static pb::MessageParser<NegativeEnumMessage> Parser { get { return _parser; } }
587 
588     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
589     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
590     public static pbr::MessageDescriptor Descriptor {
591       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[1]; }
592     }
593 
594     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
595     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
596     pbr::MessageDescriptor pb::IMessage.Descriptor {
597       get { return Descriptor; }
598     }
599 
600     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
601     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
NegativeEnumMessage()602     public NegativeEnumMessage() {
603       OnConstruction();
604     }
605 
OnConstruction()606     partial void OnConstruction();
607 
608     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
609     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
NegativeEnumMessage(NegativeEnumMessage other)610     public NegativeEnumMessage(NegativeEnumMessage other) : this() {
611       value_ = other.value_;
612       values_ = other.values_.Clone();
613       packedValues_ = other.packedValues_.Clone();
614       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
615     }
616 
617     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
618     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()619     public NegativeEnumMessage Clone() {
620       return new NegativeEnumMessage(this);
621     }
622 
623     /// <summary>Field number for the "value" field.</summary>
624     public const int ValueFieldNumber = 1;
625     private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = global::UnitTest.Issues.TestProtos.NegativeEnum.Zero;
626     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
627     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
628     public global::UnitTest.Issues.TestProtos.NegativeEnum Value {
629       get { return value_; }
630       set {
631         value_ = value;
632       }
633     }
634 
635     /// <summary>Field number for the "values" field.</summary>
636     public const int ValuesFieldNumber = 2;
637     private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_values_codec
638         = pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);
639     private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> values_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
640     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
641     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
642     public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> Values {
643       get { return values_; }
644     }
645 
646     /// <summary>Field number for the "packed_values" field.</summary>
647     public const int PackedValuesFieldNumber = 3;
648     private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_packedValues_codec
649         = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);
650     private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> packedValues_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
651     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
652     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
653     public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> PackedValues {
654       get { return packedValues_; }
655     }
656 
657     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
658     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)659     public override bool Equals(object other) {
660       return Equals(other as NegativeEnumMessage);
661     }
662 
663     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
664     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(NegativeEnumMessage other)665     public bool Equals(NegativeEnumMessage other) {
666       if (ReferenceEquals(other, null)) {
667         return false;
668       }
669       if (ReferenceEquals(other, this)) {
670         return true;
671       }
672       if (Value != other.Value) return false;
673       if(!values_.Equals(other.values_)) return false;
674       if(!packedValues_.Equals(other.packedValues_)) return false;
675       return Equals(_unknownFields, other._unknownFields);
676     }
677 
678     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
679     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()680     public override int GetHashCode() {
681       int hash = 1;
682       if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) hash ^= Value.GetHashCode();
683       hash ^= values_.GetHashCode();
684       hash ^= packedValues_.GetHashCode();
685       if (_unknownFields != null) {
686         hash ^= _unknownFields.GetHashCode();
687       }
688       return hash;
689     }
690 
691     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
692     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()693     public override string ToString() {
694       return pb::JsonFormatter.ToDiagnosticString(this);
695     }
696 
697     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
698     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)699     public void WriteTo(pb::CodedOutputStream output) {
700     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
701       output.WriteRawMessage(this);
702     #else
703       if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
704         output.WriteRawTag(8);
705         output.WriteEnum((int) Value);
706       }
707       values_.WriteTo(output, _repeated_values_codec);
708       packedValues_.WriteTo(output, _repeated_packedValues_codec);
709       if (_unknownFields != null) {
710         _unknownFields.WriteTo(output);
711       }
712     #endif
713     }
714 
715     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
716     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
717     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)718     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
719       if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
720         output.WriteRawTag(8);
721         output.WriteEnum((int) Value);
722       }
723       values_.WriteTo(ref output, _repeated_values_codec);
724       packedValues_.WriteTo(ref output, _repeated_packedValues_codec);
725       if (_unknownFields != null) {
726         _unknownFields.WriteTo(ref output);
727       }
728     }
729     #endif
730 
731     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
732     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()733     public int CalculateSize() {
734       int size = 0;
735       if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
736         size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value);
737       }
738       size += values_.CalculateSize(_repeated_values_codec);
739       size += packedValues_.CalculateSize(_repeated_packedValues_codec);
740       if (_unknownFields != null) {
741         size += _unknownFields.CalculateSize();
742       }
743       return size;
744     }
745 
746     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
747     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(NegativeEnumMessage other)748     public void MergeFrom(NegativeEnumMessage other) {
749       if (other == null) {
750         return;
751       }
752       if (other.Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
753         Value = other.Value;
754       }
755       values_.Add(other.values_);
756       packedValues_.Add(other.packedValues_);
757       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
758     }
759 
760     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
761     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)762     public void MergeFrom(pb::CodedInputStream input) {
763     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
764       input.ReadRawMessage(this);
765     #else
766       uint tag;
767       while ((tag = input.ReadTag()) != 0) {
768         switch(tag) {
769           default:
770             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
771             break;
772           case 8: {
773             Value = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum();
774             break;
775           }
776           case 18:
777           case 16: {
778             values_.AddEntriesFrom(input, _repeated_values_codec);
779             break;
780           }
781           case 26:
782           case 24: {
783             packedValues_.AddEntriesFrom(input, _repeated_packedValues_codec);
784             break;
785           }
786         }
787       }
788     #endif
789     }
790 
791     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
792     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
793     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)794     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
795       uint tag;
796       while ((tag = input.ReadTag()) != 0) {
797         switch(tag) {
798           default:
799             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
800             break;
801           case 8: {
802             Value = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum();
803             break;
804           }
805           case 18:
806           case 16: {
807             values_.AddEntriesFrom(ref input, _repeated_values_codec);
808             break;
809           }
810           case 26:
811           case 24: {
812             packedValues_.AddEntriesFrom(ref input, _repeated_packedValues_codec);
813             break;
814           }
815         }
816       }
817     }
818     #endif
819 
820   }
821 
822   public sealed partial class DeprecatedChild : pb::IMessage<DeprecatedChild>
823   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
824       , pb::IBufferMessage
825   #endif
826   {
827     private static readonly pb::MessageParser<DeprecatedChild> _parser = new pb::MessageParser<DeprecatedChild>(() => new DeprecatedChild());
828     private pb::UnknownFieldSet _unknownFields;
829     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
830     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
831     public static pb::MessageParser<DeprecatedChild> Parser { get { return _parser; } }
832 
833     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
834     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
835     public static pbr::MessageDescriptor Descriptor {
836       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[2]; }
837     }
838 
839     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
840     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
841     pbr::MessageDescriptor pb::IMessage.Descriptor {
842       get { return Descriptor; }
843     }
844 
845     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
846     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
DeprecatedChild()847     public DeprecatedChild() {
848       OnConstruction();
849     }
850 
OnConstruction()851     partial void OnConstruction();
852 
853     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
854     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
DeprecatedChild(DeprecatedChild other)855     public DeprecatedChild(DeprecatedChild other) : this() {
856       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
857     }
858 
859     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
860     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()861     public DeprecatedChild Clone() {
862       return new DeprecatedChild(this);
863     }
864 
865     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
866     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)867     public override bool Equals(object other) {
868       return Equals(other as DeprecatedChild);
869     }
870 
871     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
872     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(DeprecatedChild other)873     public bool Equals(DeprecatedChild other) {
874       if (ReferenceEquals(other, null)) {
875         return false;
876       }
877       if (ReferenceEquals(other, this)) {
878         return true;
879       }
880       return Equals(_unknownFields, other._unknownFields);
881     }
882 
883     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
884     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()885     public override int GetHashCode() {
886       int hash = 1;
887       if (_unknownFields != null) {
888         hash ^= _unknownFields.GetHashCode();
889       }
890       return hash;
891     }
892 
893     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
894     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()895     public override string ToString() {
896       return pb::JsonFormatter.ToDiagnosticString(this);
897     }
898 
899     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
900     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)901     public void WriteTo(pb::CodedOutputStream output) {
902     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
903       output.WriteRawMessage(this);
904     #else
905       if (_unknownFields != null) {
906         _unknownFields.WriteTo(output);
907       }
908     #endif
909     }
910 
911     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
912     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
913     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)914     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
915       if (_unknownFields != null) {
916         _unknownFields.WriteTo(ref output);
917       }
918     }
919     #endif
920 
921     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
922     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()923     public int CalculateSize() {
924       int size = 0;
925       if (_unknownFields != null) {
926         size += _unknownFields.CalculateSize();
927       }
928       return size;
929     }
930 
931     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
932     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(DeprecatedChild other)933     public void MergeFrom(DeprecatedChild other) {
934       if (other == null) {
935         return;
936       }
937       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
938     }
939 
940     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
941     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)942     public void MergeFrom(pb::CodedInputStream input) {
943     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
944       input.ReadRawMessage(this);
945     #else
946       uint tag;
947       while ((tag = input.ReadTag()) != 0) {
948         switch(tag) {
949           default:
950             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
951             break;
952         }
953       }
954     #endif
955     }
956 
957     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
958     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
959     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)960     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
961       uint tag;
962       while ((tag = input.ReadTag()) != 0) {
963         switch(tag) {
964           default:
965             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
966             break;
967         }
968       }
969     }
970     #endif
971 
972   }
973 
974   public sealed partial class DeprecatedFieldsMessage : pb::IMessage<DeprecatedFieldsMessage>
975   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
976       , pb::IBufferMessage
977   #endif
978   {
979     private static readonly pb::MessageParser<DeprecatedFieldsMessage> _parser = new pb::MessageParser<DeprecatedFieldsMessage>(() => new DeprecatedFieldsMessage());
980     private pb::UnknownFieldSet _unknownFields;
981     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
982     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
983     public static pb::MessageParser<DeprecatedFieldsMessage> Parser { get { return _parser; } }
984 
985     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
986     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
987     public static pbr::MessageDescriptor Descriptor {
988       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[3]; }
989     }
990 
991     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
992     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
993     pbr::MessageDescriptor pb::IMessage.Descriptor {
994       get { return Descriptor; }
995     }
996 
997     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
998     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
DeprecatedFieldsMessage()999     public DeprecatedFieldsMessage() {
1000       OnConstruction();
1001     }
1002 
OnConstruction()1003     partial void OnConstruction();
1004 
1005     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1006     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
DeprecatedFieldsMessage(DeprecatedFieldsMessage other)1007     public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) : this() {
1008       primitiveValue_ = other.primitiveValue_;
1009       primitiveArray_ = other.primitiveArray_.Clone();
1010       messageValue_ = other.messageValue_ != null ? other.messageValue_.Clone() : null;
1011       messageArray_ = other.messageArray_.Clone();
1012       enumValue_ = other.enumValue_;
1013       enumArray_ = other.enumArray_.Clone();
1014       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
1015     }
1016 
1017     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1018     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()1019     public DeprecatedFieldsMessage Clone() {
1020       return new DeprecatedFieldsMessage(this);
1021     }
1022 
1023     /// <summary>Field number for the "PrimitiveValue" field.</summary>
1024     public const int PrimitiveValueFieldNumber = 1;
1025     private int primitiveValue_;
1026     [global::System.ObsoleteAttribute]
1027     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1028     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1029     public int PrimitiveValue {
1030       get { return primitiveValue_; }
1031       set {
1032         primitiveValue_ = value;
1033       }
1034     }
1035 
1036     /// <summary>Field number for the "PrimitiveArray" field.</summary>
1037     public const int PrimitiveArrayFieldNumber = 2;
1038     private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec
1039         = pb::FieldCodec.ForInt32(18);
1040     private readonly pbc::RepeatedField<int> primitiveArray_ = new pbc::RepeatedField<int>();
1041     [global::System.ObsoleteAttribute]
1042     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1043     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1044     public pbc::RepeatedField<int> PrimitiveArray {
1045       get { return primitiveArray_; }
1046     }
1047 
1048     /// <summary>Field number for the "MessageValue" field.</summary>
1049     public const int MessageValueFieldNumber = 3;
1050     private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_;
1051     [global::System.ObsoleteAttribute]
1052     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1053     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1054     public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue {
1055       get { return messageValue_; }
1056       set {
1057         messageValue_ = value;
1058       }
1059     }
1060 
1061     /// <summary>Field number for the "MessageArray" field.</summary>
1062     public const int MessageArrayFieldNumber = 4;
1063     private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedChild> _repeated_messageArray_codec
1064         = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser);
1065     private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> messageArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild>();
1066     [global::System.ObsoleteAttribute]
1067     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1068     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1069     public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArray {
1070       get { return messageArray_; }
1071     }
1072 
1073     /// <summary>Field number for the "EnumValue" field.</summary>
1074     public const int EnumValueFieldNumber = 5;
1075     private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero;
1076     [global::System.ObsoleteAttribute]
1077     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1078     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1079     public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue {
1080       get { return enumValue_; }
1081       set {
1082         enumValue_ = value;
1083       }
1084     }
1085 
1086     /// <summary>Field number for the "EnumArray" field.</summary>
1087     public const int EnumArrayFieldNumber = 6;
1088     private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedEnum> _repeated_enumArray_codec
1089         = pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues.TestProtos.DeprecatedEnum) x);
1090     private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> enumArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum>();
1091     [global::System.ObsoleteAttribute]
1092     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1093     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1094     public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArray {
1095       get { return enumArray_; }
1096     }
1097 
1098     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1099     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)1100     public override bool Equals(object other) {
1101       return Equals(other as DeprecatedFieldsMessage);
1102     }
1103 
1104     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1105     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(DeprecatedFieldsMessage other)1106     public bool Equals(DeprecatedFieldsMessage other) {
1107       if (ReferenceEquals(other, null)) {
1108         return false;
1109       }
1110       if (ReferenceEquals(other, this)) {
1111         return true;
1112       }
1113       if (PrimitiveValue != other.PrimitiveValue) return false;
1114       if(!primitiveArray_.Equals(other.primitiveArray_)) return false;
1115       if (!object.Equals(MessageValue, other.MessageValue)) return false;
1116       if(!messageArray_.Equals(other.messageArray_)) return false;
1117       if (EnumValue != other.EnumValue) return false;
1118       if(!enumArray_.Equals(other.enumArray_)) return false;
1119       return Equals(_unknownFields, other._unknownFields);
1120     }
1121 
1122     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1123     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()1124     public override int GetHashCode() {
1125       int hash = 1;
1126       if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode();
1127       hash ^= primitiveArray_.GetHashCode();
1128       if (messageValue_ != null) hash ^= MessageValue.GetHashCode();
1129       hash ^= messageArray_.GetHashCode();
1130       if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) hash ^= EnumValue.GetHashCode();
1131       hash ^= enumArray_.GetHashCode();
1132       if (_unknownFields != null) {
1133         hash ^= _unknownFields.GetHashCode();
1134       }
1135       return hash;
1136     }
1137 
1138     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1139     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()1140     public override string ToString() {
1141       return pb::JsonFormatter.ToDiagnosticString(this);
1142     }
1143 
1144     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1145     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)1146     public void WriteTo(pb::CodedOutputStream output) {
1147     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1148       output.WriteRawMessage(this);
1149     #else
1150       if (PrimitiveValue != 0) {
1151         output.WriteRawTag(8);
1152         output.WriteInt32(PrimitiveValue);
1153       }
1154       primitiveArray_.WriteTo(output, _repeated_primitiveArray_codec);
1155       if (messageValue_ != null) {
1156         output.WriteRawTag(26);
1157         output.WriteMessage(MessageValue);
1158       }
1159       messageArray_.WriteTo(output, _repeated_messageArray_codec);
1160       if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
1161         output.WriteRawTag(40);
1162         output.WriteEnum((int) EnumValue);
1163       }
1164       enumArray_.WriteTo(output, _repeated_enumArray_codec);
1165       if (_unknownFields != null) {
1166         _unknownFields.WriteTo(output);
1167       }
1168     #endif
1169     }
1170 
1171     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1172     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1173     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1174     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
1175       if (PrimitiveValue != 0) {
1176         output.WriteRawTag(8);
1177         output.WriteInt32(PrimitiveValue);
1178       }
1179       primitiveArray_.WriteTo(ref output, _repeated_primitiveArray_codec);
1180       if (messageValue_ != null) {
1181         output.WriteRawTag(26);
1182         output.WriteMessage(MessageValue);
1183       }
1184       messageArray_.WriteTo(ref output, _repeated_messageArray_codec);
1185       if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
1186         output.WriteRawTag(40);
1187         output.WriteEnum((int) EnumValue);
1188       }
1189       enumArray_.WriteTo(ref output, _repeated_enumArray_codec);
1190       if (_unknownFields != null) {
1191         _unknownFields.WriteTo(ref output);
1192       }
1193     }
1194     #endif
1195 
1196     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1197     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()1198     public int CalculateSize() {
1199       int size = 0;
1200       if (PrimitiveValue != 0) {
1201         size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveValue);
1202       }
1203       size += primitiveArray_.CalculateSize(_repeated_primitiveArray_codec);
1204       if (messageValue_ != null) {
1205         size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageValue);
1206       }
1207       size += messageArray_.CalculateSize(_repeated_messageArray_codec);
1208       if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
1209         size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumValue);
1210       }
1211       size += enumArray_.CalculateSize(_repeated_enumArray_codec);
1212       if (_unknownFields != null) {
1213         size += _unknownFields.CalculateSize();
1214       }
1215       return size;
1216     }
1217 
1218     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1219     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(DeprecatedFieldsMessage other)1220     public void MergeFrom(DeprecatedFieldsMessage other) {
1221       if (other == null) {
1222         return;
1223       }
1224       if (other.PrimitiveValue != 0) {
1225         PrimitiveValue = other.PrimitiveValue;
1226       }
1227       primitiveArray_.Add(other.primitiveArray_);
1228       if (other.messageValue_ != null) {
1229         if (messageValue_ == null) {
1230           MessageValue = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
1231         }
1232         MessageValue.MergeFrom(other.MessageValue);
1233       }
1234       messageArray_.Add(other.messageArray_);
1235       if (other.EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
1236         EnumValue = other.EnumValue;
1237       }
1238       enumArray_.Add(other.enumArray_);
1239       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1240     }
1241 
1242     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1243     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)1244     public void MergeFrom(pb::CodedInputStream input) {
1245     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1246       input.ReadRawMessage(this);
1247     #else
1248       uint tag;
1249       while ((tag = input.ReadTag()) != 0) {
1250         switch(tag) {
1251           default:
1252             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1253             break;
1254           case 8: {
1255             PrimitiveValue = input.ReadInt32();
1256             break;
1257           }
1258           case 18:
1259           case 16: {
1260             primitiveArray_.AddEntriesFrom(input, _repeated_primitiveArray_codec);
1261             break;
1262           }
1263           case 26: {
1264             if (messageValue_ == null) {
1265               MessageValue = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
1266             }
1267             input.ReadMessage(MessageValue);
1268             break;
1269           }
1270           case 34: {
1271             messageArray_.AddEntriesFrom(input, _repeated_messageArray_codec);
1272             break;
1273           }
1274           case 40: {
1275             EnumValue = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) input.ReadEnum();
1276             break;
1277           }
1278           case 50:
1279           case 48: {
1280             enumArray_.AddEntriesFrom(input, _repeated_enumArray_codec);
1281             break;
1282           }
1283         }
1284       }
1285     #endif
1286     }
1287 
1288     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1289     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1290     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1291     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
1292       uint tag;
1293       while ((tag = input.ReadTag()) != 0) {
1294         switch(tag) {
1295           default:
1296             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1297             break;
1298           case 8: {
1299             PrimitiveValue = input.ReadInt32();
1300             break;
1301           }
1302           case 18:
1303           case 16: {
1304             primitiveArray_.AddEntriesFrom(ref input, _repeated_primitiveArray_codec);
1305             break;
1306           }
1307           case 26: {
1308             if (messageValue_ == null) {
1309               MessageValue = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
1310             }
1311             input.ReadMessage(MessageValue);
1312             break;
1313           }
1314           case 34: {
1315             messageArray_.AddEntriesFrom(ref input, _repeated_messageArray_codec);
1316             break;
1317           }
1318           case 40: {
1319             EnumValue = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) input.ReadEnum();
1320             break;
1321           }
1322           case 50:
1323           case 48: {
1324             enumArray_.AddEntriesFrom(ref input, _repeated_enumArray_codec);
1325             break;
1326           }
1327         }
1328       }
1329     }
1330     #endif
1331 
1332   }
1333 
1334   /// <summary>
1335   /// Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=45
1336   /// </summary>
1337   public sealed partial class ItemField : pb::IMessage<ItemField>
1338   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1339       , pb::IBufferMessage
1340   #endif
1341   {
1342     private static readonly pb::MessageParser<ItemField> _parser = new pb::MessageParser<ItemField>(() => new ItemField());
1343     private pb::UnknownFieldSet _unknownFields;
1344     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1345     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1346     public static pb::MessageParser<ItemField> Parser { get { return _parser; } }
1347 
1348     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1349     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1350     public static pbr::MessageDescriptor Descriptor {
1351       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[4]; }
1352     }
1353 
1354     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1355     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1356     pbr::MessageDescriptor pb::IMessage.Descriptor {
1357       get { return Descriptor; }
1358     }
1359 
1360     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1361     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ItemField()1362     public ItemField() {
1363       OnConstruction();
1364     }
1365 
OnConstruction()1366     partial void OnConstruction();
1367 
1368     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1369     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ItemField(ItemField other)1370     public ItemField(ItemField other) : this() {
1371       item_ = other.item_;
1372       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
1373     }
1374 
1375     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1376     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()1377     public ItemField Clone() {
1378       return new ItemField(this);
1379     }
1380 
1381     /// <summary>Field number for the "item" field.</summary>
1382     public const int ItemFieldNumber = 1;
1383     private int item_;
1384     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1385     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1386     public int Item {
1387       get { return item_; }
1388       set {
1389         item_ = value;
1390       }
1391     }
1392 
1393     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1394     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)1395     public override bool Equals(object other) {
1396       return Equals(other as ItemField);
1397     }
1398 
1399     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1400     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(ItemField other)1401     public bool Equals(ItemField other) {
1402       if (ReferenceEquals(other, null)) {
1403         return false;
1404       }
1405       if (ReferenceEquals(other, this)) {
1406         return true;
1407       }
1408       if (Item != other.Item) return false;
1409       return Equals(_unknownFields, other._unknownFields);
1410     }
1411 
1412     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1413     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()1414     public override int GetHashCode() {
1415       int hash = 1;
1416       if (Item != 0) hash ^= Item.GetHashCode();
1417       if (_unknownFields != null) {
1418         hash ^= _unknownFields.GetHashCode();
1419       }
1420       return hash;
1421     }
1422 
1423     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1424     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()1425     public override string ToString() {
1426       return pb::JsonFormatter.ToDiagnosticString(this);
1427     }
1428 
1429     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1430     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)1431     public void WriteTo(pb::CodedOutputStream output) {
1432     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1433       output.WriteRawMessage(this);
1434     #else
1435       if (Item != 0) {
1436         output.WriteRawTag(8);
1437         output.WriteInt32(Item);
1438       }
1439       if (_unknownFields != null) {
1440         _unknownFields.WriteTo(output);
1441       }
1442     #endif
1443     }
1444 
1445     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1446     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1447     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1448     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
1449       if (Item != 0) {
1450         output.WriteRawTag(8);
1451         output.WriteInt32(Item);
1452       }
1453       if (_unknownFields != null) {
1454         _unknownFields.WriteTo(ref output);
1455       }
1456     }
1457     #endif
1458 
1459     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1460     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()1461     public int CalculateSize() {
1462       int size = 0;
1463       if (Item != 0) {
1464         size += 1 + pb::CodedOutputStream.ComputeInt32Size(Item);
1465       }
1466       if (_unknownFields != null) {
1467         size += _unknownFields.CalculateSize();
1468       }
1469       return size;
1470     }
1471 
1472     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1473     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(ItemField other)1474     public void MergeFrom(ItemField other) {
1475       if (other == null) {
1476         return;
1477       }
1478       if (other.Item != 0) {
1479         Item = other.Item;
1480       }
1481       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1482     }
1483 
1484     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1485     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)1486     public void MergeFrom(pb::CodedInputStream input) {
1487     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1488       input.ReadRawMessage(this);
1489     #else
1490       uint tag;
1491       while ((tag = input.ReadTag()) != 0) {
1492         switch(tag) {
1493           default:
1494             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1495             break;
1496           case 8: {
1497             Item = input.ReadInt32();
1498             break;
1499           }
1500         }
1501       }
1502     #endif
1503     }
1504 
1505     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1506     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1507     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1508     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
1509       uint tag;
1510       while ((tag = input.ReadTag()) != 0) {
1511         switch(tag) {
1512           default:
1513             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1514             break;
1515           case 8: {
1516             Item = input.ReadInt32();
1517             break;
1518           }
1519         }
1520       }
1521     }
1522     #endif
1523 
1524   }
1525 
1526   public sealed partial class ReservedNames : pb::IMessage<ReservedNames>
1527   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1528       , pb::IBufferMessage
1529   #endif
1530   {
1531     private static readonly pb::MessageParser<ReservedNames> _parser = new pb::MessageParser<ReservedNames>(() => new ReservedNames());
1532     private pb::UnknownFieldSet _unknownFields;
1533     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1534     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1535     public static pb::MessageParser<ReservedNames> Parser { get { return _parser; } }
1536 
1537     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1538     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1539     public static pbr::MessageDescriptor Descriptor {
1540       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[5]; }
1541     }
1542 
1543     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1544     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1545     pbr::MessageDescriptor pb::IMessage.Descriptor {
1546       get { return Descriptor; }
1547     }
1548 
1549     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1550     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ReservedNames()1551     public ReservedNames() {
1552       OnConstruction();
1553     }
1554 
OnConstruction()1555     partial void OnConstruction();
1556 
1557     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1558     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ReservedNames(ReservedNames other)1559     public ReservedNames(ReservedNames other) : this() {
1560       types_ = other.types_;
1561       descriptor_ = other.descriptor_;
1562       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
1563     }
1564 
1565     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1566     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()1567     public ReservedNames Clone() {
1568       return new ReservedNames(this);
1569     }
1570 
1571     /// <summary>Field number for the "types" field.</summary>
1572     public const int Types_FieldNumber = 1;
1573     private int types_;
1574     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1575     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1576     public int Types_ {
1577       get { return types_; }
1578       set {
1579         types_ = value;
1580       }
1581     }
1582 
1583     /// <summary>Field number for the "descriptor" field.</summary>
1584     public const int Descriptor_FieldNumber = 2;
1585     private int descriptor_;
1586     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1587     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1588     public int Descriptor_ {
1589       get { return descriptor_; }
1590       set {
1591         descriptor_ = value;
1592       }
1593     }
1594 
1595     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1596     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)1597     public override bool Equals(object other) {
1598       return Equals(other as ReservedNames);
1599     }
1600 
1601     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1602     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(ReservedNames other)1603     public bool Equals(ReservedNames other) {
1604       if (ReferenceEquals(other, null)) {
1605         return false;
1606       }
1607       if (ReferenceEquals(other, this)) {
1608         return true;
1609       }
1610       if (Types_ != other.Types_) return false;
1611       if (Descriptor_ != other.Descriptor_) return false;
1612       return Equals(_unknownFields, other._unknownFields);
1613     }
1614 
1615     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1616     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()1617     public override int GetHashCode() {
1618       int hash = 1;
1619       if (Types_ != 0) hash ^= Types_.GetHashCode();
1620       if (Descriptor_ != 0) hash ^= Descriptor_.GetHashCode();
1621       if (_unknownFields != null) {
1622         hash ^= _unknownFields.GetHashCode();
1623       }
1624       return hash;
1625     }
1626 
1627     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1628     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()1629     public override string ToString() {
1630       return pb::JsonFormatter.ToDiagnosticString(this);
1631     }
1632 
1633     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1634     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)1635     public void WriteTo(pb::CodedOutputStream output) {
1636     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1637       output.WriteRawMessage(this);
1638     #else
1639       if (Types_ != 0) {
1640         output.WriteRawTag(8);
1641         output.WriteInt32(Types_);
1642       }
1643       if (Descriptor_ != 0) {
1644         output.WriteRawTag(16);
1645         output.WriteInt32(Descriptor_);
1646       }
1647       if (_unknownFields != null) {
1648         _unknownFields.WriteTo(output);
1649       }
1650     #endif
1651     }
1652 
1653     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1654     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1655     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1656     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
1657       if (Types_ != 0) {
1658         output.WriteRawTag(8);
1659         output.WriteInt32(Types_);
1660       }
1661       if (Descriptor_ != 0) {
1662         output.WriteRawTag(16);
1663         output.WriteInt32(Descriptor_);
1664       }
1665       if (_unknownFields != null) {
1666         _unknownFields.WriteTo(ref output);
1667       }
1668     }
1669     #endif
1670 
1671     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1672     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()1673     public int CalculateSize() {
1674       int size = 0;
1675       if (Types_ != 0) {
1676         size += 1 + pb::CodedOutputStream.ComputeInt32Size(Types_);
1677       }
1678       if (Descriptor_ != 0) {
1679         size += 1 + pb::CodedOutputStream.ComputeInt32Size(Descriptor_);
1680       }
1681       if (_unknownFields != null) {
1682         size += _unknownFields.CalculateSize();
1683       }
1684       return size;
1685     }
1686 
1687     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1688     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(ReservedNames other)1689     public void MergeFrom(ReservedNames other) {
1690       if (other == null) {
1691         return;
1692       }
1693       if (other.Types_ != 0) {
1694         Types_ = other.Types_;
1695       }
1696       if (other.Descriptor_ != 0) {
1697         Descriptor_ = other.Descriptor_;
1698       }
1699       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1700     }
1701 
1702     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1703     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)1704     public void MergeFrom(pb::CodedInputStream input) {
1705     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1706       input.ReadRawMessage(this);
1707     #else
1708       uint tag;
1709       while ((tag = input.ReadTag()) != 0) {
1710         switch(tag) {
1711           default:
1712             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1713             break;
1714           case 8: {
1715             Types_ = input.ReadInt32();
1716             break;
1717           }
1718           case 16: {
1719             Descriptor_ = input.ReadInt32();
1720             break;
1721           }
1722         }
1723       }
1724     #endif
1725     }
1726 
1727     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1728     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1729     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1730     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
1731       uint tag;
1732       while ((tag = input.ReadTag()) != 0) {
1733         switch(tag) {
1734           default:
1735             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1736             break;
1737           case 8: {
1738             Types_ = input.ReadInt32();
1739             break;
1740           }
1741           case 16: {
1742             Descriptor_ = input.ReadInt32();
1743             break;
1744           }
1745         }
1746       }
1747     }
1748     #endif
1749 
1750     #region Nested types
1751     /// <summary>Container for nested types declared in the ReservedNames message type.</summary>
1752     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1753     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1754     public static partial class Types {
1755       /// <summary>
1756       /// Force a nested type called Types
1757       /// </summary>
1758       public sealed partial class SomeNestedType : pb::IMessage<SomeNestedType>
1759       #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1760           , pb::IBufferMessage
1761       #endif
1762       {
1763         private static readonly pb::MessageParser<SomeNestedType> _parser = new pb::MessageParser<SomeNestedType>(() => new SomeNestedType());
1764         private pb::UnknownFieldSet _unknownFields;
1765         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1766         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1767         public static pb::MessageParser<SomeNestedType> Parser { get { return _parser; } }
1768 
1769         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1770         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1771         public static pbr::MessageDescriptor Descriptor {
1772           get { return global::UnitTest.Issues.TestProtos.ReservedNames.Descriptor.NestedTypes[0]; }
1773         }
1774 
1775         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1776         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1777         pbr::MessageDescriptor pb::IMessage.Descriptor {
1778           get { return Descriptor; }
1779         }
1780 
1781         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1782         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
SomeNestedType()1783         public SomeNestedType() {
1784           OnConstruction();
1785         }
1786 
OnConstruction()1787         partial void OnConstruction();
1788 
1789         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1790         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
SomeNestedType(SomeNestedType other)1791         public SomeNestedType(SomeNestedType other) : this() {
1792           _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
1793         }
1794 
1795         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1796         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()1797         public SomeNestedType Clone() {
1798           return new SomeNestedType(this);
1799         }
1800 
1801         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1802         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)1803         public override bool Equals(object other) {
1804           return Equals(other as SomeNestedType);
1805         }
1806 
1807         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1808         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(SomeNestedType other)1809         public bool Equals(SomeNestedType other) {
1810           if (ReferenceEquals(other, null)) {
1811             return false;
1812           }
1813           if (ReferenceEquals(other, this)) {
1814             return true;
1815           }
1816           return Equals(_unknownFields, other._unknownFields);
1817         }
1818 
1819         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1820         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()1821         public override int GetHashCode() {
1822           int hash = 1;
1823           if (_unknownFields != null) {
1824             hash ^= _unknownFields.GetHashCode();
1825           }
1826           return hash;
1827         }
1828 
1829         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1830         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()1831         public override string ToString() {
1832           return pb::JsonFormatter.ToDiagnosticString(this);
1833         }
1834 
1835         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1836         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)1837         public void WriteTo(pb::CodedOutputStream output) {
1838         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1839           output.WriteRawMessage(this);
1840         #else
1841           if (_unknownFields != null) {
1842             _unknownFields.WriteTo(output);
1843           }
1844         #endif
1845         }
1846 
1847         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1848         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1849         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1850         void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
1851           if (_unknownFields != null) {
1852             _unknownFields.WriteTo(ref output);
1853           }
1854         }
1855         #endif
1856 
1857         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1858         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()1859         public int CalculateSize() {
1860           int size = 0;
1861           if (_unknownFields != null) {
1862             size += _unknownFields.CalculateSize();
1863           }
1864           return size;
1865         }
1866 
1867         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1868         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(SomeNestedType other)1869         public void MergeFrom(SomeNestedType other) {
1870           if (other == null) {
1871             return;
1872           }
1873           _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1874         }
1875 
1876         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1877         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)1878         public void MergeFrom(pb::CodedInputStream input) {
1879         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1880           input.ReadRawMessage(this);
1881         #else
1882           uint tag;
1883           while ((tag = input.ReadTag()) != 0) {
1884             switch(tag) {
1885               default:
1886                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1887                 break;
1888             }
1889           }
1890         #endif
1891         }
1892 
1893         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1894         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1895         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1896         void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
1897           uint tag;
1898           while ((tag = input.ReadTag()) != 0) {
1899             switch(tag) {
1900               default:
1901                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1902                 break;
1903             }
1904           }
1905         }
1906         #endif
1907 
1908       }
1909 
1910     }
1911     #endregion
1912 
1913   }
1914 
1915   /// <summary>
1916   /// These fields are deliberately not declared in numeric
1917   /// order, and the oneof fields aren't contiguous either.
1918   /// This allows for reasonably robust tests of JSON output
1919   /// ordering.
1920   /// TestFieldOrderings in unittest_proto3.proto is similar,
1921   /// but doesn't include oneofs.
1922   /// TODO: Consider adding oneofs to TestFieldOrderings, although
1923   /// that will require fixing other tests in multiple platforms.
1924   /// Alternatively, consider just adding this to
1925   /// unittest_proto3.proto if multiple platforms want it.
1926   /// </summary>
1927   public sealed partial class TestJsonFieldOrdering : pb::IMessage<TestJsonFieldOrdering>
1928   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1929       , pb::IBufferMessage
1930   #endif
1931   {
1932     private static readonly pb::MessageParser<TestJsonFieldOrdering> _parser = new pb::MessageParser<TestJsonFieldOrdering>(() => new TestJsonFieldOrdering());
1933     private pb::UnknownFieldSet _unknownFields;
1934     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1935     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1936     public static pb::MessageParser<TestJsonFieldOrdering> Parser { get { return _parser; } }
1937 
1938     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1939     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1940     public static pbr::MessageDescriptor Descriptor {
1941       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[6]; }
1942     }
1943 
1944     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1945     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1946     pbr::MessageDescriptor pb::IMessage.Descriptor {
1947       get { return Descriptor; }
1948     }
1949 
1950     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1951     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
TestJsonFieldOrdering()1952     public TestJsonFieldOrdering() {
1953       OnConstruction();
1954     }
1955 
OnConstruction()1956     partial void OnConstruction();
1957 
1958     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1959     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
TestJsonFieldOrdering(TestJsonFieldOrdering other)1960     public TestJsonFieldOrdering(TestJsonFieldOrdering other) : this() {
1961       plainInt32_ = other.plainInt32_;
1962       plainString_ = other.plainString_;
1963       switch (other.O1Case) {
1964         case O1OneofCase.O1String:
1965           O1String = other.O1String;
1966           break;
1967         case O1OneofCase.O1Int32:
1968           O1Int32 = other.O1Int32;
1969           break;
1970       }
1971 
1972       switch (other.O2Case) {
1973         case O2OneofCase.O2Int32:
1974           O2Int32 = other.O2Int32;
1975           break;
1976         case O2OneofCase.O2String:
1977           O2String = other.O2String;
1978           break;
1979       }
1980 
1981       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
1982     }
1983 
1984     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1985     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()1986     public TestJsonFieldOrdering Clone() {
1987       return new TestJsonFieldOrdering(this);
1988     }
1989 
1990     /// <summary>Field number for the "plain_int32" field.</summary>
1991     public const int PlainInt32FieldNumber = 4;
1992     private int plainInt32_;
1993     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1994     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1995     public int PlainInt32 {
1996       get { return plainInt32_; }
1997       set {
1998         plainInt32_ = value;
1999       }
2000     }
2001 
2002     /// <summary>Field number for the "o1_string" field.</summary>
2003     public const int O1StringFieldNumber = 2;
2004     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2005     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2006     public string O1String {
2007       get { return o1Case_ == O1OneofCase.O1String ? (string) o1_ : ""; }
2008       set {
2009         o1_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2010         o1Case_ = O1OneofCase.O1String;
2011       }
2012     }
2013 
2014     /// <summary>Field number for the "o1_int32" field.</summary>
2015     public const int O1Int32FieldNumber = 5;
2016     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2017     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2018     public int O1Int32 {
2019       get { return o1Case_ == O1OneofCase.O1Int32 ? (int) o1_ : 0; }
2020       set {
2021         o1_ = value;
2022         o1Case_ = O1OneofCase.O1Int32;
2023       }
2024     }
2025 
2026     /// <summary>Field number for the "plain_string" field.</summary>
2027     public const int PlainStringFieldNumber = 1;
2028     private string plainString_ = "";
2029     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2030     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2031     public string PlainString {
2032       get { return plainString_; }
2033       set {
2034         plainString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2035       }
2036     }
2037 
2038     /// <summary>Field number for the "o2_int32" field.</summary>
2039     public const int O2Int32FieldNumber = 6;
2040     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2041     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2042     public int O2Int32 {
2043       get { return o2Case_ == O2OneofCase.O2Int32 ? (int) o2_ : 0; }
2044       set {
2045         o2_ = value;
2046         o2Case_ = O2OneofCase.O2Int32;
2047       }
2048     }
2049 
2050     /// <summary>Field number for the "o2_string" field.</summary>
2051     public const int O2StringFieldNumber = 3;
2052     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2053     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2054     public string O2String {
2055       get { return o2Case_ == O2OneofCase.O2String ? (string) o2_ : ""; }
2056       set {
2057         o2_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2058         o2Case_ = O2OneofCase.O2String;
2059       }
2060     }
2061 
2062     private object o1_;
2063     /// <summary>Enum of possible cases for the "o1" oneof.</summary>
2064     public enum O1OneofCase {
2065       None = 0,
2066       O1String = 2,
2067       O1Int32 = 5,
2068     }
2069     private O1OneofCase o1Case_ = O1OneofCase.None;
2070     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2071     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2072     public O1OneofCase O1Case {
2073       get { return o1Case_; }
2074     }
2075 
2076     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2077     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ClearO1()2078     public void ClearO1() {
2079       o1Case_ = O1OneofCase.None;
2080       o1_ = null;
2081     }
2082 
2083     private object o2_;
2084     /// <summary>Enum of possible cases for the "o2" oneof.</summary>
2085     public enum O2OneofCase {
2086       None = 0,
2087       O2Int32 = 6,
2088       O2String = 3,
2089     }
2090     private O2OneofCase o2Case_ = O2OneofCase.None;
2091     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2092     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2093     public O2OneofCase O2Case {
2094       get { return o2Case_; }
2095     }
2096 
2097     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2098     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ClearO2()2099     public void ClearO2() {
2100       o2Case_ = O2OneofCase.None;
2101       o2_ = null;
2102     }
2103 
2104     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2105     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)2106     public override bool Equals(object other) {
2107       return Equals(other as TestJsonFieldOrdering);
2108     }
2109 
2110     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2111     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(TestJsonFieldOrdering other)2112     public bool Equals(TestJsonFieldOrdering other) {
2113       if (ReferenceEquals(other, null)) {
2114         return false;
2115       }
2116       if (ReferenceEquals(other, this)) {
2117         return true;
2118       }
2119       if (PlainInt32 != other.PlainInt32) return false;
2120       if (O1String != other.O1String) return false;
2121       if (O1Int32 != other.O1Int32) return false;
2122       if (PlainString != other.PlainString) return false;
2123       if (O2Int32 != other.O2Int32) return false;
2124       if (O2String != other.O2String) return false;
2125       if (O1Case != other.O1Case) return false;
2126       if (O2Case != other.O2Case) return false;
2127       return Equals(_unknownFields, other._unknownFields);
2128     }
2129 
2130     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2131     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()2132     public override int GetHashCode() {
2133       int hash = 1;
2134       if (PlainInt32 != 0) hash ^= PlainInt32.GetHashCode();
2135       if (o1Case_ == O1OneofCase.O1String) hash ^= O1String.GetHashCode();
2136       if (o1Case_ == O1OneofCase.O1Int32) hash ^= O1Int32.GetHashCode();
2137       if (PlainString.Length != 0) hash ^= PlainString.GetHashCode();
2138       if (o2Case_ == O2OneofCase.O2Int32) hash ^= O2Int32.GetHashCode();
2139       if (o2Case_ == O2OneofCase.O2String) hash ^= O2String.GetHashCode();
2140       hash ^= (int) o1Case_;
2141       hash ^= (int) o2Case_;
2142       if (_unknownFields != null) {
2143         hash ^= _unknownFields.GetHashCode();
2144       }
2145       return hash;
2146     }
2147 
2148     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2149     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()2150     public override string ToString() {
2151       return pb::JsonFormatter.ToDiagnosticString(this);
2152     }
2153 
2154     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2155     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)2156     public void WriteTo(pb::CodedOutputStream output) {
2157     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2158       output.WriteRawMessage(this);
2159     #else
2160       if (PlainString.Length != 0) {
2161         output.WriteRawTag(10);
2162         output.WriteString(PlainString);
2163       }
2164       if (o1Case_ == O1OneofCase.O1String) {
2165         output.WriteRawTag(18);
2166         output.WriteString(O1String);
2167       }
2168       if (o2Case_ == O2OneofCase.O2String) {
2169         output.WriteRawTag(26);
2170         output.WriteString(O2String);
2171       }
2172       if (PlainInt32 != 0) {
2173         output.WriteRawTag(32);
2174         output.WriteInt32(PlainInt32);
2175       }
2176       if (o1Case_ == O1OneofCase.O1Int32) {
2177         output.WriteRawTag(40);
2178         output.WriteInt32(O1Int32);
2179       }
2180       if (o2Case_ == O2OneofCase.O2Int32) {
2181         output.WriteRawTag(48);
2182         output.WriteInt32(O2Int32);
2183       }
2184       if (_unknownFields != null) {
2185         _unknownFields.WriteTo(output);
2186       }
2187     #endif
2188     }
2189 
2190     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2191     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2192     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)2193     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2194       if (PlainString.Length != 0) {
2195         output.WriteRawTag(10);
2196         output.WriteString(PlainString);
2197       }
2198       if (o1Case_ == O1OneofCase.O1String) {
2199         output.WriteRawTag(18);
2200         output.WriteString(O1String);
2201       }
2202       if (o2Case_ == O2OneofCase.O2String) {
2203         output.WriteRawTag(26);
2204         output.WriteString(O2String);
2205       }
2206       if (PlainInt32 != 0) {
2207         output.WriteRawTag(32);
2208         output.WriteInt32(PlainInt32);
2209       }
2210       if (o1Case_ == O1OneofCase.O1Int32) {
2211         output.WriteRawTag(40);
2212         output.WriteInt32(O1Int32);
2213       }
2214       if (o2Case_ == O2OneofCase.O2Int32) {
2215         output.WriteRawTag(48);
2216         output.WriteInt32(O2Int32);
2217       }
2218       if (_unknownFields != null) {
2219         _unknownFields.WriteTo(ref output);
2220       }
2221     }
2222     #endif
2223 
2224     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2225     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()2226     public int CalculateSize() {
2227       int size = 0;
2228       if (PlainInt32 != 0) {
2229         size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlainInt32);
2230       }
2231       if (o1Case_ == O1OneofCase.O1String) {
2232         size += 1 + pb::CodedOutputStream.ComputeStringSize(O1String);
2233       }
2234       if (o1Case_ == O1OneofCase.O1Int32) {
2235         size += 1 + pb::CodedOutputStream.ComputeInt32Size(O1Int32);
2236       }
2237       if (PlainString.Length != 0) {
2238         size += 1 + pb::CodedOutputStream.ComputeStringSize(PlainString);
2239       }
2240       if (o2Case_ == O2OneofCase.O2Int32) {
2241         size += 1 + pb::CodedOutputStream.ComputeInt32Size(O2Int32);
2242       }
2243       if (o2Case_ == O2OneofCase.O2String) {
2244         size += 1 + pb::CodedOutputStream.ComputeStringSize(O2String);
2245       }
2246       if (_unknownFields != null) {
2247         size += _unknownFields.CalculateSize();
2248       }
2249       return size;
2250     }
2251 
2252     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2253     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(TestJsonFieldOrdering other)2254     public void MergeFrom(TestJsonFieldOrdering other) {
2255       if (other == null) {
2256         return;
2257       }
2258       if (other.PlainInt32 != 0) {
2259         PlainInt32 = other.PlainInt32;
2260       }
2261       if (other.PlainString.Length != 0) {
2262         PlainString = other.PlainString;
2263       }
2264       switch (other.O1Case) {
2265         case O1OneofCase.O1String:
2266           O1String = other.O1String;
2267           break;
2268         case O1OneofCase.O1Int32:
2269           O1Int32 = other.O1Int32;
2270           break;
2271       }
2272 
2273       switch (other.O2Case) {
2274         case O2OneofCase.O2Int32:
2275           O2Int32 = other.O2Int32;
2276           break;
2277         case O2OneofCase.O2String:
2278           O2String = other.O2String;
2279           break;
2280       }
2281 
2282       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2283     }
2284 
2285     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2286     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)2287     public void MergeFrom(pb::CodedInputStream input) {
2288     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2289       input.ReadRawMessage(this);
2290     #else
2291       uint tag;
2292       while ((tag = input.ReadTag()) != 0) {
2293         switch(tag) {
2294           default:
2295             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2296             break;
2297           case 10: {
2298             PlainString = input.ReadString();
2299             break;
2300           }
2301           case 18: {
2302             O1String = input.ReadString();
2303             break;
2304           }
2305           case 26: {
2306             O2String = input.ReadString();
2307             break;
2308           }
2309           case 32: {
2310             PlainInt32 = input.ReadInt32();
2311             break;
2312           }
2313           case 40: {
2314             O1Int32 = input.ReadInt32();
2315             break;
2316           }
2317           case 48: {
2318             O2Int32 = input.ReadInt32();
2319             break;
2320           }
2321         }
2322       }
2323     #endif
2324     }
2325 
2326     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2327     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2328     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)2329     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2330       uint tag;
2331       while ((tag = input.ReadTag()) != 0) {
2332         switch(tag) {
2333           default:
2334             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2335             break;
2336           case 10: {
2337             PlainString = input.ReadString();
2338             break;
2339           }
2340           case 18: {
2341             O1String = input.ReadString();
2342             break;
2343           }
2344           case 26: {
2345             O2String = input.ReadString();
2346             break;
2347           }
2348           case 32: {
2349             PlainInt32 = input.ReadInt32();
2350             break;
2351           }
2352           case 40: {
2353             O1Int32 = input.ReadInt32();
2354             break;
2355           }
2356           case 48: {
2357             O2Int32 = input.ReadInt32();
2358             break;
2359           }
2360         }
2361       }
2362     }
2363     #endif
2364 
2365   }
2366 
2367   public sealed partial class TestJsonName : pb::IMessage<TestJsonName>
2368   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2369       , pb::IBufferMessage
2370   #endif
2371   {
2372     private static readonly pb::MessageParser<TestJsonName> _parser = new pb::MessageParser<TestJsonName>(() => new TestJsonName());
2373     private pb::UnknownFieldSet _unknownFields;
2374     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2375     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2376     public static pb::MessageParser<TestJsonName> Parser { get { return _parser; } }
2377 
2378     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2379     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2380     public static pbr::MessageDescriptor Descriptor {
2381       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[7]; }
2382     }
2383 
2384     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2385     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2386     pbr::MessageDescriptor pb::IMessage.Descriptor {
2387       get { return Descriptor; }
2388     }
2389 
2390     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2391     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
TestJsonName()2392     public TestJsonName() {
2393       OnConstruction();
2394     }
2395 
OnConstruction()2396     partial void OnConstruction();
2397 
2398     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2399     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
TestJsonName(TestJsonName other)2400     public TestJsonName(TestJsonName other) : this() {
2401       name_ = other.name_;
2402       description_ = other.description_;
2403       guid_ = other.guid_;
2404       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2405     }
2406 
2407     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2408     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()2409     public TestJsonName Clone() {
2410       return new TestJsonName(this);
2411     }
2412 
2413     /// <summary>Field number for the "name" field.</summary>
2414     public const int NameFieldNumber = 1;
2415     private string name_ = "";
2416     /// <summary>
2417     /// Message for testing the effects for of the json_name option
2418     /// </summary>
2419     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2420     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2421     public string Name {
2422       get { return name_; }
2423       set {
2424         name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2425       }
2426     }
2427 
2428     /// <summary>Field number for the "description" field.</summary>
2429     public const int DescriptionFieldNumber = 2;
2430     private string description_ = "";
2431     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2432     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2433     public string Description {
2434       get { return description_; }
2435       set {
2436         description_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2437       }
2438     }
2439 
2440     /// <summary>Field number for the "guid" field.</summary>
2441     public const int GuidFieldNumber = 3;
2442     private string guid_ = "";
2443     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2444     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2445     public string Guid {
2446       get { return guid_; }
2447       set {
2448         guid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2449       }
2450     }
2451 
2452     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2453     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)2454     public override bool Equals(object other) {
2455       return Equals(other as TestJsonName);
2456     }
2457 
2458     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2459     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(TestJsonName other)2460     public bool Equals(TestJsonName other) {
2461       if (ReferenceEquals(other, null)) {
2462         return false;
2463       }
2464       if (ReferenceEquals(other, this)) {
2465         return true;
2466       }
2467       if (Name != other.Name) return false;
2468       if (Description != other.Description) return false;
2469       if (Guid != other.Guid) return false;
2470       return Equals(_unknownFields, other._unknownFields);
2471     }
2472 
2473     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2474     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()2475     public override int GetHashCode() {
2476       int hash = 1;
2477       if (Name.Length != 0) hash ^= Name.GetHashCode();
2478       if (Description.Length != 0) hash ^= Description.GetHashCode();
2479       if (Guid.Length != 0) hash ^= Guid.GetHashCode();
2480       if (_unknownFields != null) {
2481         hash ^= _unknownFields.GetHashCode();
2482       }
2483       return hash;
2484     }
2485 
2486     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2487     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()2488     public override string ToString() {
2489       return pb::JsonFormatter.ToDiagnosticString(this);
2490     }
2491 
2492     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2493     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)2494     public void WriteTo(pb::CodedOutputStream output) {
2495     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2496       output.WriteRawMessage(this);
2497     #else
2498       if (Name.Length != 0) {
2499         output.WriteRawTag(10);
2500         output.WriteString(Name);
2501       }
2502       if (Description.Length != 0) {
2503         output.WriteRawTag(18);
2504         output.WriteString(Description);
2505       }
2506       if (Guid.Length != 0) {
2507         output.WriteRawTag(26);
2508         output.WriteString(Guid);
2509       }
2510       if (_unknownFields != null) {
2511         _unknownFields.WriteTo(output);
2512       }
2513     #endif
2514     }
2515 
2516     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2517     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2518     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)2519     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2520       if (Name.Length != 0) {
2521         output.WriteRawTag(10);
2522         output.WriteString(Name);
2523       }
2524       if (Description.Length != 0) {
2525         output.WriteRawTag(18);
2526         output.WriteString(Description);
2527       }
2528       if (Guid.Length != 0) {
2529         output.WriteRawTag(26);
2530         output.WriteString(Guid);
2531       }
2532       if (_unknownFields != null) {
2533         _unknownFields.WriteTo(ref output);
2534       }
2535     }
2536     #endif
2537 
2538     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2539     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()2540     public int CalculateSize() {
2541       int size = 0;
2542       if (Name.Length != 0) {
2543         size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
2544       }
2545       if (Description.Length != 0) {
2546         size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
2547       }
2548       if (Guid.Length != 0) {
2549         size += 1 + pb::CodedOutputStream.ComputeStringSize(Guid);
2550       }
2551       if (_unknownFields != null) {
2552         size += _unknownFields.CalculateSize();
2553       }
2554       return size;
2555     }
2556 
2557     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2558     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(TestJsonName other)2559     public void MergeFrom(TestJsonName other) {
2560       if (other == null) {
2561         return;
2562       }
2563       if (other.Name.Length != 0) {
2564         Name = other.Name;
2565       }
2566       if (other.Description.Length != 0) {
2567         Description = other.Description;
2568       }
2569       if (other.Guid.Length != 0) {
2570         Guid = other.Guid;
2571       }
2572       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2573     }
2574 
2575     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2576     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)2577     public void MergeFrom(pb::CodedInputStream input) {
2578     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2579       input.ReadRawMessage(this);
2580     #else
2581       uint tag;
2582       while ((tag = input.ReadTag()) != 0) {
2583         switch(tag) {
2584           default:
2585             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2586             break;
2587           case 10: {
2588             Name = input.ReadString();
2589             break;
2590           }
2591           case 18: {
2592             Description = input.ReadString();
2593             break;
2594           }
2595           case 26: {
2596             Guid = input.ReadString();
2597             break;
2598           }
2599         }
2600       }
2601     #endif
2602     }
2603 
2604     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2605     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2606     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)2607     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2608       uint tag;
2609       while ((tag = input.ReadTag()) != 0) {
2610         switch(tag) {
2611           default:
2612             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2613             break;
2614           case 10: {
2615             Name = input.ReadString();
2616             break;
2617           }
2618           case 18: {
2619             Description = input.ReadString();
2620             break;
2621           }
2622           case 26: {
2623             Guid = input.ReadString();
2624             break;
2625           }
2626         }
2627       }
2628     }
2629     #endif
2630 
2631   }
2632 
2633   /// <summary>
2634   /// Issue 3200: When merging two messages which use the same
2635   /// oneof case, which is itself a message type, the submessages should
2636   /// be merged.
2637   /// </summary>
2638   public sealed partial class OneofMerging : pb::IMessage<OneofMerging>
2639   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2640       , pb::IBufferMessage
2641   #endif
2642   {
2643     private static readonly pb::MessageParser<OneofMerging> _parser = new pb::MessageParser<OneofMerging>(() => new OneofMerging());
2644     private pb::UnknownFieldSet _unknownFields;
2645     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2646     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2647     public static pb::MessageParser<OneofMerging> Parser { get { return _parser; } }
2648 
2649     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2650     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2651     public static pbr::MessageDescriptor Descriptor {
2652       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[8]; }
2653     }
2654 
2655     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2656     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2657     pbr::MessageDescriptor pb::IMessage.Descriptor {
2658       get { return Descriptor; }
2659     }
2660 
2661     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2662     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
OneofMerging()2663     public OneofMerging() {
2664       OnConstruction();
2665     }
2666 
OnConstruction()2667     partial void OnConstruction();
2668 
2669     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2670     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
OneofMerging(OneofMerging other)2671     public OneofMerging(OneofMerging other) : this() {
2672       switch (other.ValueCase) {
2673         case ValueOneofCase.Text:
2674           Text = other.Text;
2675           break;
2676         case ValueOneofCase.Nested:
2677           Nested = other.Nested.Clone();
2678           break;
2679       }
2680 
2681       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2682     }
2683 
2684     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2685     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()2686     public OneofMerging Clone() {
2687       return new OneofMerging(this);
2688     }
2689 
2690     /// <summary>Field number for the "text" field.</summary>
2691     public const int TextFieldNumber = 1;
2692     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2693     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2694     public string Text {
2695       get { return valueCase_ == ValueOneofCase.Text ? (string) value_ : ""; }
2696       set {
2697         value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2698         valueCase_ = ValueOneofCase.Text;
2699       }
2700     }
2701 
2702     /// <summary>Field number for the "nested" field.</summary>
2703     public const int NestedFieldNumber = 2;
2704     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2705     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2706     public global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested Nested {
2707       get { return valueCase_ == ValueOneofCase.Nested ? (global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested) value_ : null; }
2708       set {
2709         value_ = value;
2710         valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.Nested;
2711       }
2712     }
2713 
2714     private object value_;
2715     /// <summary>Enum of possible cases for the "value" oneof.</summary>
2716     public enum ValueOneofCase {
2717       None = 0,
2718       Text = 1,
2719       Nested = 2,
2720     }
2721     private ValueOneofCase valueCase_ = ValueOneofCase.None;
2722     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2723     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2724     public ValueOneofCase ValueCase {
2725       get { return valueCase_; }
2726     }
2727 
2728     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2729     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ClearValue()2730     public void ClearValue() {
2731       valueCase_ = ValueOneofCase.None;
2732       value_ = null;
2733     }
2734 
2735     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2736     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)2737     public override bool Equals(object other) {
2738       return Equals(other as OneofMerging);
2739     }
2740 
2741     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2742     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(OneofMerging other)2743     public bool Equals(OneofMerging other) {
2744       if (ReferenceEquals(other, null)) {
2745         return false;
2746       }
2747       if (ReferenceEquals(other, this)) {
2748         return true;
2749       }
2750       if (Text != other.Text) return false;
2751       if (!object.Equals(Nested, other.Nested)) return false;
2752       if (ValueCase != other.ValueCase) return false;
2753       return Equals(_unknownFields, other._unknownFields);
2754     }
2755 
2756     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2757     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()2758     public override int GetHashCode() {
2759       int hash = 1;
2760       if (valueCase_ == ValueOneofCase.Text) hash ^= Text.GetHashCode();
2761       if (valueCase_ == ValueOneofCase.Nested) hash ^= Nested.GetHashCode();
2762       hash ^= (int) valueCase_;
2763       if (_unknownFields != null) {
2764         hash ^= _unknownFields.GetHashCode();
2765       }
2766       return hash;
2767     }
2768 
2769     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2770     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()2771     public override string ToString() {
2772       return pb::JsonFormatter.ToDiagnosticString(this);
2773     }
2774 
2775     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2776     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)2777     public void WriteTo(pb::CodedOutputStream output) {
2778     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2779       output.WriteRawMessage(this);
2780     #else
2781       if (valueCase_ == ValueOneofCase.Text) {
2782         output.WriteRawTag(10);
2783         output.WriteString(Text);
2784       }
2785       if (valueCase_ == ValueOneofCase.Nested) {
2786         output.WriteRawTag(18);
2787         output.WriteMessage(Nested);
2788       }
2789       if (_unknownFields != null) {
2790         _unknownFields.WriteTo(output);
2791       }
2792     #endif
2793     }
2794 
2795     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2796     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2797     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)2798     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2799       if (valueCase_ == ValueOneofCase.Text) {
2800         output.WriteRawTag(10);
2801         output.WriteString(Text);
2802       }
2803       if (valueCase_ == ValueOneofCase.Nested) {
2804         output.WriteRawTag(18);
2805         output.WriteMessage(Nested);
2806       }
2807       if (_unknownFields != null) {
2808         _unknownFields.WriteTo(ref output);
2809       }
2810     }
2811     #endif
2812 
2813     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2814     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()2815     public int CalculateSize() {
2816       int size = 0;
2817       if (valueCase_ == ValueOneofCase.Text) {
2818         size += 1 + pb::CodedOutputStream.ComputeStringSize(Text);
2819       }
2820       if (valueCase_ == ValueOneofCase.Nested) {
2821         size += 1 + pb::CodedOutputStream.ComputeMessageSize(Nested);
2822       }
2823       if (_unknownFields != null) {
2824         size += _unknownFields.CalculateSize();
2825       }
2826       return size;
2827     }
2828 
2829     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2830     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(OneofMerging other)2831     public void MergeFrom(OneofMerging other) {
2832       if (other == null) {
2833         return;
2834       }
2835       switch (other.ValueCase) {
2836         case ValueOneofCase.Text:
2837           Text = other.Text;
2838           break;
2839         case ValueOneofCase.Nested:
2840           if (Nested == null) {
2841             Nested = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested();
2842           }
2843           Nested.MergeFrom(other.Nested);
2844           break;
2845       }
2846 
2847       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2848     }
2849 
2850     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2851     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)2852     public void MergeFrom(pb::CodedInputStream input) {
2853     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2854       input.ReadRawMessage(this);
2855     #else
2856       uint tag;
2857       while ((tag = input.ReadTag()) != 0) {
2858         switch(tag) {
2859           default:
2860             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2861             break;
2862           case 10: {
2863             Text = input.ReadString();
2864             break;
2865           }
2866           case 18: {
2867             global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested subBuilder = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested();
2868             if (valueCase_ == ValueOneofCase.Nested) {
2869               subBuilder.MergeFrom(Nested);
2870             }
2871             input.ReadMessage(subBuilder);
2872             Nested = subBuilder;
2873             break;
2874           }
2875         }
2876       }
2877     #endif
2878     }
2879 
2880     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2881     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2882     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)2883     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2884       uint tag;
2885       while ((tag = input.ReadTag()) != 0) {
2886         switch(tag) {
2887           default:
2888             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2889             break;
2890           case 10: {
2891             Text = input.ReadString();
2892             break;
2893           }
2894           case 18: {
2895             global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested subBuilder = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested();
2896             if (valueCase_ == ValueOneofCase.Nested) {
2897               subBuilder.MergeFrom(Nested);
2898             }
2899             input.ReadMessage(subBuilder);
2900             Nested = subBuilder;
2901             break;
2902           }
2903         }
2904       }
2905     }
2906     #endif
2907 
2908     #region Nested types
2909     /// <summary>Container for nested types declared in the OneofMerging message type.</summary>
2910     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2911     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2912     public static partial class Types {
2913       public sealed partial class Nested : pb::IMessage<Nested>
2914       #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2915           , pb::IBufferMessage
2916       #endif
2917       {
2918         private static readonly pb::MessageParser<Nested> _parser = new pb::MessageParser<Nested>(() => new Nested());
2919         private pb::UnknownFieldSet _unknownFields;
2920         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2921         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2922         public static pb::MessageParser<Nested> Parser { get { return _parser; } }
2923 
2924         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2925         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2926         public static pbr::MessageDescriptor Descriptor {
2927           get { return global::UnitTest.Issues.TestProtos.OneofMerging.Descriptor.NestedTypes[0]; }
2928         }
2929 
2930         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2931         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2932         pbr::MessageDescriptor pb::IMessage.Descriptor {
2933           get { return Descriptor; }
2934         }
2935 
2936         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2937         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Nested()2938         public Nested() {
2939           OnConstruction();
2940         }
2941 
OnConstruction()2942         partial void OnConstruction();
2943 
2944         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2945         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Nested(Nested other)2946         public Nested(Nested other) : this() {
2947           x_ = other.x_;
2948           y_ = other.y_;
2949           _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2950         }
2951 
2952         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2953         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()2954         public Nested Clone() {
2955           return new Nested(this);
2956         }
2957 
2958         /// <summary>Field number for the "x" field.</summary>
2959         public const int XFieldNumber = 1;
2960         private int x_;
2961         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2962         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2963         public int X {
2964           get { return x_; }
2965           set {
2966             x_ = value;
2967           }
2968         }
2969 
2970         /// <summary>Field number for the "y" field.</summary>
2971         public const int YFieldNumber = 2;
2972         private int y_;
2973         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2974         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
2975         public int Y {
2976           get { return y_; }
2977           set {
2978             y_ = value;
2979           }
2980         }
2981 
2982         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2983         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)2984         public override bool Equals(object other) {
2985           return Equals(other as Nested);
2986         }
2987 
2988         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2989         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(Nested other)2990         public bool Equals(Nested other) {
2991           if (ReferenceEquals(other, null)) {
2992             return false;
2993           }
2994           if (ReferenceEquals(other, this)) {
2995             return true;
2996           }
2997           if (X != other.X) return false;
2998           if (Y != other.Y) return false;
2999           return Equals(_unknownFields, other._unknownFields);
3000         }
3001 
3002         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3003         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()3004         public override int GetHashCode() {
3005           int hash = 1;
3006           if (X != 0) hash ^= X.GetHashCode();
3007           if (Y != 0) hash ^= Y.GetHashCode();
3008           if (_unknownFields != null) {
3009             hash ^= _unknownFields.GetHashCode();
3010           }
3011           return hash;
3012         }
3013 
3014         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3015         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()3016         public override string ToString() {
3017           return pb::JsonFormatter.ToDiagnosticString(this);
3018         }
3019 
3020         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3021         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)3022         public void WriteTo(pb::CodedOutputStream output) {
3023         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3024           output.WriteRawMessage(this);
3025         #else
3026           if (X != 0) {
3027             output.WriteRawTag(8);
3028             output.WriteInt32(X);
3029           }
3030           if (Y != 0) {
3031             output.WriteRawTag(16);
3032             output.WriteInt32(Y);
3033           }
3034           if (_unknownFields != null) {
3035             _unknownFields.WriteTo(output);
3036           }
3037         #endif
3038         }
3039 
3040         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3041         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3042         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)3043         void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3044           if (X != 0) {
3045             output.WriteRawTag(8);
3046             output.WriteInt32(X);
3047           }
3048           if (Y != 0) {
3049             output.WriteRawTag(16);
3050             output.WriteInt32(Y);
3051           }
3052           if (_unknownFields != null) {
3053             _unknownFields.WriteTo(ref output);
3054           }
3055         }
3056         #endif
3057 
3058         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3059         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()3060         public int CalculateSize() {
3061           int size = 0;
3062           if (X != 0) {
3063             size += 1 + pb::CodedOutputStream.ComputeInt32Size(X);
3064           }
3065           if (Y != 0) {
3066             size += 1 + pb::CodedOutputStream.ComputeInt32Size(Y);
3067           }
3068           if (_unknownFields != null) {
3069             size += _unknownFields.CalculateSize();
3070           }
3071           return size;
3072         }
3073 
3074         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3075         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(Nested other)3076         public void MergeFrom(Nested other) {
3077           if (other == null) {
3078             return;
3079           }
3080           if (other.X != 0) {
3081             X = other.X;
3082           }
3083           if (other.Y != 0) {
3084             Y = other.Y;
3085           }
3086           _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3087         }
3088 
3089         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3090         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)3091         public void MergeFrom(pb::CodedInputStream input) {
3092         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3093           input.ReadRawMessage(this);
3094         #else
3095           uint tag;
3096           while ((tag = input.ReadTag()) != 0) {
3097             switch(tag) {
3098               default:
3099                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3100                 break;
3101               case 8: {
3102                 X = input.ReadInt32();
3103                 break;
3104               }
3105               case 16: {
3106                 Y = input.ReadInt32();
3107                 break;
3108               }
3109             }
3110           }
3111         #endif
3112         }
3113 
3114         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3115         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3116         [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)3117         void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3118           uint tag;
3119           while ((tag = input.ReadTag()) != 0) {
3120             switch(tag) {
3121               default:
3122                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3123                 break;
3124               case 8: {
3125                 X = input.ReadInt32();
3126                 break;
3127               }
3128               case 16: {
3129                 Y = input.ReadInt32();
3130                 break;
3131               }
3132             }
3133           }
3134         }
3135         #endif
3136 
3137       }
3138 
3139     }
3140     #endregion
3141 
3142   }
3143 
3144   public sealed partial class NullValueOutsideStruct : pb::IMessage<NullValueOutsideStruct>
3145   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3146       , pb::IBufferMessage
3147   #endif
3148   {
3149     private static readonly pb::MessageParser<NullValueOutsideStruct> _parser = new pb::MessageParser<NullValueOutsideStruct>(() => new NullValueOutsideStruct());
3150     private pb::UnknownFieldSet _unknownFields;
3151     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3152     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3153     public static pb::MessageParser<NullValueOutsideStruct> Parser { get { return _parser; } }
3154 
3155     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3156     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3157     public static pbr::MessageDescriptor Descriptor {
3158       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[9]; }
3159     }
3160 
3161     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3162     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3163     pbr::MessageDescriptor pb::IMessage.Descriptor {
3164       get { return Descriptor; }
3165     }
3166 
3167     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3168     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
NullValueOutsideStruct()3169     public NullValueOutsideStruct() {
3170       OnConstruction();
3171     }
3172 
OnConstruction()3173     partial void OnConstruction();
3174 
3175     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3176     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
NullValueOutsideStruct(NullValueOutsideStruct other)3177     public NullValueOutsideStruct(NullValueOutsideStruct other) : this() {
3178       switch (other.ValueCase) {
3179         case ValueOneofCase.StringValue:
3180           StringValue = other.StringValue;
3181           break;
3182         case ValueOneofCase.NullValue:
3183           NullValue = other.NullValue;
3184           break;
3185       }
3186 
3187       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
3188     }
3189 
3190     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3191     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()3192     public NullValueOutsideStruct Clone() {
3193       return new NullValueOutsideStruct(this);
3194     }
3195 
3196     /// <summary>Field number for the "string_value" field.</summary>
3197     public const int StringValueFieldNumber = 1;
3198     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3199     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3200     public string StringValue {
3201       get { return valueCase_ == ValueOneofCase.StringValue ? (string) value_ : ""; }
3202       set {
3203         value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
3204         valueCase_ = ValueOneofCase.StringValue;
3205       }
3206     }
3207 
3208     /// <summary>Field number for the "null_value" field.</summary>
3209     public const int NullValueFieldNumber = 2;
3210     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3211     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3212     public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
3213       get { return valueCase_ == ValueOneofCase.NullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) value_ : global::Google.Protobuf.WellKnownTypes.NullValue.NullValue; }
3214       set {
3215         value_ = value;
3216         valueCase_ = ValueOneofCase.NullValue;
3217       }
3218     }
3219 
3220     private object value_;
3221     /// <summary>Enum of possible cases for the "value" oneof.</summary>
3222     public enum ValueOneofCase {
3223       None = 0,
3224       StringValue = 1,
3225       NullValue = 2,
3226     }
3227     private ValueOneofCase valueCase_ = ValueOneofCase.None;
3228     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3229     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3230     public ValueOneofCase ValueCase {
3231       get { return valueCase_; }
3232     }
3233 
3234     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3235     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ClearValue()3236     public void ClearValue() {
3237       valueCase_ = ValueOneofCase.None;
3238       value_ = null;
3239     }
3240 
3241     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3242     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)3243     public override bool Equals(object other) {
3244       return Equals(other as NullValueOutsideStruct);
3245     }
3246 
3247     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3248     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(NullValueOutsideStruct other)3249     public bool Equals(NullValueOutsideStruct other) {
3250       if (ReferenceEquals(other, null)) {
3251         return false;
3252       }
3253       if (ReferenceEquals(other, this)) {
3254         return true;
3255       }
3256       if (StringValue != other.StringValue) return false;
3257       if (NullValue != other.NullValue) return false;
3258       if (ValueCase != other.ValueCase) return false;
3259       return Equals(_unknownFields, other._unknownFields);
3260     }
3261 
3262     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3263     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()3264     public override int GetHashCode() {
3265       int hash = 1;
3266       if (valueCase_ == ValueOneofCase.StringValue) hash ^= StringValue.GetHashCode();
3267       if (valueCase_ == ValueOneofCase.NullValue) hash ^= NullValue.GetHashCode();
3268       hash ^= (int) valueCase_;
3269       if (_unknownFields != null) {
3270         hash ^= _unknownFields.GetHashCode();
3271       }
3272       return hash;
3273     }
3274 
3275     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3276     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()3277     public override string ToString() {
3278       return pb::JsonFormatter.ToDiagnosticString(this);
3279     }
3280 
3281     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3282     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)3283     public void WriteTo(pb::CodedOutputStream output) {
3284     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3285       output.WriteRawMessage(this);
3286     #else
3287       if (valueCase_ == ValueOneofCase.StringValue) {
3288         output.WriteRawTag(10);
3289         output.WriteString(StringValue);
3290       }
3291       if (valueCase_ == ValueOneofCase.NullValue) {
3292         output.WriteRawTag(16);
3293         output.WriteEnum((int) NullValue);
3294       }
3295       if (_unknownFields != null) {
3296         _unknownFields.WriteTo(output);
3297       }
3298     #endif
3299     }
3300 
3301     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3302     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3303     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)3304     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3305       if (valueCase_ == ValueOneofCase.StringValue) {
3306         output.WriteRawTag(10);
3307         output.WriteString(StringValue);
3308       }
3309       if (valueCase_ == ValueOneofCase.NullValue) {
3310         output.WriteRawTag(16);
3311         output.WriteEnum((int) NullValue);
3312       }
3313       if (_unknownFields != null) {
3314         _unknownFields.WriteTo(ref output);
3315       }
3316     }
3317     #endif
3318 
3319     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3320     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()3321     public int CalculateSize() {
3322       int size = 0;
3323       if (valueCase_ == ValueOneofCase.StringValue) {
3324         size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
3325       }
3326       if (valueCase_ == ValueOneofCase.NullValue) {
3327         size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
3328       }
3329       if (_unknownFields != null) {
3330         size += _unknownFields.CalculateSize();
3331       }
3332       return size;
3333     }
3334 
3335     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3336     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(NullValueOutsideStruct other)3337     public void MergeFrom(NullValueOutsideStruct other) {
3338       if (other == null) {
3339         return;
3340       }
3341       switch (other.ValueCase) {
3342         case ValueOneofCase.StringValue:
3343           StringValue = other.StringValue;
3344           break;
3345         case ValueOneofCase.NullValue:
3346           NullValue = other.NullValue;
3347           break;
3348       }
3349 
3350       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3351     }
3352 
3353     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3354     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)3355     public void MergeFrom(pb::CodedInputStream input) {
3356     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3357       input.ReadRawMessage(this);
3358     #else
3359       uint tag;
3360       while ((tag = input.ReadTag()) != 0) {
3361         switch(tag) {
3362           default:
3363             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3364             break;
3365           case 10: {
3366             StringValue = input.ReadString();
3367             break;
3368           }
3369           case 16: {
3370             value_ = input.ReadEnum();
3371             valueCase_ = ValueOneofCase.NullValue;
3372             break;
3373           }
3374         }
3375       }
3376     #endif
3377     }
3378 
3379     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3380     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3381     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)3382     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3383       uint tag;
3384       while ((tag = input.ReadTag()) != 0) {
3385         switch(tag) {
3386           default:
3387             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3388             break;
3389           case 10: {
3390             StringValue = input.ReadString();
3391             break;
3392           }
3393           case 16: {
3394             value_ = input.ReadEnum();
3395             valueCase_ = ValueOneofCase.NullValue;
3396             break;
3397           }
3398         }
3399       }
3400     }
3401     #endif
3402 
3403   }
3404 
3405   public sealed partial class NullValueNotInOneof : pb::IMessage<NullValueNotInOneof>
3406   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3407       , pb::IBufferMessage
3408   #endif
3409   {
3410     private static readonly pb::MessageParser<NullValueNotInOneof> _parser = new pb::MessageParser<NullValueNotInOneof>(() => new NullValueNotInOneof());
3411     private pb::UnknownFieldSet _unknownFields;
3412     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3413     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3414     public static pb::MessageParser<NullValueNotInOneof> Parser { get { return _parser; } }
3415 
3416     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3417     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3418     public static pbr::MessageDescriptor Descriptor {
3419       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[10]; }
3420     }
3421 
3422     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3423     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3424     pbr::MessageDescriptor pb::IMessage.Descriptor {
3425       get { return Descriptor; }
3426     }
3427 
3428     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3429     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
NullValueNotInOneof()3430     public NullValueNotInOneof() {
3431       OnConstruction();
3432     }
3433 
OnConstruction()3434     partial void OnConstruction();
3435 
3436     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3437     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
NullValueNotInOneof(NullValueNotInOneof other)3438     public NullValueNotInOneof(NullValueNotInOneof other) : this() {
3439       nullValue_ = other.nullValue_;
3440       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
3441     }
3442 
3443     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3444     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()3445     public NullValueNotInOneof Clone() {
3446       return new NullValueNotInOneof(this);
3447     }
3448 
3449     /// <summary>Field number for the "null_value" field.</summary>
3450     public const int NullValueFieldNumber = 2;
3451     private global::Google.Protobuf.WellKnownTypes.NullValue nullValue_ = global::Google.Protobuf.WellKnownTypes.NullValue.NullValue;
3452     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3453     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3454     public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
3455       get { return nullValue_; }
3456       set {
3457         nullValue_ = value;
3458       }
3459     }
3460 
3461     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3462     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)3463     public override bool Equals(object other) {
3464       return Equals(other as NullValueNotInOneof);
3465     }
3466 
3467     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3468     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(NullValueNotInOneof other)3469     public bool Equals(NullValueNotInOneof other) {
3470       if (ReferenceEquals(other, null)) {
3471         return false;
3472       }
3473       if (ReferenceEquals(other, this)) {
3474         return true;
3475       }
3476       if (NullValue != other.NullValue) return false;
3477       return Equals(_unknownFields, other._unknownFields);
3478     }
3479 
3480     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3481     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()3482     public override int GetHashCode() {
3483       int hash = 1;
3484       if (NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) hash ^= NullValue.GetHashCode();
3485       if (_unknownFields != null) {
3486         hash ^= _unknownFields.GetHashCode();
3487       }
3488       return hash;
3489     }
3490 
3491     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3492     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()3493     public override string ToString() {
3494       return pb::JsonFormatter.ToDiagnosticString(this);
3495     }
3496 
3497     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3498     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)3499     public void WriteTo(pb::CodedOutputStream output) {
3500     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3501       output.WriteRawMessage(this);
3502     #else
3503       if (NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) {
3504         output.WriteRawTag(16);
3505         output.WriteEnum((int) NullValue);
3506       }
3507       if (_unknownFields != null) {
3508         _unknownFields.WriteTo(output);
3509       }
3510     #endif
3511     }
3512 
3513     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3514     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3515     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)3516     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3517       if (NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) {
3518         output.WriteRawTag(16);
3519         output.WriteEnum((int) NullValue);
3520       }
3521       if (_unknownFields != null) {
3522         _unknownFields.WriteTo(ref output);
3523       }
3524     }
3525     #endif
3526 
3527     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3528     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()3529     public int CalculateSize() {
3530       int size = 0;
3531       if (NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) {
3532         size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
3533       }
3534       if (_unknownFields != null) {
3535         size += _unknownFields.CalculateSize();
3536       }
3537       return size;
3538     }
3539 
3540     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3541     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(NullValueNotInOneof other)3542     public void MergeFrom(NullValueNotInOneof other) {
3543       if (other == null) {
3544         return;
3545       }
3546       if (other.NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) {
3547         NullValue = other.NullValue;
3548       }
3549       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3550     }
3551 
3552     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3553     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)3554     public void MergeFrom(pb::CodedInputStream input) {
3555     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3556       input.ReadRawMessage(this);
3557     #else
3558       uint tag;
3559       while ((tag = input.ReadTag()) != 0) {
3560         switch(tag) {
3561           default:
3562             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3563             break;
3564           case 16: {
3565             NullValue = (global::Google.Protobuf.WellKnownTypes.NullValue) input.ReadEnum();
3566             break;
3567           }
3568         }
3569       }
3570     #endif
3571     }
3572 
3573     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3574     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3575     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)3576     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3577       uint tag;
3578       while ((tag = input.ReadTag()) != 0) {
3579         switch(tag) {
3580           default:
3581             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3582             break;
3583           case 16: {
3584             NullValue = (global::Google.Protobuf.WellKnownTypes.NullValue) input.ReadEnum();
3585             break;
3586           }
3587         }
3588       }
3589     }
3590     #endif
3591 
3592   }
3593 
3594   public sealed partial class MixedRegularAndOptional : pb::IMessage<MixedRegularAndOptional>
3595   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3596       , pb::IBufferMessage
3597   #endif
3598   {
3599     private static readonly pb::MessageParser<MixedRegularAndOptional> _parser = new pb::MessageParser<MixedRegularAndOptional>(() => new MixedRegularAndOptional());
3600     private pb::UnknownFieldSet _unknownFields;
3601     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3602     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3603     public static pb::MessageParser<MixedRegularAndOptional> Parser { get { return _parser; } }
3604 
3605     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3606     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3607     public static pbr::MessageDescriptor Descriptor {
3608       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[11]; }
3609     }
3610 
3611     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3612     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3613     pbr::MessageDescriptor pb::IMessage.Descriptor {
3614       get { return Descriptor; }
3615     }
3616 
3617     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3618     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MixedRegularAndOptional()3619     public MixedRegularAndOptional() {
3620       OnConstruction();
3621     }
3622 
OnConstruction()3623     partial void OnConstruction();
3624 
3625     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3626     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MixedRegularAndOptional(MixedRegularAndOptional other)3627     public MixedRegularAndOptional(MixedRegularAndOptional other) : this() {
3628       regularField_ = other.regularField_;
3629       optionalField_ = other.optionalField_;
3630       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
3631     }
3632 
3633     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3634     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()3635     public MixedRegularAndOptional Clone() {
3636       return new MixedRegularAndOptional(this);
3637     }
3638 
3639     /// <summary>Field number for the "regular_field" field.</summary>
3640     public const int RegularFieldFieldNumber = 1;
3641     private string regularField_ = "";
3642     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3643     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3644     public string RegularField {
3645       get { return regularField_; }
3646       set {
3647         regularField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
3648       }
3649     }
3650 
3651     /// <summary>Field number for the "optional_field" field.</summary>
3652     public const int OptionalFieldFieldNumber = 2;
3653     private string optionalField_;
3654     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3655     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3656     public string OptionalField {
3657       get { return optionalField_ ?? ""; }
3658       set {
3659         optionalField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
3660       }
3661     }
3662     /// <summary>Gets whether the "optional_field" field is set</summary>
3663     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3664     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3665     public bool HasOptionalField {
3666       get { return optionalField_ != null; }
3667     }
3668     /// <summary>Clears the value of the "optional_field" field</summary>
3669     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3670     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ClearOptionalField()3671     public void ClearOptionalField() {
3672       optionalField_ = null;
3673     }
3674 
3675     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3676     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)3677     public override bool Equals(object other) {
3678       return Equals(other as MixedRegularAndOptional);
3679     }
3680 
3681     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3682     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(MixedRegularAndOptional other)3683     public bool Equals(MixedRegularAndOptional other) {
3684       if (ReferenceEquals(other, null)) {
3685         return false;
3686       }
3687       if (ReferenceEquals(other, this)) {
3688         return true;
3689       }
3690       if (RegularField != other.RegularField) return false;
3691       if (OptionalField != other.OptionalField) return false;
3692       return Equals(_unknownFields, other._unknownFields);
3693     }
3694 
3695     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3696     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()3697     public override int GetHashCode() {
3698       int hash = 1;
3699       if (RegularField.Length != 0) hash ^= RegularField.GetHashCode();
3700       if (HasOptionalField) hash ^= OptionalField.GetHashCode();
3701       if (_unknownFields != null) {
3702         hash ^= _unknownFields.GetHashCode();
3703       }
3704       return hash;
3705     }
3706 
3707     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3708     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()3709     public override string ToString() {
3710       return pb::JsonFormatter.ToDiagnosticString(this);
3711     }
3712 
3713     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3714     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)3715     public void WriteTo(pb::CodedOutputStream output) {
3716     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3717       output.WriteRawMessage(this);
3718     #else
3719       if (RegularField.Length != 0) {
3720         output.WriteRawTag(10);
3721         output.WriteString(RegularField);
3722       }
3723       if (HasOptionalField) {
3724         output.WriteRawTag(18);
3725         output.WriteString(OptionalField);
3726       }
3727       if (_unknownFields != null) {
3728         _unknownFields.WriteTo(output);
3729       }
3730     #endif
3731     }
3732 
3733     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3734     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3735     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)3736     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3737       if (RegularField.Length != 0) {
3738         output.WriteRawTag(10);
3739         output.WriteString(RegularField);
3740       }
3741       if (HasOptionalField) {
3742         output.WriteRawTag(18);
3743         output.WriteString(OptionalField);
3744       }
3745       if (_unknownFields != null) {
3746         _unknownFields.WriteTo(ref output);
3747       }
3748     }
3749     #endif
3750 
3751     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3752     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()3753     public int CalculateSize() {
3754       int size = 0;
3755       if (RegularField.Length != 0) {
3756         size += 1 + pb::CodedOutputStream.ComputeStringSize(RegularField);
3757       }
3758       if (HasOptionalField) {
3759         size += 1 + pb::CodedOutputStream.ComputeStringSize(OptionalField);
3760       }
3761       if (_unknownFields != null) {
3762         size += _unknownFields.CalculateSize();
3763       }
3764       return size;
3765     }
3766 
3767     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3768     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(MixedRegularAndOptional other)3769     public void MergeFrom(MixedRegularAndOptional other) {
3770       if (other == null) {
3771         return;
3772       }
3773       if (other.RegularField.Length != 0) {
3774         RegularField = other.RegularField;
3775       }
3776       if (other.HasOptionalField) {
3777         OptionalField = other.OptionalField;
3778       }
3779       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3780     }
3781 
3782     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3783     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)3784     public void MergeFrom(pb::CodedInputStream input) {
3785     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3786       input.ReadRawMessage(this);
3787     #else
3788       uint tag;
3789       while ((tag = input.ReadTag()) != 0) {
3790         switch(tag) {
3791           default:
3792             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3793             break;
3794           case 10: {
3795             RegularField = input.ReadString();
3796             break;
3797           }
3798           case 18: {
3799             OptionalField = input.ReadString();
3800             break;
3801           }
3802         }
3803       }
3804     #endif
3805     }
3806 
3807     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3808     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3809     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)3810     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3811       uint tag;
3812       while ((tag = input.ReadTag()) != 0) {
3813         switch(tag) {
3814           default:
3815             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3816             break;
3817           case 10: {
3818             RegularField = input.ReadString();
3819             break;
3820           }
3821           case 18: {
3822             OptionalField = input.ReadString();
3823             break;
3824           }
3825         }
3826       }
3827     }
3828     #endif
3829 
3830   }
3831 
3832   public sealed partial class OneofWithNoneField : pb::IMessage<OneofWithNoneField>
3833   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3834       , pb::IBufferMessage
3835   #endif
3836   {
3837     private static readonly pb::MessageParser<OneofWithNoneField> _parser = new pb::MessageParser<OneofWithNoneField>(() => new OneofWithNoneField());
3838     private pb::UnknownFieldSet _unknownFields;
3839     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3840     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3841     public static pb::MessageParser<OneofWithNoneField> Parser { get { return _parser; } }
3842 
3843     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3844     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3845     public static pbr::MessageDescriptor Descriptor {
3846       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[12]; }
3847     }
3848 
3849     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3850     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3851     pbr::MessageDescriptor pb::IMessage.Descriptor {
3852       get { return Descriptor; }
3853     }
3854 
3855     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3856     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
OneofWithNoneField()3857     public OneofWithNoneField() {
3858       OnConstruction();
3859     }
3860 
OnConstruction()3861     partial void OnConstruction();
3862 
3863     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3864     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
OneofWithNoneField(OneofWithNoneField other)3865     public OneofWithNoneField(OneofWithNoneField other) : this() {
3866       switch (other.TestCase) {
3867         case TestOneofCase.X:
3868           X = other.X;
3869           break;
3870         case TestOneofCase.None_:
3871           None = other.None;
3872           break;
3873       }
3874 
3875       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
3876     }
3877 
3878     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3879     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()3880     public OneofWithNoneField Clone() {
3881       return new OneofWithNoneField(this);
3882     }
3883 
3884     /// <summary>Field number for the "x" field.</summary>
3885     public const int XFieldNumber = 1;
3886     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3887     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3888     public string X {
3889       get { return testCase_ == TestOneofCase.X ? (string) test_ : ""; }
3890       set {
3891         test_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
3892         testCase_ = TestOneofCase.X;
3893       }
3894     }
3895 
3896     /// <summary>Field number for the "none" field.</summary>
3897     public const int NoneFieldNumber = 2;
3898     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3899     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3900     public string None {
3901       get { return testCase_ == TestOneofCase.None_ ? (string) test_ : ""; }
3902       set {
3903         test_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
3904         testCase_ = TestOneofCase.None_;
3905       }
3906     }
3907 
3908     private object test_;
3909     /// <summary>Enum of possible cases for the "test" oneof.</summary>
3910     public enum TestOneofCase {
3911       None = 0,
3912       X = 1,
3913       None_ = 2,
3914     }
3915     private TestOneofCase testCase_ = TestOneofCase.None;
3916     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3917     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
3918     public TestOneofCase TestCase {
3919       get { return testCase_; }
3920     }
3921 
3922     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3923     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ClearTest()3924     public void ClearTest() {
3925       testCase_ = TestOneofCase.None;
3926       test_ = null;
3927     }
3928 
3929     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3930     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)3931     public override bool Equals(object other) {
3932       return Equals(other as OneofWithNoneField);
3933     }
3934 
3935     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3936     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(OneofWithNoneField other)3937     public bool Equals(OneofWithNoneField other) {
3938       if (ReferenceEquals(other, null)) {
3939         return false;
3940       }
3941       if (ReferenceEquals(other, this)) {
3942         return true;
3943       }
3944       if (X != other.X) return false;
3945       if (None != other.None) return false;
3946       if (TestCase != other.TestCase) return false;
3947       return Equals(_unknownFields, other._unknownFields);
3948     }
3949 
3950     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3951     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()3952     public override int GetHashCode() {
3953       int hash = 1;
3954       if (testCase_ == TestOneofCase.X) hash ^= X.GetHashCode();
3955       if (testCase_ == TestOneofCase.None_) hash ^= None.GetHashCode();
3956       hash ^= (int) testCase_;
3957       if (_unknownFields != null) {
3958         hash ^= _unknownFields.GetHashCode();
3959       }
3960       return hash;
3961     }
3962 
3963     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3964     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()3965     public override string ToString() {
3966       return pb::JsonFormatter.ToDiagnosticString(this);
3967     }
3968 
3969     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3970     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)3971     public void WriteTo(pb::CodedOutputStream output) {
3972     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3973       output.WriteRawMessage(this);
3974     #else
3975       if (testCase_ == TestOneofCase.X) {
3976         output.WriteRawTag(10);
3977         output.WriteString(X);
3978       }
3979       if (testCase_ == TestOneofCase.None_) {
3980         output.WriteRawTag(18);
3981         output.WriteString(None);
3982       }
3983       if (_unknownFields != null) {
3984         _unknownFields.WriteTo(output);
3985       }
3986     #endif
3987     }
3988 
3989     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3990     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3991     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)3992     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3993       if (testCase_ == TestOneofCase.X) {
3994         output.WriteRawTag(10);
3995         output.WriteString(X);
3996       }
3997       if (testCase_ == TestOneofCase.None_) {
3998         output.WriteRawTag(18);
3999         output.WriteString(None);
4000       }
4001       if (_unknownFields != null) {
4002         _unknownFields.WriteTo(ref output);
4003       }
4004     }
4005     #endif
4006 
4007     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4008     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()4009     public int CalculateSize() {
4010       int size = 0;
4011       if (testCase_ == TestOneofCase.X) {
4012         size += 1 + pb::CodedOutputStream.ComputeStringSize(X);
4013       }
4014       if (testCase_ == TestOneofCase.None_) {
4015         size += 1 + pb::CodedOutputStream.ComputeStringSize(None);
4016       }
4017       if (_unknownFields != null) {
4018         size += _unknownFields.CalculateSize();
4019       }
4020       return size;
4021     }
4022 
4023     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4024     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(OneofWithNoneField other)4025     public void MergeFrom(OneofWithNoneField other) {
4026       if (other == null) {
4027         return;
4028       }
4029       switch (other.TestCase) {
4030         case TestOneofCase.X:
4031           X = other.X;
4032           break;
4033         case TestOneofCase.None_:
4034           None = other.None;
4035           break;
4036       }
4037 
4038       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
4039     }
4040 
4041     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4042     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)4043     public void MergeFrom(pb::CodedInputStream input) {
4044     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4045       input.ReadRawMessage(this);
4046     #else
4047       uint tag;
4048       while ((tag = input.ReadTag()) != 0) {
4049         switch(tag) {
4050           default:
4051             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
4052             break;
4053           case 10: {
4054             X = input.ReadString();
4055             break;
4056           }
4057           case 18: {
4058             None = input.ReadString();
4059             break;
4060           }
4061         }
4062       }
4063     #endif
4064     }
4065 
4066     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4067     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4068     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)4069     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
4070       uint tag;
4071       while ((tag = input.ReadTag()) != 0) {
4072         switch(tag) {
4073           default:
4074             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
4075             break;
4076           case 10: {
4077             X = input.ReadString();
4078             break;
4079           }
4080           case 18: {
4081             None = input.ReadString();
4082             break;
4083           }
4084         }
4085       }
4086     }
4087     #endif
4088 
4089   }
4090 
4091   public sealed partial class OneofWithNoneName : pb::IMessage<OneofWithNoneName>
4092   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4093       , pb::IBufferMessage
4094   #endif
4095   {
4096     private static readonly pb::MessageParser<OneofWithNoneName> _parser = new pb::MessageParser<OneofWithNoneName>(() => new OneofWithNoneName());
4097     private pb::UnknownFieldSet _unknownFields;
4098     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4099     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
4100     public static pb::MessageParser<OneofWithNoneName> Parser { get { return _parser; } }
4101 
4102     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4103     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
4104     public static pbr::MessageDescriptor Descriptor {
4105       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[13]; }
4106     }
4107 
4108     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4109     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
4110     pbr::MessageDescriptor pb::IMessage.Descriptor {
4111       get { return Descriptor; }
4112     }
4113 
4114     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4115     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
OneofWithNoneName()4116     public OneofWithNoneName() {
4117       OnConstruction();
4118     }
4119 
OnConstruction()4120     partial void OnConstruction();
4121 
4122     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4123     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
OneofWithNoneName(OneofWithNoneName other)4124     public OneofWithNoneName(OneofWithNoneName other) : this() {
4125       switch (other.NoneCase) {
4126         case NoneOneofCase.X:
4127           X = other.X;
4128           break;
4129         case NoneOneofCase.Y:
4130           Y = other.Y;
4131           break;
4132       }
4133 
4134       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
4135     }
4136 
4137     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4138     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()4139     public OneofWithNoneName Clone() {
4140       return new OneofWithNoneName(this);
4141     }
4142 
4143     /// <summary>Field number for the "x" field.</summary>
4144     public const int XFieldNumber = 1;
4145     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4146     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
4147     public string X {
4148       get { return noneCase_ == NoneOneofCase.X ? (string) none_ : ""; }
4149       set {
4150         none_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
4151         noneCase_ = NoneOneofCase.X;
4152       }
4153     }
4154 
4155     /// <summary>Field number for the "y" field.</summary>
4156     public const int YFieldNumber = 2;
4157     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4158     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
4159     public string Y {
4160       get { return noneCase_ == NoneOneofCase.Y ? (string) none_ : ""; }
4161       set {
4162         none_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
4163         noneCase_ = NoneOneofCase.Y;
4164       }
4165     }
4166 
4167     private object none_;
4168     /// <summary>Enum of possible cases for the "none" oneof.</summary>
4169     public enum NoneOneofCase {
4170       None = 0,
4171       X = 1,
4172       Y = 2,
4173     }
4174     private NoneOneofCase noneCase_ = NoneOneofCase.None;
4175     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4176     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
4177     public NoneOneofCase NoneCase {
4178       get { return noneCase_; }
4179     }
4180 
4181     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4182     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ClearNone()4183     public void ClearNone() {
4184       noneCase_ = NoneOneofCase.None;
4185       none_ = null;
4186     }
4187 
4188     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4189     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)4190     public override bool Equals(object other) {
4191       return Equals(other as OneofWithNoneName);
4192     }
4193 
4194     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4195     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(OneofWithNoneName other)4196     public bool Equals(OneofWithNoneName other) {
4197       if (ReferenceEquals(other, null)) {
4198         return false;
4199       }
4200       if (ReferenceEquals(other, this)) {
4201         return true;
4202       }
4203       if (X != other.X) return false;
4204       if (Y != other.Y) return false;
4205       if (NoneCase != other.NoneCase) return false;
4206       return Equals(_unknownFields, other._unknownFields);
4207     }
4208 
4209     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4210     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()4211     public override int GetHashCode() {
4212       int hash = 1;
4213       if (noneCase_ == NoneOneofCase.X) hash ^= X.GetHashCode();
4214       if (noneCase_ == NoneOneofCase.Y) hash ^= Y.GetHashCode();
4215       hash ^= (int) noneCase_;
4216       if (_unknownFields != null) {
4217         hash ^= _unknownFields.GetHashCode();
4218       }
4219       return hash;
4220     }
4221 
4222     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4223     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()4224     public override string ToString() {
4225       return pb::JsonFormatter.ToDiagnosticString(this);
4226     }
4227 
4228     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4229     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)4230     public void WriteTo(pb::CodedOutputStream output) {
4231     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4232       output.WriteRawMessage(this);
4233     #else
4234       if (noneCase_ == NoneOneofCase.X) {
4235         output.WriteRawTag(10);
4236         output.WriteString(X);
4237       }
4238       if (noneCase_ == NoneOneofCase.Y) {
4239         output.WriteRawTag(18);
4240         output.WriteString(Y);
4241       }
4242       if (_unknownFields != null) {
4243         _unknownFields.WriteTo(output);
4244       }
4245     #endif
4246     }
4247 
4248     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4249     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4250     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)4251     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
4252       if (noneCase_ == NoneOneofCase.X) {
4253         output.WriteRawTag(10);
4254         output.WriteString(X);
4255       }
4256       if (noneCase_ == NoneOneofCase.Y) {
4257         output.WriteRawTag(18);
4258         output.WriteString(Y);
4259       }
4260       if (_unknownFields != null) {
4261         _unknownFields.WriteTo(ref output);
4262       }
4263     }
4264     #endif
4265 
4266     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4267     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()4268     public int CalculateSize() {
4269       int size = 0;
4270       if (noneCase_ == NoneOneofCase.X) {
4271         size += 1 + pb::CodedOutputStream.ComputeStringSize(X);
4272       }
4273       if (noneCase_ == NoneOneofCase.Y) {
4274         size += 1 + pb::CodedOutputStream.ComputeStringSize(Y);
4275       }
4276       if (_unknownFields != null) {
4277         size += _unknownFields.CalculateSize();
4278       }
4279       return size;
4280     }
4281 
4282     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4283     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(OneofWithNoneName other)4284     public void MergeFrom(OneofWithNoneName other) {
4285       if (other == null) {
4286         return;
4287       }
4288       switch (other.NoneCase) {
4289         case NoneOneofCase.X:
4290           X = other.X;
4291           break;
4292         case NoneOneofCase.Y:
4293           Y = other.Y;
4294           break;
4295       }
4296 
4297       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
4298     }
4299 
4300     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4301     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)4302     public void MergeFrom(pb::CodedInputStream input) {
4303     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4304       input.ReadRawMessage(this);
4305     #else
4306       uint tag;
4307       while ((tag = input.ReadTag()) != 0) {
4308         switch(tag) {
4309           default:
4310             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
4311             break;
4312           case 10: {
4313             X = input.ReadString();
4314             break;
4315           }
4316           case 18: {
4317             Y = input.ReadString();
4318             break;
4319           }
4320         }
4321       }
4322     #endif
4323     }
4324 
4325     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
4326     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
4327     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)4328     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
4329       uint tag;
4330       while ((tag = input.ReadTag()) != 0) {
4331         switch(tag) {
4332           default:
4333             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
4334             break;
4335           case 10: {
4336             X = input.ReadString();
4337             break;
4338           }
4339           case 18: {
4340             Y = input.ReadString();
4341             break;
4342           }
4343         }
4344       }
4345     }
4346     #endif
4347 
4348   }
4349 
4350   #endregion
4351 
4352 }
4353 
4354 #endregion Designer generated code
4355