• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
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             "QhEKD19vcHRpb25hbF9maWVsZCpVCgxOZWdhdGl2ZUVudW0SFgoSTkVHQVRJ",
58             "VkVfRU5VTV9aRVJPEAASFgoJRml2ZUJlbG93EPv//////////wESFQoITWlu",
59             "dXNPbmUQ////////////ASouCg5EZXByZWNhdGVkRW51bRITCg9ERVBSRUNB",
60             "VEVEX1pFUk8QABIHCgNvbmUQAUIdqgIaVW5pdFRlc3QuSXNzdWVzLlRlc3RQ",
61             "cm90b3NiBnByb3RvMw=="));
62       descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
63           new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, },
64           new pbr::GeneratedClrTypeInfo(new[] {typeof(global::UnitTest.Issues.TestProtos.NegativeEnum), typeof(global::UnitTest.Issues.TestProtos.DeprecatedEnum), }, null, new pbr::GeneratedClrTypeInfo[] {
65             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)})}),
66             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NegativeEnumMessage), global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Parser, new[]{ "Value", "Values", "PackedValues" }, null, null, null, null),
67             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.DeprecatedChild), global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser, null, null, null, null, null),
68             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),
69             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.ItemField), global::UnitTest.Issues.TestProtos.ItemField.Parser, new[]{ "Item" }, null, null, null, null),
70             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)}),
71             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),
72             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.TestJsonName), global::UnitTest.Issues.TestProtos.TestJsonName.Parser, new[]{ "Name", "Description", "Guid" }, null, null, null, null),
73             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)}),
74             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NullValueOutsideStruct), global::UnitTest.Issues.TestProtos.NullValueOutsideStruct.Parser, new[]{ "StringValue", "NullValue" }, new[]{ "Value" }, null, null, null),
75             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.NullValueNotInOneof), global::UnitTest.Issues.TestProtos.NullValueNotInOneof.Parser, new[]{ "NullValue" }, null, null, null, null),
76             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.MixedRegularAndOptional), global::UnitTest.Issues.TestProtos.MixedRegularAndOptional.Parser, new[]{ "RegularField", "OptionalField" }, new[]{ "OptionalField" }, null, null, null)
77           }));
78     }
79     #endregion
80 
81   }
82   #region Enums
83   public enum NegativeEnum {
84     [pbr::OriginalName("NEGATIVE_ENUM_ZERO")] Zero = 0,
85     [pbr::OriginalName("FiveBelow")] FiveBelow = -5,
86     [pbr::OriginalName("MinusOne")] MinusOne = -1,
87   }
88 
89   public enum DeprecatedEnum {
90     [pbr::OriginalName("DEPRECATED_ZERO")] DeprecatedZero = 0,
91     [pbr::OriginalName("one")] One = 1,
92   }
93 
94   #endregion
95 
96   #region Messages
97   /// <summary>
98   /// Issue 307: when generating doubly-nested types, any references
99   /// should be of the form A.Types.B.Types.C.
100   /// </summary>
101   public sealed partial class Issue307 : pb::IMessage<Issue307>
102   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
103       , pb::IBufferMessage
104   #endif
105   {
106     private static readonly pb::MessageParser<Issue307> _parser = new pb::MessageParser<Issue307>(() => new Issue307());
107     private pb::UnknownFieldSet _unknownFields;
108     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
109     public static pb::MessageParser<Issue307> Parser { get { return _parser; } }
110 
111     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
112     public static pbr::MessageDescriptor Descriptor {
113       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[0]; }
114     }
115 
116     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
117     pbr::MessageDescriptor pb::IMessage.Descriptor {
118       get { return Descriptor; }
119     }
120 
121     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Issue307()122     public Issue307() {
123       OnConstruction();
124     }
125 
OnConstruction()126     partial void OnConstruction();
127 
128     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Issue307(Issue307 other)129     public Issue307(Issue307 other) : this() {
130       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
131     }
132 
133     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()134     public Issue307 Clone() {
135       return new Issue307(this);
136     }
137 
138     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)139     public override bool Equals(object other) {
140       return Equals(other as Issue307);
141     }
142 
143     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(Issue307 other)144     public bool Equals(Issue307 other) {
145       if (ReferenceEquals(other, null)) {
146         return false;
147       }
148       if (ReferenceEquals(other, this)) {
149         return true;
150       }
151       return Equals(_unknownFields, other._unknownFields);
152     }
153 
154     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()155     public override int GetHashCode() {
156       int hash = 1;
157       if (_unknownFields != null) {
158         hash ^= _unknownFields.GetHashCode();
159       }
160       return hash;
161     }
162 
163     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()164     public override string ToString() {
165       return pb::JsonFormatter.ToDiagnosticString(this);
166     }
167 
168     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)169     public void WriteTo(pb::CodedOutputStream output) {
170     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
171       output.WriteRawMessage(this);
172     #else
173       if (_unknownFields != null) {
174         _unknownFields.WriteTo(output);
175       }
176     #endif
177     }
178 
179     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
180     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)181     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
182       if (_unknownFields != null) {
183         _unknownFields.WriteTo(ref output);
184       }
185     }
186     #endif
187 
188     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()189     public int CalculateSize() {
190       int size = 0;
191       if (_unknownFields != null) {
192         size += _unknownFields.CalculateSize();
193       }
194       return size;
195     }
196 
197     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(Issue307 other)198     public void MergeFrom(Issue307 other) {
199       if (other == null) {
200         return;
201       }
202       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
203     }
204 
205     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)206     public void MergeFrom(pb::CodedInputStream input) {
207     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
208       input.ReadRawMessage(this);
209     #else
210       uint tag;
211       while ((tag = input.ReadTag()) != 0) {
212         switch(tag) {
213           default:
214             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
215             break;
216         }
217       }
218     #endif
219     }
220 
221     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
222     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)223     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
224       uint tag;
225       while ((tag = input.ReadTag()) != 0) {
226         switch(tag) {
227           default:
228             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
229             break;
230         }
231       }
232     }
233     #endif
234 
235     #region Nested types
236     /// <summary>Container for nested types declared in the Issue307 message type.</summary>
237     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
238     public static partial class Types {
239       public sealed partial class NestedOnce : pb::IMessage<NestedOnce>
240       #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
241           , pb::IBufferMessage
242       #endif
243       {
244         private static readonly pb::MessageParser<NestedOnce> _parser = new pb::MessageParser<NestedOnce>(() => new NestedOnce());
245         private pb::UnknownFieldSet _unknownFields;
246         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
247         public static pb::MessageParser<NestedOnce> Parser { get { return _parser; } }
248 
249         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
250         public static pbr::MessageDescriptor Descriptor {
251           get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.NestedTypes[0]; }
252         }
253 
254         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
255         pbr::MessageDescriptor pb::IMessage.Descriptor {
256           get { return Descriptor; }
257         }
258 
259         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
NestedOnce()260         public NestedOnce() {
261           OnConstruction();
262         }
263 
OnConstruction()264         partial void OnConstruction();
265 
266         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
NestedOnce(NestedOnce other)267         public NestedOnce(NestedOnce other) : this() {
268           _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
269         }
270 
271         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()272         public NestedOnce Clone() {
273           return new NestedOnce(this);
274         }
275 
276         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)277         public override bool Equals(object other) {
278           return Equals(other as NestedOnce);
279         }
280 
281         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(NestedOnce other)282         public bool Equals(NestedOnce other) {
283           if (ReferenceEquals(other, null)) {
284             return false;
285           }
286           if (ReferenceEquals(other, this)) {
287             return true;
288           }
289           return Equals(_unknownFields, other._unknownFields);
290         }
291 
292         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()293         public override int GetHashCode() {
294           int hash = 1;
295           if (_unknownFields != null) {
296             hash ^= _unknownFields.GetHashCode();
297           }
298           return hash;
299         }
300 
301         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()302         public override string ToString() {
303           return pb::JsonFormatter.ToDiagnosticString(this);
304         }
305 
306         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)307         public void WriteTo(pb::CodedOutputStream output) {
308         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
309           output.WriteRawMessage(this);
310         #else
311           if (_unknownFields != null) {
312             _unknownFields.WriteTo(output);
313           }
314         #endif
315         }
316 
317         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
318         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)319         void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
320           if (_unknownFields != null) {
321             _unknownFields.WriteTo(ref output);
322           }
323         }
324         #endif
325 
326         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()327         public int CalculateSize() {
328           int size = 0;
329           if (_unknownFields != null) {
330             size += _unknownFields.CalculateSize();
331           }
332           return size;
333         }
334 
335         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(NestedOnce other)336         public void MergeFrom(NestedOnce other) {
337           if (other == null) {
338             return;
339           }
340           _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
341         }
342 
343         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)344         public void MergeFrom(pb::CodedInputStream input) {
345         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
346           input.ReadRawMessage(this);
347         #else
348           uint tag;
349           while ((tag = input.ReadTag()) != 0) {
350             switch(tag) {
351               default:
352                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
353                 break;
354             }
355           }
356         #endif
357         }
358 
359         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
360         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)361         void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
362           uint tag;
363           while ((tag = input.ReadTag()) != 0) {
364             switch(tag) {
365               default:
366                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
367                 break;
368             }
369           }
370         }
371         #endif
372 
373         #region Nested types
374         /// <summary>Container for nested types declared in the NestedOnce message type.</summary>
375         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
376         public static partial class Types {
377           public sealed partial class NestedTwice : pb::IMessage<NestedTwice>
378           #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
379               , pb::IBufferMessage
380           #endif
381           {
382             private static readonly pb::MessageParser<NestedTwice> _parser = new pb::MessageParser<NestedTwice>(() => new NestedTwice());
383             private pb::UnknownFieldSet _unknownFields;
384             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
385             public static pb::MessageParser<NestedTwice> Parser { get { return _parser; } }
386 
387             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
388             public static pbr::MessageDescriptor Descriptor {
389               get { return global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Descriptor.NestedTypes[0]; }
390             }
391 
392             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
393             pbr::MessageDescriptor pb::IMessage.Descriptor {
394               get { return Descriptor; }
395             }
396 
397             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
NestedTwice()398             public NestedTwice() {
399               OnConstruction();
400             }
401 
OnConstruction()402             partial void OnConstruction();
403 
404             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
NestedTwice(NestedTwice other)405             public NestedTwice(NestedTwice other) : this() {
406               _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
407             }
408 
409             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()410             public NestedTwice Clone() {
411               return new NestedTwice(this);
412             }
413 
414             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)415             public override bool Equals(object other) {
416               return Equals(other as NestedTwice);
417             }
418 
419             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(NestedTwice other)420             public bool Equals(NestedTwice other) {
421               if (ReferenceEquals(other, null)) {
422                 return false;
423               }
424               if (ReferenceEquals(other, this)) {
425                 return true;
426               }
427               return Equals(_unknownFields, other._unknownFields);
428             }
429 
430             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()431             public override int GetHashCode() {
432               int hash = 1;
433               if (_unknownFields != null) {
434                 hash ^= _unknownFields.GetHashCode();
435               }
436               return hash;
437             }
438 
439             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()440             public override string ToString() {
441               return pb::JsonFormatter.ToDiagnosticString(this);
442             }
443 
444             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)445             public void WriteTo(pb::CodedOutputStream output) {
446             #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
447               output.WriteRawMessage(this);
448             #else
449               if (_unknownFields != null) {
450                 _unknownFields.WriteTo(output);
451               }
452             #endif
453             }
454 
455             #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
456             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)457             void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
458               if (_unknownFields != null) {
459                 _unknownFields.WriteTo(ref output);
460               }
461             }
462             #endif
463 
464             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()465             public int CalculateSize() {
466               int size = 0;
467               if (_unknownFields != null) {
468                 size += _unknownFields.CalculateSize();
469               }
470               return size;
471             }
472 
473             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(NestedTwice other)474             public void MergeFrom(NestedTwice other) {
475               if (other == null) {
476                 return;
477               }
478               _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
479             }
480 
481             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)482             public void MergeFrom(pb::CodedInputStream input) {
483             #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
484               input.ReadRawMessage(this);
485             #else
486               uint tag;
487               while ((tag = input.ReadTag()) != 0) {
488                 switch(tag) {
489                   default:
490                     _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
491                     break;
492                 }
493               }
494             #endif
495             }
496 
497             #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
498             [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)499             void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
500               uint tag;
501               while ((tag = input.ReadTag()) != 0) {
502                 switch(tag) {
503                   default:
504                     _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
505                     break;
506                 }
507               }
508             }
509             #endif
510 
511           }
512 
513         }
514         #endregion
515 
516       }
517 
518     }
519     #endregion
520 
521   }
522 
523   public sealed partial class NegativeEnumMessage : pb::IMessage<NegativeEnumMessage>
524   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
525       , pb::IBufferMessage
526   #endif
527   {
528     private static readonly pb::MessageParser<NegativeEnumMessage> _parser = new pb::MessageParser<NegativeEnumMessage>(() => new NegativeEnumMessage());
529     private pb::UnknownFieldSet _unknownFields;
530     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
531     public static pb::MessageParser<NegativeEnumMessage> Parser { get { return _parser; } }
532 
533     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
534     public static pbr::MessageDescriptor Descriptor {
535       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[1]; }
536     }
537 
538     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
539     pbr::MessageDescriptor pb::IMessage.Descriptor {
540       get { return Descriptor; }
541     }
542 
543     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
NegativeEnumMessage()544     public NegativeEnumMessage() {
545       OnConstruction();
546     }
547 
OnConstruction()548     partial void OnConstruction();
549 
550     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
NegativeEnumMessage(NegativeEnumMessage other)551     public NegativeEnumMessage(NegativeEnumMessage other) : this() {
552       value_ = other.value_;
553       values_ = other.values_.Clone();
554       packedValues_ = other.packedValues_.Clone();
555       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
556     }
557 
558     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()559     public NegativeEnumMessage Clone() {
560       return new NegativeEnumMessage(this);
561     }
562 
563     /// <summary>Field number for the "value" field.</summary>
564     public const int ValueFieldNumber = 1;
565     private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = global::UnitTest.Issues.TestProtos.NegativeEnum.Zero;
566     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
567     public global::UnitTest.Issues.TestProtos.NegativeEnum Value {
568       get { return value_; }
569       set {
570         value_ = value;
571       }
572     }
573 
574     /// <summary>Field number for the "values" field.</summary>
575     public const int ValuesFieldNumber = 2;
576     private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_values_codec
577         = pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);
578     private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> values_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
579     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
580     public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> Values {
581       get { return values_; }
582     }
583 
584     /// <summary>Field number for the "packed_values" field.</summary>
585     public const int PackedValuesFieldNumber = 3;
586     private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_packedValues_codec
587         = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);
588     private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> packedValues_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
589     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
590     public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> PackedValues {
591       get { return packedValues_; }
592     }
593 
594     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)595     public override bool Equals(object other) {
596       return Equals(other as NegativeEnumMessage);
597     }
598 
599     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(NegativeEnumMessage other)600     public bool Equals(NegativeEnumMessage other) {
601       if (ReferenceEquals(other, null)) {
602         return false;
603       }
604       if (ReferenceEquals(other, this)) {
605         return true;
606       }
607       if (Value != other.Value) return false;
608       if(!values_.Equals(other.values_)) return false;
609       if(!packedValues_.Equals(other.packedValues_)) return false;
610       return Equals(_unknownFields, other._unknownFields);
611     }
612 
613     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()614     public override int GetHashCode() {
615       int hash = 1;
616       if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) hash ^= Value.GetHashCode();
617       hash ^= values_.GetHashCode();
618       hash ^= packedValues_.GetHashCode();
619       if (_unknownFields != null) {
620         hash ^= _unknownFields.GetHashCode();
621       }
622       return hash;
623     }
624 
625     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()626     public override string ToString() {
627       return pb::JsonFormatter.ToDiagnosticString(this);
628     }
629 
630     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)631     public void WriteTo(pb::CodedOutputStream output) {
632     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
633       output.WriteRawMessage(this);
634     #else
635       if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
636         output.WriteRawTag(8);
637         output.WriteEnum((int) Value);
638       }
639       values_.WriteTo(output, _repeated_values_codec);
640       packedValues_.WriteTo(output, _repeated_packedValues_codec);
641       if (_unknownFields != null) {
642         _unknownFields.WriteTo(output);
643       }
644     #endif
645     }
646 
647     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
648     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)649     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
650       if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
651         output.WriteRawTag(8);
652         output.WriteEnum((int) Value);
653       }
654       values_.WriteTo(ref output, _repeated_values_codec);
655       packedValues_.WriteTo(ref output, _repeated_packedValues_codec);
656       if (_unknownFields != null) {
657         _unknownFields.WriteTo(ref output);
658       }
659     }
660     #endif
661 
662     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()663     public int CalculateSize() {
664       int size = 0;
665       if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
666         size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value);
667       }
668       size += values_.CalculateSize(_repeated_values_codec);
669       size += packedValues_.CalculateSize(_repeated_packedValues_codec);
670       if (_unknownFields != null) {
671         size += _unknownFields.CalculateSize();
672       }
673       return size;
674     }
675 
676     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(NegativeEnumMessage other)677     public void MergeFrom(NegativeEnumMessage other) {
678       if (other == null) {
679         return;
680       }
681       if (other.Value != global::UnitTest.Issues.TestProtos.NegativeEnum.Zero) {
682         Value = other.Value;
683       }
684       values_.Add(other.values_);
685       packedValues_.Add(other.packedValues_);
686       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
687     }
688 
689     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)690     public void MergeFrom(pb::CodedInputStream input) {
691     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
692       input.ReadRawMessage(this);
693     #else
694       uint tag;
695       while ((tag = input.ReadTag()) != 0) {
696         switch(tag) {
697           default:
698             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
699             break;
700           case 8: {
701             Value = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum();
702             break;
703           }
704           case 18:
705           case 16: {
706             values_.AddEntriesFrom(input, _repeated_values_codec);
707             break;
708           }
709           case 26:
710           case 24: {
711             packedValues_.AddEntriesFrom(input, _repeated_packedValues_codec);
712             break;
713           }
714         }
715       }
716     #endif
717     }
718 
719     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
720     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)721     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
722       uint tag;
723       while ((tag = input.ReadTag()) != 0) {
724         switch(tag) {
725           default:
726             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
727             break;
728           case 8: {
729             Value = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum();
730             break;
731           }
732           case 18:
733           case 16: {
734             values_.AddEntriesFrom(ref input, _repeated_values_codec);
735             break;
736           }
737           case 26:
738           case 24: {
739             packedValues_.AddEntriesFrom(ref input, _repeated_packedValues_codec);
740             break;
741           }
742         }
743       }
744     }
745     #endif
746 
747   }
748 
749   public sealed partial class DeprecatedChild : pb::IMessage<DeprecatedChild>
750   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
751       , pb::IBufferMessage
752   #endif
753   {
754     private static readonly pb::MessageParser<DeprecatedChild> _parser = new pb::MessageParser<DeprecatedChild>(() => new DeprecatedChild());
755     private pb::UnknownFieldSet _unknownFields;
756     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
757     public static pb::MessageParser<DeprecatedChild> Parser { get { return _parser; } }
758 
759     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
760     public static pbr::MessageDescriptor Descriptor {
761       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[2]; }
762     }
763 
764     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
765     pbr::MessageDescriptor pb::IMessage.Descriptor {
766       get { return Descriptor; }
767     }
768 
769     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
DeprecatedChild()770     public DeprecatedChild() {
771       OnConstruction();
772     }
773 
OnConstruction()774     partial void OnConstruction();
775 
776     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
DeprecatedChild(DeprecatedChild other)777     public DeprecatedChild(DeprecatedChild other) : this() {
778       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
779     }
780 
781     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()782     public DeprecatedChild Clone() {
783       return new DeprecatedChild(this);
784     }
785 
786     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)787     public override bool Equals(object other) {
788       return Equals(other as DeprecatedChild);
789     }
790 
791     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(DeprecatedChild other)792     public bool Equals(DeprecatedChild other) {
793       if (ReferenceEquals(other, null)) {
794         return false;
795       }
796       if (ReferenceEquals(other, this)) {
797         return true;
798       }
799       return Equals(_unknownFields, other._unknownFields);
800     }
801 
802     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()803     public override int GetHashCode() {
804       int hash = 1;
805       if (_unknownFields != null) {
806         hash ^= _unknownFields.GetHashCode();
807       }
808       return hash;
809     }
810 
811     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()812     public override string ToString() {
813       return pb::JsonFormatter.ToDiagnosticString(this);
814     }
815 
816     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)817     public void WriteTo(pb::CodedOutputStream output) {
818     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
819       output.WriteRawMessage(this);
820     #else
821       if (_unknownFields != null) {
822         _unknownFields.WriteTo(output);
823       }
824     #endif
825     }
826 
827     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
828     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)829     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
830       if (_unknownFields != null) {
831         _unknownFields.WriteTo(ref output);
832       }
833     }
834     #endif
835 
836     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()837     public int CalculateSize() {
838       int size = 0;
839       if (_unknownFields != null) {
840         size += _unknownFields.CalculateSize();
841       }
842       return size;
843     }
844 
845     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(DeprecatedChild other)846     public void MergeFrom(DeprecatedChild other) {
847       if (other == null) {
848         return;
849       }
850       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
851     }
852 
853     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)854     public void MergeFrom(pb::CodedInputStream input) {
855     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
856       input.ReadRawMessage(this);
857     #else
858       uint tag;
859       while ((tag = input.ReadTag()) != 0) {
860         switch(tag) {
861           default:
862             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
863             break;
864         }
865       }
866     #endif
867     }
868 
869     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
870     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)871     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
872       uint tag;
873       while ((tag = input.ReadTag()) != 0) {
874         switch(tag) {
875           default:
876             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
877             break;
878         }
879       }
880     }
881     #endif
882 
883   }
884 
885   public sealed partial class DeprecatedFieldsMessage : pb::IMessage<DeprecatedFieldsMessage>
886   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
887       , pb::IBufferMessage
888   #endif
889   {
890     private static readonly pb::MessageParser<DeprecatedFieldsMessage> _parser = new pb::MessageParser<DeprecatedFieldsMessage>(() => new DeprecatedFieldsMessage());
891     private pb::UnknownFieldSet _unknownFields;
892     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
893     public static pb::MessageParser<DeprecatedFieldsMessage> Parser { get { return _parser; } }
894 
895     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
896     public static pbr::MessageDescriptor Descriptor {
897       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[3]; }
898     }
899 
900     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
901     pbr::MessageDescriptor pb::IMessage.Descriptor {
902       get { return Descriptor; }
903     }
904 
905     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
DeprecatedFieldsMessage()906     public DeprecatedFieldsMessage() {
907       OnConstruction();
908     }
909 
OnConstruction()910     partial void OnConstruction();
911 
912     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
DeprecatedFieldsMessage(DeprecatedFieldsMessage other)913     public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) : this() {
914       primitiveValue_ = other.primitiveValue_;
915       primitiveArray_ = other.primitiveArray_.Clone();
916       messageValue_ = other.messageValue_ != null ? other.messageValue_.Clone() : null;
917       messageArray_ = other.messageArray_.Clone();
918       enumValue_ = other.enumValue_;
919       enumArray_ = other.enumArray_.Clone();
920       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
921     }
922 
923     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()924     public DeprecatedFieldsMessage Clone() {
925       return new DeprecatedFieldsMessage(this);
926     }
927 
928     /// <summary>Field number for the "PrimitiveValue" field.</summary>
929     public const int PrimitiveValueFieldNumber = 1;
930     private int primitiveValue_;
931     [global::System.ObsoleteAttribute]
932     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
933     public int PrimitiveValue {
934       get { return primitiveValue_; }
935       set {
936         primitiveValue_ = value;
937       }
938     }
939 
940     /// <summary>Field number for the "PrimitiveArray" field.</summary>
941     public const int PrimitiveArrayFieldNumber = 2;
942     private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec
943         = pb::FieldCodec.ForInt32(18);
944     private readonly pbc::RepeatedField<int> primitiveArray_ = new pbc::RepeatedField<int>();
945     [global::System.ObsoleteAttribute]
946     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
947     public pbc::RepeatedField<int> PrimitiveArray {
948       get { return primitiveArray_; }
949     }
950 
951     /// <summary>Field number for the "MessageValue" field.</summary>
952     public const int MessageValueFieldNumber = 3;
953     private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_;
954     [global::System.ObsoleteAttribute]
955     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
956     public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue {
957       get { return messageValue_; }
958       set {
959         messageValue_ = value;
960       }
961     }
962 
963     /// <summary>Field number for the "MessageArray" field.</summary>
964     public const int MessageArrayFieldNumber = 4;
965     private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedChild> _repeated_messageArray_codec
966         = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser);
967     private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> messageArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild>();
968     [global::System.ObsoleteAttribute]
969     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
970     public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArray {
971       get { return messageArray_; }
972     }
973 
974     /// <summary>Field number for the "EnumValue" field.</summary>
975     public const int EnumValueFieldNumber = 5;
976     private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero;
977     [global::System.ObsoleteAttribute]
978     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
979     public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue {
980       get { return enumValue_; }
981       set {
982         enumValue_ = value;
983       }
984     }
985 
986     /// <summary>Field number for the "EnumArray" field.</summary>
987     public const int EnumArrayFieldNumber = 6;
988     private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedEnum> _repeated_enumArray_codec
989         = pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues.TestProtos.DeprecatedEnum) x);
990     private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> enumArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum>();
991     [global::System.ObsoleteAttribute]
992     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
993     public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArray {
994       get { return enumArray_; }
995     }
996 
997     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)998     public override bool Equals(object other) {
999       return Equals(other as DeprecatedFieldsMessage);
1000     }
1001 
1002     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(DeprecatedFieldsMessage other)1003     public bool Equals(DeprecatedFieldsMessage other) {
1004       if (ReferenceEquals(other, null)) {
1005         return false;
1006       }
1007       if (ReferenceEquals(other, this)) {
1008         return true;
1009       }
1010       if (PrimitiveValue != other.PrimitiveValue) return false;
1011       if(!primitiveArray_.Equals(other.primitiveArray_)) return false;
1012       if (!object.Equals(MessageValue, other.MessageValue)) return false;
1013       if(!messageArray_.Equals(other.messageArray_)) return false;
1014       if (EnumValue != other.EnumValue) return false;
1015       if(!enumArray_.Equals(other.enumArray_)) return false;
1016       return Equals(_unknownFields, other._unknownFields);
1017     }
1018 
1019     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()1020     public override int GetHashCode() {
1021       int hash = 1;
1022       if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode();
1023       hash ^= primitiveArray_.GetHashCode();
1024       if (messageValue_ != null) hash ^= MessageValue.GetHashCode();
1025       hash ^= messageArray_.GetHashCode();
1026       if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) hash ^= EnumValue.GetHashCode();
1027       hash ^= enumArray_.GetHashCode();
1028       if (_unknownFields != null) {
1029         hash ^= _unknownFields.GetHashCode();
1030       }
1031       return hash;
1032     }
1033 
1034     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()1035     public override string ToString() {
1036       return pb::JsonFormatter.ToDiagnosticString(this);
1037     }
1038 
1039     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)1040     public void WriteTo(pb::CodedOutputStream output) {
1041     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1042       output.WriteRawMessage(this);
1043     #else
1044       if (PrimitiveValue != 0) {
1045         output.WriteRawTag(8);
1046         output.WriteInt32(PrimitiveValue);
1047       }
1048       primitiveArray_.WriteTo(output, _repeated_primitiveArray_codec);
1049       if (messageValue_ != null) {
1050         output.WriteRawTag(26);
1051         output.WriteMessage(MessageValue);
1052       }
1053       messageArray_.WriteTo(output, _repeated_messageArray_codec);
1054       if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
1055         output.WriteRawTag(40);
1056         output.WriteEnum((int) EnumValue);
1057       }
1058       enumArray_.WriteTo(output, _repeated_enumArray_codec);
1059       if (_unknownFields != null) {
1060         _unknownFields.WriteTo(output);
1061       }
1062     #endif
1063     }
1064 
1065     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1066     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1067     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
1068       if (PrimitiveValue != 0) {
1069         output.WriteRawTag(8);
1070         output.WriteInt32(PrimitiveValue);
1071       }
1072       primitiveArray_.WriteTo(ref output, _repeated_primitiveArray_codec);
1073       if (messageValue_ != null) {
1074         output.WriteRawTag(26);
1075         output.WriteMessage(MessageValue);
1076       }
1077       messageArray_.WriteTo(ref output, _repeated_messageArray_codec);
1078       if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
1079         output.WriteRawTag(40);
1080         output.WriteEnum((int) EnumValue);
1081       }
1082       enumArray_.WriteTo(ref output, _repeated_enumArray_codec);
1083       if (_unknownFields != null) {
1084         _unknownFields.WriteTo(ref output);
1085       }
1086     }
1087     #endif
1088 
1089     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()1090     public int CalculateSize() {
1091       int size = 0;
1092       if (PrimitiveValue != 0) {
1093         size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveValue);
1094       }
1095       size += primitiveArray_.CalculateSize(_repeated_primitiveArray_codec);
1096       if (messageValue_ != null) {
1097         size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageValue);
1098       }
1099       size += messageArray_.CalculateSize(_repeated_messageArray_codec);
1100       if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
1101         size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumValue);
1102       }
1103       size += enumArray_.CalculateSize(_repeated_enumArray_codec);
1104       if (_unknownFields != null) {
1105         size += _unknownFields.CalculateSize();
1106       }
1107       return size;
1108     }
1109 
1110     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(DeprecatedFieldsMessage other)1111     public void MergeFrom(DeprecatedFieldsMessage other) {
1112       if (other == null) {
1113         return;
1114       }
1115       if (other.PrimitiveValue != 0) {
1116         PrimitiveValue = other.PrimitiveValue;
1117       }
1118       primitiveArray_.Add(other.primitiveArray_);
1119       if (other.messageValue_ != null) {
1120         if (messageValue_ == null) {
1121           MessageValue = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
1122         }
1123         MessageValue.MergeFrom(other.MessageValue);
1124       }
1125       messageArray_.Add(other.messageArray_);
1126       if (other.EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DeprecatedZero) {
1127         EnumValue = other.EnumValue;
1128       }
1129       enumArray_.Add(other.enumArray_);
1130       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1131     }
1132 
1133     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)1134     public void MergeFrom(pb::CodedInputStream input) {
1135     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1136       input.ReadRawMessage(this);
1137     #else
1138       uint tag;
1139       while ((tag = input.ReadTag()) != 0) {
1140         switch(tag) {
1141           default:
1142             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1143             break;
1144           case 8: {
1145             PrimitiveValue = input.ReadInt32();
1146             break;
1147           }
1148           case 18:
1149           case 16: {
1150             primitiveArray_.AddEntriesFrom(input, _repeated_primitiveArray_codec);
1151             break;
1152           }
1153           case 26: {
1154             if (messageValue_ == null) {
1155               MessageValue = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
1156             }
1157             input.ReadMessage(MessageValue);
1158             break;
1159           }
1160           case 34: {
1161             messageArray_.AddEntriesFrom(input, _repeated_messageArray_codec);
1162             break;
1163           }
1164           case 40: {
1165             EnumValue = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) input.ReadEnum();
1166             break;
1167           }
1168           case 50:
1169           case 48: {
1170             enumArray_.AddEntriesFrom(input, _repeated_enumArray_codec);
1171             break;
1172           }
1173         }
1174       }
1175     #endif
1176     }
1177 
1178     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1179     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1180     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
1181       uint tag;
1182       while ((tag = input.ReadTag()) != 0) {
1183         switch(tag) {
1184           default:
1185             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1186             break;
1187           case 8: {
1188             PrimitiveValue = input.ReadInt32();
1189             break;
1190           }
1191           case 18:
1192           case 16: {
1193             primitiveArray_.AddEntriesFrom(ref input, _repeated_primitiveArray_codec);
1194             break;
1195           }
1196           case 26: {
1197             if (messageValue_ == null) {
1198               MessageValue = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
1199             }
1200             input.ReadMessage(MessageValue);
1201             break;
1202           }
1203           case 34: {
1204             messageArray_.AddEntriesFrom(ref input, _repeated_messageArray_codec);
1205             break;
1206           }
1207           case 40: {
1208             EnumValue = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) input.ReadEnum();
1209             break;
1210           }
1211           case 50:
1212           case 48: {
1213             enumArray_.AddEntriesFrom(ref input, _repeated_enumArray_codec);
1214             break;
1215           }
1216         }
1217       }
1218     }
1219     #endif
1220 
1221   }
1222 
1223   /// <summary>
1224   /// Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=45
1225   /// </summary>
1226   public sealed partial class ItemField : pb::IMessage<ItemField>
1227   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1228       , pb::IBufferMessage
1229   #endif
1230   {
1231     private static readonly pb::MessageParser<ItemField> _parser = new pb::MessageParser<ItemField>(() => new ItemField());
1232     private pb::UnknownFieldSet _unknownFields;
1233     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1234     public static pb::MessageParser<ItemField> Parser { get { return _parser; } }
1235 
1236     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1237     public static pbr::MessageDescriptor Descriptor {
1238       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[4]; }
1239     }
1240 
1241     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1242     pbr::MessageDescriptor pb::IMessage.Descriptor {
1243       get { return Descriptor; }
1244     }
1245 
1246     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ItemField()1247     public ItemField() {
1248       OnConstruction();
1249     }
1250 
OnConstruction()1251     partial void OnConstruction();
1252 
1253     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ItemField(ItemField other)1254     public ItemField(ItemField other) : this() {
1255       item_ = other.item_;
1256       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
1257     }
1258 
1259     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()1260     public ItemField Clone() {
1261       return new ItemField(this);
1262     }
1263 
1264     /// <summary>Field number for the "item" field.</summary>
1265     public const int ItemFieldNumber = 1;
1266     private int item_;
1267     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1268     public int Item {
1269       get { return item_; }
1270       set {
1271         item_ = value;
1272       }
1273     }
1274 
1275     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)1276     public override bool Equals(object other) {
1277       return Equals(other as ItemField);
1278     }
1279 
1280     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(ItemField other)1281     public bool Equals(ItemField other) {
1282       if (ReferenceEquals(other, null)) {
1283         return false;
1284       }
1285       if (ReferenceEquals(other, this)) {
1286         return true;
1287       }
1288       if (Item != other.Item) return false;
1289       return Equals(_unknownFields, other._unknownFields);
1290     }
1291 
1292     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()1293     public override int GetHashCode() {
1294       int hash = 1;
1295       if (Item != 0) hash ^= Item.GetHashCode();
1296       if (_unknownFields != null) {
1297         hash ^= _unknownFields.GetHashCode();
1298       }
1299       return hash;
1300     }
1301 
1302     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()1303     public override string ToString() {
1304       return pb::JsonFormatter.ToDiagnosticString(this);
1305     }
1306 
1307     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)1308     public void WriteTo(pb::CodedOutputStream output) {
1309     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1310       output.WriteRawMessage(this);
1311     #else
1312       if (Item != 0) {
1313         output.WriteRawTag(8);
1314         output.WriteInt32(Item);
1315       }
1316       if (_unknownFields != null) {
1317         _unknownFields.WriteTo(output);
1318       }
1319     #endif
1320     }
1321 
1322     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1323     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1324     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
1325       if (Item != 0) {
1326         output.WriteRawTag(8);
1327         output.WriteInt32(Item);
1328       }
1329       if (_unknownFields != null) {
1330         _unknownFields.WriteTo(ref output);
1331       }
1332     }
1333     #endif
1334 
1335     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()1336     public int CalculateSize() {
1337       int size = 0;
1338       if (Item != 0) {
1339         size += 1 + pb::CodedOutputStream.ComputeInt32Size(Item);
1340       }
1341       if (_unknownFields != null) {
1342         size += _unknownFields.CalculateSize();
1343       }
1344       return size;
1345     }
1346 
1347     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(ItemField other)1348     public void MergeFrom(ItemField other) {
1349       if (other == null) {
1350         return;
1351       }
1352       if (other.Item != 0) {
1353         Item = other.Item;
1354       }
1355       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1356     }
1357 
1358     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)1359     public void MergeFrom(pb::CodedInputStream input) {
1360     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1361       input.ReadRawMessage(this);
1362     #else
1363       uint tag;
1364       while ((tag = input.ReadTag()) != 0) {
1365         switch(tag) {
1366           default:
1367             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1368             break;
1369           case 8: {
1370             Item = input.ReadInt32();
1371             break;
1372           }
1373         }
1374       }
1375     #endif
1376     }
1377 
1378     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1379     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1380     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
1381       uint tag;
1382       while ((tag = input.ReadTag()) != 0) {
1383         switch(tag) {
1384           default:
1385             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1386             break;
1387           case 8: {
1388             Item = input.ReadInt32();
1389             break;
1390           }
1391         }
1392       }
1393     }
1394     #endif
1395 
1396   }
1397 
1398   public sealed partial class ReservedNames : pb::IMessage<ReservedNames>
1399   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1400       , pb::IBufferMessage
1401   #endif
1402   {
1403     private static readonly pb::MessageParser<ReservedNames> _parser = new pb::MessageParser<ReservedNames>(() => new ReservedNames());
1404     private pb::UnknownFieldSet _unknownFields;
1405     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1406     public static pb::MessageParser<ReservedNames> Parser { get { return _parser; } }
1407 
1408     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1409     public static pbr::MessageDescriptor Descriptor {
1410       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[5]; }
1411     }
1412 
1413     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1414     pbr::MessageDescriptor pb::IMessage.Descriptor {
1415       get { return Descriptor; }
1416     }
1417 
1418     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ReservedNames()1419     public ReservedNames() {
1420       OnConstruction();
1421     }
1422 
OnConstruction()1423     partial void OnConstruction();
1424 
1425     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ReservedNames(ReservedNames other)1426     public ReservedNames(ReservedNames other) : this() {
1427       types_ = other.types_;
1428       descriptor_ = other.descriptor_;
1429       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
1430     }
1431 
1432     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()1433     public ReservedNames Clone() {
1434       return new ReservedNames(this);
1435     }
1436 
1437     /// <summary>Field number for the "types" field.</summary>
1438     public const int Types_FieldNumber = 1;
1439     private int types_;
1440     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1441     public int Types_ {
1442       get { return types_; }
1443       set {
1444         types_ = value;
1445       }
1446     }
1447 
1448     /// <summary>Field number for the "descriptor" field.</summary>
1449     public const int Descriptor_FieldNumber = 2;
1450     private int descriptor_;
1451     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1452     public int Descriptor_ {
1453       get { return descriptor_; }
1454       set {
1455         descriptor_ = value;
1456       }
1457     }
1458 
1459     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)1460     public override bool Equals(object other) {
1461       return Equals(other as ReservedNames);
1462     }
1463 
1464     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(ReservedNames other)1465     public bool Equals(ReservedNames other) {
1466       if (ReferenceEquals(other, null)) {
1467         return false;
1468       }
1469       if (ReferenceEquals(other, this)) {
1470         return true;
1471       }
1472       if (Types_ != other.Types_) return false;
1473       if (Descriptor_ != other.Descriptor_) return false;
1474       return Equals(_unknownFields, other._unknownFields);
1475     }
1476 
1477     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()1478     public override int GetHashCode() {
1479       int hash = 1;
1480       if (Types_ != 0) hash ^= Types_.GetHashCode();
1481       if (Descriptor_ != 0) hash ^= Descriptor_.GetHashCode();
1482       if (_unknownFields != null) {
1483         hash ^= _unknownFields.GetHashCode();
1484       }
1485       return hash;
1486     }
1487 
1488     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()1489     public override string ToString() {
1490       return pb::JsonFormatter.ToDiagnosticString(this);
1491     }
1492 
1493     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)1494     public void WriteTo(pb::CodedOutputStream output) {
1495     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1496       output.WriteRawMessage(this);
1497     #else
1498       if (Types_ != 0) {
1499         output.WriteRawTag(8);
1500         output.WriteInt32(Types_);
1501       }
1502       if (Descriptor_ != 0) {
1503         output.WriteRawTag(16);
1504         output.WriteInt32(Descriptor_);
1505       }
1506       if (_unknownFields != null) {
1507         _unknownFields.WriteTo(output);
1508       }
1509     #endif
1510     }
1511 
1512     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1513     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1514     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
1515       if (Types_ != 0) {
1516         output.WriteRawTag(8);
1517         output.WriteInt32(Types_);
1518       }
1519       if (Descriptor_ != 0) {
1520         output.WriteRawTag(16);
1521         output.WriteInt32(Descriptor_);
1522       }
1523       if (_unknownFields != null) {
1524         _unknownFields.WriteTo(ref output);
1525       }
1526     }
1527     #endif
1528 
1529     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()1530     public int CalculateSize() {
1531       int size = 0;
1532       if (Types_ != 0) {
1533         size += 1 + pb::CodedOutputStream.ComputeInt32Size(Types_);
1534       }
1535       if (Descriptor_ != 0) {
1536         size += 1 + pb::CodedOutputStream.ComputeInt32Size(Descriptor_);
1537       }
1538       if (_unknownFields != null) {
1539         size += _unknownFields.CalculateSize();
1540       }
1541       return size;
1542     }
1543 
1544     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(ReservedNames other)1545     public void MergeFrom(ReservedNames other) {
1546       if (other == null) {
1547         return;
1548       }
1549       if (other.Types_ != 0) {
1550         Types_ = other.Types_;
1551       }
1552       if (other.Descriptor_ != 0) {
1553         Descriptor_ = other.Descriptor_;
1554       }
1555       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1556     }
1557 
1558     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)1559     public void MergeFrom(pb::CodedInputStream input) {
1560     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1561       input.ReadRawMessage(this);
1562     #else
1563       uint tag;
1564       while ((tag = input.ReadTag()) != 0) {
1565         switch(tag) {
1566           default:
1567             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1568             break;
1569           case 8: {
1570             Types_ = input.ReadInt32();
1571             break;
1572           }
1573           case 16: {
1574             Descriptor_ = input.ReadInt32();
1575             break;
1576           }
1577         }
1578       }
1579     #endif
1580     }
1581 
1582     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1583     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1584     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
1585       uint tag;
1586       while ((tag = input.ReadTag()) != 0) {
1587         switch(tag) {
1588           default:
1589             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1590             break;
1591           case 8: {
1592             Types_ = input.ReadInt32();
1593             break;
1594           }
1595           case 16: {
1596             Descriptor_ = input.ReadInt32();
1597             break;
1598           }
1599         }
1600       }
1601     }
1602     #endif
1603 
1604     #region Nested types
1605     /// <summary>Container for nested types declared in the ReservedNames message type.</summary>
1606     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1607     public static partial class Types {
1608       /// <summary>
1609       /// Force a nested type called Types
1610       /// </summary>
1611       public sealed partial class SomeNestedType : pb::IMessage<SomeNestedType>
1612       #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1613           , pb::IBufferMessage
1614       #endif
1615       {
1616         private static readonly pb::MessageParser<SomeNestedType> _parser = new pb::MessageParser<SomeNestedType>(() => new SomeNestedType());
1617         private pb::UnknownFieldSet _unknownFields;
1618         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1619         public static pb::MessageParser<SomeNestedType> Parser { get { return _parser; } }
1620 
1621         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1622         public static pbr::MessageDescriptor Descriptor {
1623           get { return global::UnitTest.Issues.TestProtos.ReservedNames.Descriptor.NestedTypes[0]; }
1624         }
1625 
1626         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1627         pbr::MessageDescriptor pb::IMessage.Descriptor {
1628           get { return Descriptor; }
1629         }
1630 
1631         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
SomeNestedType()1632         public SomeNestedType() {
1633           OnConstruction();
1634         }
1635 
OnConstruction()1636         partial void OnConstruction();
1637 
1638         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
SomeNestedType(SomeNestedType other)1639         public SomeNestedType(SomeNestedType other) : this() {
1640           _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
1641         }
1642 
1643         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()1644         public SomeNestedType Clone() {
1645           return new SomeNestedType(this);
1646         }
1647 
1648         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)1649         public override bool Equals(object other) {
1650           return Equals(other as SomeNestedType);
1651         }
1652 
1653         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(SomeNestedType other)1654         public bool Equals(SomeNestedType other) {
1655           if (ReferenceEquals(other, null)) {
1656             return false;
1657           }
1658           if (ReferenceEquals(other, this)) {
1659             return true;
1660           }
1661           return Equals(_unknownFields, other._unknownFields);
1662         }
1663 
1664         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()1665         public override int GetHashCode() {
1666           int hash = 1;
1667           if (_unknownFields != null) {
1668             hash ^= _unknownFields.GetHashCode();
1669           }
1670           return hash;
1671         }
1672 
1673         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()1674         public override string ToString() {
1675           return pb::JsonFormatter.ToDiagnosticString(this);
1676         }
1677 
1678         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)1679         public void WriteTo(pb::CodedOutputStream output) {
1680         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1681           output.WriteRawMessage(this);
1682         #else
1683           if (_unknownFields != null) {
1684             _unknownFields.WriteTo(output);
1685           }
1686         #endif
1687         }
1688 
1689         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1690         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1691         void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
1692           if (_unknownFields != null) {
1693             _unknownFields.WriteTo(ref output);
1694           }
1695         }
1696         #endif
1697 
1698         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()1699         public int CalculateSize() {
1700           int size = 0;
1701           if (_unknownFields != null) {
1702             size += _unknownFields.CalculateSize();
1703           }
1704           return size;
1705         }
1706 
1707         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(SomeNestedType other)1708         public void MergeFrom(SomeNestedType other) {
1709           if (other == null) {
1710             return;
1711           }
1712           _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1713         }
1714 
1715         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)1716         public void MergeFrom(pb::CodedInputStream input) {
1717         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1718           input.ReadRawMessage(this);
1719         #else
1720           uint tag;
1721           while ((tag = input.ReadTag()) != 0) {
1722             switch(tag) {
1723               default:
1724                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1725                 break;
1726             }
1727           }
1728         #endif
1729         }
1730 
1731         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1732         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1733         void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
1734           uint tag;
1735           while ((tag = input.ReadTag()) != 0) {
1736             switch(tag) {
1737               default:
1738                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1739                 break;
1740             }
1741           }
1742         }
1743         #endif
1744 
1745       }
1746 
1747     }
1748     #endregion
1749 
1750   }
1751 
1752   /// <summary>
1753   /// These fields are deliberately not declared in numeric
1754   /// order, and the oneof fields aren't contiguous either.
1755   /// This allows for reasonably robust tests of JSON output
1756   /// ordering.
1757   /// TestFieldOrderings in unittest_proto3.proto is similar,
1758   /// but doesn't include oneofs.
1759   /// TODO: Consider adding oneofs to TestFieldOrderings, although
1760   /// that will require fixing other tests in multiple platforms.
1761   /// Alternatively, consider just adding this to
1762   /// unittest_proto3.proto if multiple platforms want it.
1763   /// </summary>
1764   public sealed partial class TestJsonFieldOrdering : pb::IMessage<TestJsonFieldOrdering>
1765   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1766       , pb::IBufferMessage
1767   #endif
1768   {
1769     private static readonly pb::MessageParser<TestJsonFieldOrdering> _parser = new pb::MessageParser<TestJsonFieldOrdering>(() => new TestJsonFieldOrdering());
1770     private pb::UnknownFieldSet _unknownFields;
1771     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1772     public static pb::MessageParser<TestJsonFieldOrdering> Parser { get { return _parser; } }
1773 
1774     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1775     public static pbr::MessageDescriptor Descriptor {
1776       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[6]; }
1777     }
1778 
1779     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1780     pbr::MessageDescriptor pb::IMessage.Descriptor {
1781       get { return Descriptor; }
1782     }
1783 
1784     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
TestJsonFieldOrdering()1785     public TestJsonFieldOrdering() {
1786       OnConstruction();
1787     }
1788 
OnConstruction()1789     partial void OnConstruction();
1790 
1791     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
TestJsonFieldOrdering(TestJsonFieldOrdering other)1792     public TestJsonFieldOrdering(TestJsonFieldOrdering other) : this() {
1793       plainInt32_ = other.plainInt32_;
1794       plainString_ = other.plainString_;
1795       switch (other.O1Case) {
1796         case O1OneofCase.O1String:
1797           O1String = other.O1String;
1798           break;
1799         case O1OneofCase.O1Int32:
1800           O1Int32 = other.O1Int32;
1801           break;
1802       }
1803 
1804       switch (other.O2Case) {
1805         case O2OneofCase.O2Int32:
1806           O2Int32 = other.O2Int32;
1807           break;
1808         case O2OneofCase.O2String:
1809           O2String = other.O2String;
1810           break;
1811       }
1812 
1813       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
1814     }
1815 
1816     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()1817     public TestJsonFieldOrdering Clone() {
1818       return new TestJsonFieldOrdering(this);
1819     }
1820 
1821     /// <summary>Field number for the "plain_int32" field.</summary>
1822     public const int PlainInt32FieldNumber = 4;
1823     private int plainInt32_;
1824     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1825     public int PlainInt32 {
1826       get { return plainInt32_; }
1827       set {
1828         plainInt32_ = value;
1829       }
1830     }
1831 
1832     /// <summary>Field number for the "o1_string" field.</summary>
1833     public const int O1StringFieldNumber = 2;
1834     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1835     public string O1String {
1836       get { return o1Case_ == O1OneofCase.O1String ? (string) o1_ : ""; }
1837       set {
1838         o1_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
1839         o1Case_ = O1OneofCase.O1String;
1840       }
1841     }
1842 
1843     /// <summary>Field number for the "o1_int32" field.</summary>
1844     public const int O1Int32FieldNumber = 5;
1845     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1846     public int O1Int32 {
1847       get { return o1Case_ == O1OneofCase.O1Int32 ? (int) o1_ : 0; }
1848       set {
1849         o1_ = value;
1850         o1Case_ = O1OneofCase.O1Int32;
1851       }
1852     }
1853 
1854     /// <summary>Field number for the "plain_string" field.</summary>
1855     public const int PlainStringFieldNumber = 1;
1856     private string plainString_ = "";
1857     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1858     public string PlainString {
1859       get { return plainString_; }
1860       set {
1861         plainString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
1862       }
1863     }
1864 
1865     /// <summary>Field number for the "o2_int32" field.</summary>
1866     public const int O2Int32FieldNumber = 6;
1867     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1868     public int O2Int32 {
1869       get { return o2Case_ == O2OneofCase.O2Int32 ? (int) o2_ : 0; }
1870       set {
1871         o2_ = value;
1872         o2Case_ = O2OneofCase.O2Int32;
1873       }
1874     }
1875 
1876     /// <summary>Field number for the "o2_string" field.</summary>
1877     public const int O2StringFieldNumber = 3;
1878     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1879     public string O2String {
1880       get { return o2Case_ == O2OneofCase.O2String ? (string) o2_ : ""; }
1881       set {
1882         o2_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
1883         o2Case_ = O2OneofCase.O2String;
1884       }
1885     }
1886 
1887     private object o1_;
1888     /// <summary>Enum of possible cases for the "o1" oneof.</summary>
1889     public enum O1OneofCase {
1890       None = 0,
1891       O1String = 2,
1892       O1Int32 = 5,
1893     }
1894     private O1OneofCase o1Case_ = O1OneofCase.None;
1895     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1896     public O1OneofCase O1Case {
1897       get { return o1Case_; }
1898     }
1899 
1900     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ClearO1()1901     public void ClearO1() {
1902       o1Case_ = O1OneofCase.None;
1903       o1_ = null;
1904     }
1905 
1906     private object o2_;
1907     /// <summary>Enum of possible cases for the "o2" oneof.</summary>
1908     public enum O2OneofCase {
1909       None = 0,
1910       O2Int32 = 6,
1911       O2String = 3,
1912     }
1913     private O2OneofCase o2Case_ = O2OneofCase.None;
1914     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1915     public O2OneofCase O2Case {
1916       get { return o2Case_; }
1917     }
1918 
1919     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ClearO2()1920     public void ClearO2() {
1921       o2Case_ = O2OneofCase.None;
1922       o2_ = null;
1923     }
1924 
1925     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)1926     public override bool Equals(object other) {
1927       return Equals(other as TestJsonFieldOrdering);
1928     }
1929 
1930     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(TestJsonFieldOrdering other)1931     public bool Equals(TestJsonFieldOrdering other) {
1932       if (ReferenceEquals(other, null)) {
1933         return false;
1934       }
1935       if (ReferenceEquals(other, this)) {
1936         return true;
1937       }
1938       if (PlainInt32 != other.PlainInt32) return false;
1939       if (O1String != other.O1String) return false;
1940       if (O1Int32 != other.O1Int32) return false;
1941       if (PlainString != other.PlainString) return false;
1942       if (O2Int32 != other.O2Int32) return false;
1943       if (O2String != other.O2String) return false;
1944       if (O1Case != other.O1Case) return false;
1945       if (O2Case != other.O2Case) return false;
1946       return Equals(_unknownFields, other._unknownFields);
1947     }
1948 
1949     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()1950     public override int GetHashCode() {
1951       int hash = 1;
1952       if (PlainInt32 != 0) hash ^= PlainInt32.GetHashCode();
1953       if (o1Case_ == O1OneofCase.O1String) hash ^= O1String.GetHashCode();
1954       if (o1Case_ == O1OneofCase.O1Int32) hash ^= O1Int32.GetHashCode();
1955       if (PlainString.Length != 0) hash ^= PlainString.GetHashCode();
1956       if (o2Case_ == O2OneofCase.O2Int32) hash ^= O2Int32.GetHashCode();
1957       if (o2Case_ == O2OneofCase.O2String) hash ^= O2String.GetHashCode();
1958       hash ^= (int) o1Case_;
1959       hash ^= (int) o2Case_;
1960       if (_unknownFields != null) {
1961         hash ^= _unknownFields.GetHashCode();
1962       }
1963       return hash;
1964     }
1965 
1966     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()1967     public override string ToString() {
1968       return pb::JsonFormatter.ToDiagnosticString(this);
1969     }
1970 
1971     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)1972     public void WriteTo(pb::CodedOutputStream output) {
1973     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1974       output.WriteRawMessage(this);
1975     #else
1976       if (PlainString.Length != 0) {
1977         output.WriteRawTag(10);
1978         output.WriteString(PlainString);
1979       }
1980       if (o1Case_ == O1OneofCase.O1String) {
1981         output.WriteRawTag(18);
1982         output.WriteString(O1String);
1983       }
1984       if (o2Case_ == O2OneofCase.O2String) {
1985         output.WriteRawTag(26);
1986         output.WriteString(O2String);
1987       }
1988       if (PlainInt32 != 0) {
1989         output.WriteRawTag(32);
1990         output.WriteInt32(PlainInt32);
1991       }
1992       if (o1Case_ == O1OneofCase.O1Int32) {
1993         output.WriteRawTag(40);
1994         output.WriteInt32(O1Int32);
1995       }
1996       if (o2Case_ == O2OneofCase.O2Int32) {
1997         output.WriteRawTag(48);
1998         output.WriteInt32(O2Int32);
1999       }
2000       if (_unknownFields != null) {
2001         _unknownFields.WriteTo(output);
2002       }
2003     #endif
2004     }
2005 
2006     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2007     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)2008     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2009       if (PlainString.Length != 0) {
2010         output.WriteRawTag(10);
2011         output.WriteString(PlainString);
2012       }
2013       if (o1Case_ == O1OneofCase.O1String) {
2014         output.WriteRawTag(18);
2015         output.WriteString(O1String);
2016       }
2017       if (o2Case_ == O2OneofCase.O2String) {
2018         output.WriteRawTag(26);
2019         output.WriteString(O2String);
2020       }
2021       if (PlainInt32 != 0) {
2022         output.WriteRawTag(32);
2023         output.WriteInt32(PlainInt32);
2024       }
2025       if (o1Case_ == O1OneofCase.O1Int32) {
2026         output.WriteRawTag(40);
2027         output.WriteInt32(O1Int32);
2028       }
2029       if (o2Case_ == O2OneofCase.O2Int32) {
2030         output.WriteRawTag(48);
2031         output.WriteInt32(O2Int32);
2032       }
2033       if (_unknownFields != null) {
2034         _unknownFields.WriteTo(ref output);
2035       }
2036     }
2037     #endif
2038 
2039     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()2040     public int CalculateSize() {
2041       int size = 0;
2042       if (PlainInt32 != 0) {
2043         size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlainInt32);
2044       }
2045       if (o1Case_ == O1OneofCase.O1String) {
2046         size += 1 + pb::CodedOutputStream.ComputeStringSize(O1String);
2047       }
2048       if (o1Case_ == O1OneofCase.O1Int32) {
2049         size += 1 + pb::CodedOutputStream.ComputeInt32Size(O1Int32);
2050       }
2051       if (PlainString.Length != 0) {
2052         size += 1 + pb::CodedOutputStream.ComputeStringSize(PlainString);
2053       }
2054       if (o2Case_ == O2OneofCase.O2Int32) {
2055         size += 1 + pb::CodedOutputStream.ComputeInt32Size(O2Int32);
2056       }
2057       if (o2Case_ == O2OneofCase.O2String) {
2058         size += 1 + pb::CodedOutputStream.ComputeStringSize(O2String);
2059       }
2060       if (_unknownFields != null) {
2061         size += _unknownFields.CalculateSize();
2062       }
2063       return size;
2064     }
2065 
2066     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(TestJsonFieldOrdering other)2067     public void MergeFrom(TestJsonFieldOrdering other) {
2068       if (other == null) {
2069         return;
2070       }
2071       if (other.PlainInt32 != 0) {
2072         PlainInt32 = other.PlainInt32;
2073       }
2074       if (other.PlainString.Length != 0) {
2075         PlainString = other.PlainString;
2076       }
2077       switch (other.O1Case) {
2078         case O1OneofCase.O1String:
2079           O1String = other.O1String;
2080           break;
2081         case O1OneofCase.O1Int32:
2082           O1Int32 = other.O1Int32;
2083           break;
2084       }
2085 
2086       switch (other.O2Case) {
2087         case O2OneofCase.O2Int32:
2088           O2Int32 = other.O2Int32;
2089           break;
2090         case O2OneofCase.O2String:
2091           O2String = other.O2String;
2092           break;
2093       }
2094 
2095       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2096     }
2097 
2098     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)2099     public void MergeFrom(pb::CodedInputStream input) {
2100     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2101       input.ReadRawMessage(this);
2102     #else
2103       uint tag;
2104       while ((tag = input.ReadTag()) != 0) {
2105         switch(tag) {
2106           default:
2107             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2108             break;
2109           case 10: {
2110             PlainString = input.ReadString();
2111             break;
2112           }
2113           case 18: {
2114             O1String = input.ReadString();
2115             break;
2116           }
2117           case 26: {
2118             O2String = input.ReadString();
2119             break;
2120           }
2121           case 32: {
2122             PlainInt32 = input.ReadInt32();
2123             break;
2124           }
2125           case 40: {
2126             O1Int32 = input.ReadInt32();
2127             break;
2128           }
2129           case 48: {
2130             O2Int32 = input.ReadInt32();
2131             break;
2132           }
2133         }
2134       }
2135     #endif
2136     }
2137 
2138     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2139     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)2140     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2141       uint tag;
2142       while ((tag = input.ReadTag()) != 0) {
2143         switch(tag) {
2144           default:
2145             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2146             break;
2147           case 10: {
2148             PlainString = input.ReadString();
2149             break;
2150           }
2151           case 18: {
2152             O1String = input.ReadString();
2153             break;
2154           }
2155           case 26: {
2156             O2String = input.ReadString();
2157             break;
2158           }
2159           case 32: {
2160             PlainInt32 = input.ReadInt32();
2161             break;
2162           }
2163           case 40: {
2164             O1Int32 = input.ReadInt32();
2165             break;
2166           }
2167           case 48: {
2168             O2Int32 = input.ReadInt32();
2169             break;
2170           }
2171         }
2172       }
2173     }
2174     #endif
2175 
2176   }
2177 
2178   public sealed partial class TestJsonName : pb::IMessage<TestJsonName>
2179   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2180       , pb::IBufferMessage
2181   #endif
2182   {
2183     private static readonly pb::MessageParser<TestJsonName> _parser = new pb::MessageParser<TestJsonName>(() => new TestJsonName());
2184     private pb::UnknownFieldSet _unknownFields;
2185     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2186     public static pb::MessageParser<TestJsonName> Parser { get { return _parser; } }
2187 
2188     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2189     public static pbr::MessageDescriptor Descriptor {
2190       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[7]; }
2191     }
2192 
2193     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2194     pbr::MessageDescriptor pb::IMessage.Descriptor {
2195       get { return Descriptor; }
2196     }
2197 
2198     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
TestJsonName()2199     public TestJsonName() {
2200       OnConstruction();
2201     }
2202 
OnConstruction()2203     partial void OnConstruction();
2204 
2205     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
TestJsonName(TestJsonName other)2206     public TestJsonName(TestJsonName other) : this() {
2207       name_ = other.name_;
2208       description_ = other.description_;
2209       guid_ = other.guid_;
2210       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2211     }
2212 
2213     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()2214     public TestJsonName Clone() {
2215       return new TestJsonName(this);
2216     }
2217 
2218     /// <summary>Field number for the "name" field.</summary>
2219     public const int NameFieldNumber = 1;
2220     private string name_ = "";
2221     /// <summary>
2222     /// Message for testing the effects for of the json_name option
2223     /// </summary>
2224     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2225     public string Name {
2226       get { return name_; }
2227       set {
2228         name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2229       }
2230     }
2231 
2232     /// <summary>Field number for the "description" field.</summary>
2233     public const int DescriptionFieldNumber = 2;
2234     private string description_ = "";
2235     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2236     public string Description {
2237       get { return description_; }
2238       set {
2239         description_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2240       }
2241     }
2242 
2243     /// <summary>Field number for the "guid" field.</summary>
2244     public const int GuidFieldNumber = 3;
2245     private string guid_ = "";
2246     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2247     public string Guid {
2248       get { return guid_; }
2249       set {
2250         guid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2251       }
2252     }
2253 
2254     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)2255     public override bool Equals(object other) {
2256       return Equals(other as TestJsonName);
2257     }
2258 
2259     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(TestJsonName other)2260     public bool Equals(TestJsonName other) {
2261       if (ReferenceEquals(other, null)) {
2262         return false;
2263       }
2264       if (ReferenceEquals(other, this)) {
2265         return true;
2266       }
2267       if (Name != other.Name) return false;
2268       if (Description != other.Description) return false;
2269       if (Guid != other.Guid) return false;
2270       return Equals(_unknownFields, other._unknownFields);
2271     }
2272 
2273     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()2274     public override int GetHashCode() {
2275       int hash = 1;
2276       if (Name.Length != 0) hash ^= Name.GetHashCode();
2277       if (Description.Length != 0) hash ^= Description.GetHashCode();
2278       if (Guid.Length != 0) hash ^= Guid.GetHashCode();
2279       if (_unknownFields != null) {
2280         hash ^= _unknownFields.GetHashCode();
2281       }
2282       return hash;
2283     }
2284 
2285     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()2286     public override string ToString() {
2287       return pb::JsonFormatter.ToDiagnosticString(this);
2288     }
2289 
2290     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)2291     public void WriteTo(pb::CodedOutputStream output) {
2292     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2293       output.WriteRawMessage(this);
2294     #else
2295       if (Name.Length != 0) {
2296         output.WriteRawTag(10);
2297         output.WriteString(Name);
2298       }
2299       if (Description.Length != 0) {
2300         output.WriteRawTag(18);
2301         output.WriteString(Description);
2302       }
2303       if (Guid.Length != 0) {
2304         output.WriteRawTag(26);
2305         output.WriteString(Guid);
2306       }
2307       if (_unknownFields != null) {
2308         _unknownFields.WriteTo(output);
2309       }
2310     #endif
2311     }
2312 
2313     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2314     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)2315     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2316       if (Name.Length != 0) {
2317         output.WriteRawTag(10);
2318         output.WriteString(Name);
2319       }
2320       if (Description.Length != 0) {
2321         output.WriteRawTag(18);
2322         output.WriteString(Description);
2323       }
2324       if (Guid.Length != 0) {
2325         output.WriteRawTag(26);
2326         output.WriteString(Guid);
2327       }
2328       if (_unknownFields != null) {
2329         _unknownFields.WriteTo(ref output);
2330       }
2331     }
2332     #endif
2333 
2334     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()2335     public int CalculateSize() {
2336       int size = 0;
2337       if (Name.Length != 0) {
2338         size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
2339       }
2340       if (Description.Length != 0) {
2341         size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
2342       }
2343       if (Guid.Length != 0) {
2344         size += 1 + pb::CodedOutputStream.ComputeStringSize(Guid);
2345       }
2346       if (_unknownFields != null) {
2347         size += _unknownFields.CalculateSize();
2348       }
2349       return size;
2350     }
2351 
2352     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(TestJsonName other)2353     public void MergeFrom(TestJsonName other) {
2354       if (other == null) {
2355         return;
2356       }
2357       if (other.Name.Length != 0) {
2358         Name = other.Name;
2359       }
2360       if (other.Description.Length != 0) {
2361         Description = other.Description;
2362       }
2363       if (other.Guid.Length != 0) {
2364         Guid = other.Guid;
2365       }
2366       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2367     }
2368 
2369     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)2370     public void MergeFrom(pb::CodedInputStream input) {
2371     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2372       input.ReadRawMessage(this);
2373     #else
2374       uint tag;
2375       while ((tag = input.ReadTag()) != 0) {
2376         switch(tag) {
2377           default:
2378             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2379             break;
2380           case 10: {
2381             Name = input.ReadString();
2382             break;
2383           }
2384           case 18: {
2385             Description = input.ReadString();
2386             break;
2387           }
2388           case 26: {
2389             Guid = input.ReadString();
2390             break;
2391           }
2392         }
2393       }
2394     #endif
2395     }
2396 
2397     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2398     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)2399     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2400       uint tag;
2401       while ((tag = input.ReadTag()) != 0) {
2402         switch(tag) {
2403           default:
2404             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2405             break;
2406           case 10: {
2407             Name = input.ReadString();
2408             break;
2409           }
2410           case 18: {
2411             Description = input.ReadString();
2412             break;
2413           }
2414           case 26: {
2415             Guid = input.ReadString();
2416             break;
2417           }
2418         }
2419       }
2420     }
2421     #endif
2422 
2423   }
2424 
2425   /// <summary>
2426   /// Issue 3200: When merging two messages which use the same
2427   /// oneof case, which is itself a message type, the submessages should
2428   /// be merged.
2429   /// </summary>
2430   public sealed partial class OneofMerging : pb::IMessage<OneofMerging>
2431   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2432       , pb::IBufferMessage
2433   #endif
2434   {
2435     private static readonly pb::MessageParser<OneofMerging> _parser = new pb::MessageParser<OneofMerging>(() => new OneofMerging());
2436     private pb::UnknownFieldSet _unknownFields;
2437     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2438     public static pb::MessageParser<OneofMerging> Parser { get { return _parser; } }
2439 
2440     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2441     public static pbr::MessageDescriptor Descriptor {
2442       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[8]; }
2443     }
2444 
2445     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2446     pbr::MessageDescriptor pb::IMessage.Descriptor {
2447       get { return Descriptor; }
2448     }
2449 
2450     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
OneofMerging()2451     public OneofMerging() {
2452       OnConstruction();
2453     }
2454 
OnConstruction()2455     partial void OnConstruction();
2456 
2457     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
OneofMerging(OneofMerging other)2458     public OneofMerging(OneofMerging other) : this() {
2459       switch (other.ValueCase) {
2460         case ValueOneofCase.Text:
2461           Text = other.Text;
2462           break;
2463         case ValueOneofCase.Nested:
2464           Nested = other.Nested.Clone();
2465           break;
2466       }
2467 
2468       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2469     }
2470 
2471     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()2472     public OneofMerging Clone() {
2473       return new OneofMerging(this);
2474     }
2475 
2476     /// <summary>Field number for the "text" field.</summary>
2477     public const int TextFieldNumber = 1;
2478     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2479     public string Text {
2480       get { return valueCase_ == ValueOneofCase.Text ? (string) value_ : ""; }
2481       set {
2482         value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2483         valueCase_ = ValueOneofCase.Text;
2484       }
2485     }
2486 
2487     /// <summary>Field number for the "nested" field.</summary>
2488     public const int NestedFieldNumber = 2;
2489     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2490     public global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested Nested {
2491       get { return valueCase_ == ValueOneofCase.Nested ? (global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested) value_ : null; }
2492       set {
2493         value_ = value;
2494         valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.Nested;
2495       }
2496     }
2497 
2498     private object value_;
2499     /// <summary>Enum of possible cases for the "value" oneof.</summary>
2500     public enum ValueOneofCase {
2501       None = 0,
2502       Text = 1,
2503       Nested = 2,
2504     }
2505     private ValueOneofCase valueCase_ = ValueOneofCase.None;
2506     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2507     public ValueOneofCase ValueCase {
2508       get { return valueCase_; }
2509     }
2510 
2511     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ClearValue()2512     public void ClearValue() {
2513       valueCase_ = ValueOneofCase.None;
2514       value_ = null;
2515     }
2516 
2517     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)2518     public override bool Equals(object other) {
2519       return Equals(other as OneofMerging);
2520     }
2521 
2522     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(OneofMerging other)2523     public bool Equals(OneofMerging other) {
2524       if (ReferenceEquals(other, null)) {
2525         return false;
2526       }
2527       if (ReferenceEquals(other, this)) {
2528         return true;
2529       }
2530       if (Text != other.Text) return false;
2531       if (!object.Equals(Nested, other.Nested)) return false;
2532       if (ValueCase != other.ValueCase) return false;
2533       return Equals(_unknownFields, other._unknownFields);
2534     }
2535 
2536     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()2537     public override int GetHashCode() {
2538       int hash = 1;
2539       if (valueCase_ == ValueOneofCase.Text) hash ^= Text.GetHashCode();
2540       if (valueCase_ == ValueOneofCase.Nested) hash ^= Nested.GetHashCode();
2541       hash ^= (int) valueCase_;
2542       if (_unknownFields != null) {
2543         hash ^= _unknownFields.GetHashCode();
2544       }
2545       return hash;
2546     }
2547 
2548     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()2549     public override string ToString() {
2550       return pb::JsonFormatter.ToDiagnosticString(this);
2551     }
2552 
2553     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)2554     public void WriteTo(pb::CodedOutputStream output) {
2555     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2556       output.WriteRawMessage(this);
2557     #else
2558       if (valueCase_ == ValueOneofCase.Text) {
2559         output.WriteRawTag(10);
2560         output.WriteString(Text);
2561       }
2562       if (valueCase_ == ValueOneofCase.Nested) {
2563         output.WriteRawTag(18);
2564         output.WriteMessage(Nested);
2565       }
2566       if (_unknownFields != null) {
2567         _unknownFields.WriteTo(output);
2568       }
2569     #endif
2570     }
2571 
2572     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2573     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)2574     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2575       if (valueCase_ == ValueOneofCase.Text) {
2576         output.WriteRawTag(10);
2577         output.WriteString(Text);
2578       }
2579       if (valueCase_ == ValueOneofCase.Nested) {
2580         output.WriteRawTag(18);
2581         output.WriteMessage(Nested);
2582       }
2583       if (_unknownFields != null) {
2584         _unknownFields.WriteTo(ref output);
2585       }
2586     }
2587     #endif
2588 
2589     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()2590     public int CalculateSize() {
2591       int size = 0;
2592       if (valueCase_ == ValueOneofCase.Text) {
2593         size += 1 + pb::CodedOutputStream.ComputeStringSize(Text);
2594       }
2595       if (valueCase_ == ValueOneofCase.Nested) {
2596         size += 1 + pb::CodedOutputStream.ComputeMessageSize(Nested);
2597       }
2598       if (_unknownFields != null) {
2599         size += _unknownFields.CalculateSize();
2600       }
2601       return size;
2602     }
2603 
2604     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(OneofMerging other)2605     public void MergeFrom(OneofMerging other) {
2606       if (other == null) {
2607         return;
2608       }
2609       switch (other.ValueCase) {
2610         case ValueOneofCase.Text:
2611           Text = other.Text;
2612           break;
2613         case ValueOneofCase.Nested:
2614           if (Nested == null) {
2615             Nested = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested();
2616           }
2617           Nested.MergeFrom(other.Nested);
2618           break;
2619       }
2620 
2621       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2622     }
2623 
2624     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)2625     public void MergeFrom(pb::CodedInputStream input) {
2626     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2627       input.ReadRawMessage(this);
2628     #else
2629       uint tag;
2630       while ((tag = input.ReadTag()) != 0) {
2631         switch(tag) {
2632           default:
2633             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2634             break;
2635           case 10: {
2636             Text = input.ReadString();
2637             break;
2638           }
2639           case 18: {
2640             global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested subBuilder = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested();
2641             if (valueCase_ == ValueOneofCase.Nested) {
2642               subBuilder.MergeFrom(Nested);
2643             }
2644             input.ReadMessage(subBuilder);
2645             Nested = subBuilder;
2646             break;
2647           }
2648         }
2649       }
2650     #endif
2651     }
2652 
2653     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2654     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)2655     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2656       uint tag;
2657       while ((tag = input.ReadTag()) != 0) {
2658         switch(tag) {
2659           default:
2660             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2661             break;
2662           case 10: {
2663             Text = input.ReadString();
2664             break;
2665           }
2666           case 18: {
2667             global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested subBuilder = new global::UnitTest.Issues.TestProtos.OneofMerging.Types.Nested();
2668             if (valueCase_ == ValueOneofCase.Nested) {
2669               subBuilder.MergeFrom(Nested);
2670             }
2671             input.ReadMessage(subBuilder);
2672             Nested = subBuilder;
2673             break;
2674           }
2675         }
2676       }
2677     }
2678     #endif
2679 
2680     #region Nested types
2681     /// <summary>Container for nested types declared in the OneofMerging message type.</summary>
2682     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2683     public static partial class Types {
2684       public sealed partial class Nested : pb::IMessage<Nested>
2685       #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2686           , pb::IBufferMessage
2687       #endif
2688       {
2689         private static readonly pb::MessageParser<Nested> _parser = new pb::MessageParser<Nested>(() => new Nested());
2690         private pb::UnknownFieldSet _unknownFields;
2691         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2692         public static pb::MessageParser<Nested> Parser { get { return _parser; } }
2693 
2694         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2695         public static pbr::MessageDescriptor Descriptor {
2696           get { return global::UnitTest.Issues.TestProtos.OneofMerging.Descriptor.NestedTypes[0]; }
2697         }
2698 
2699         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2700         pbr::MessageDescriptor pb::IMessage.Descriptor {
2701           get { return Descriptor; }
2702         }
2703 
2704         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Nested()2705         public Nested() {
2706           OnConstruction();
2707         }
2708 
OnConstruction()2709         partial void OnConstruction();
2710 
2711         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Nested(Nested other)2712         public Nested(Nested other) : this() {
2713           x_ = other.x_;
2714           y_ = other.y_;
2715           _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2716         }
2717 
2718         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()2719         public Nested Clone() {
2720           return new Nested(this);
2721         }
2722 
2723         /// <summary>Field number for the "x" field.</summary>
2724         public const int XFieldNumber = 1;
2725         private int x_;
2726         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2727         public int X {
2728           get { return x_; }
2729           set {
2730             x_ = value;
2731           }
2732         }
2733 
2734         /// <summary>Field number for the "y" field.</summary>
2735         public const int YFieldNumber = 2;
2736         private int y_;
2737         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2738         public int Y {
2739           get { return y_; }
2740           set {
2741             y_ = value;
2742           }
2743         }
2744 
2745         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)2746         public override bool Equals(object other) {
2747           return Equals(other as Nested);
2748         }
2749 
2750         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(Nested other)2751         public bool Equals(Nested other) {
2752           if (ReferenceEquals(other, null)) {
2753             return false;
2754           }
2755           if (ReferenceEquals(other, this)) {
2756             return true;
2757           }
2758           if (X != other.X) return false;
2759           if (Y != other.Y) return false;
2760           return Equals(_unknownFields, other._unknownFields);
2761         }
2762 
2763         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()2764         public override int GetHashCode() {
2765           int hash = 1;
2766           if (X != 0) hash ^= X.GetHashCode();
2767           if (Y != 0) hash ^= Y.GetHashCode();
2768           if (_unknownFields != null) {
2769             hash ^= _unknownFields.GetHashCode();
2770           }
2771           return hash;
2772         }
2773 
2774         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()2775         public override string ToString() {
2776           return pb::JsonFormatter.ToDiagnosticString(this);
2777         }
2778 
2779         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)2780         public void WriteTo(pb::CodedOutputStream output) {
2781         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2782           output.WriteRawMessage(this);
2783         #else
2784           if (X != 0) {
2785             output.WriteRawTag(8);
2786             output.WriteInt32(X);
2787           }
2788           if (Y != 0) {
2789             output.WriteRawTag(16);
2790             output.WriteInt32(Y);
2791           }
2792           if (_unknownFields != null) {
2793             _unknownFields.WriteTo(output);
2794           }
2795         #endif
2796         }
2797 
2798         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2799         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)2800         void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
2801           if (X != 0) {
2802             output.WriteRawTag(8);
2803             output.WriteInt32(X);
2804           }
2805           if (Y != 0) {
2806             output.WriteRawTag(16);
2807             output.WriteInt32(Y);
2808           }
2809           if (_unknownFields != null) {
2810             _unknownFields.WriteTo(ref output);
2811           }
2812         }
2813         #endif
2814 
2815         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()2816         public int CalculateSize() {
2817           int size = 0;
2818           if (X != 0) {
2819             size += 1 + pb::CodedOutputStream.ComputeInt32Size(X);
2820           }
2821           if (Y != 0) {
2822             size += 1 + pb::CodedOutputStream.ComputeInt32Size(Y);
2823           }
2824           if (_unknownFields != null) {
2825             size += _unknownFields.CalculateSize();
2826           }
2827           return size;
2828         }
2829 
2830         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(Nested other)2831         public void MergeFrom(Nested other) {
2832           if (other == null) {
2833             return;
2834           }
2835           if (other.X != 0) {
2836             X = other.X;
2837           }
2838           if (other.Y != 0) {
2839             Y = other.Y;
2840           }
2841           _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
2842         }
2843 
2844         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)2845         public void MergeFrom(pb::CodedInputStream input) {
2846         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2847           input.ReadRawMessage(this);
2848         #else
2849           uint tag;
2850           while ((tag = input.ReadTag()) != 0) {
2851             switch(tag) {
2852               default:
2853                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
2854                 break;
2855               case 8: {
2856                 X = input.ReadInt32();
2857                 break;
2858               }
2859               case 16: {
2860                 Y = input.ReadInt32();
2861                 break;
2862               }
2863             }
2864           }
2865         #endif
2866         }
2867 
2868         #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2869         [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)2870         void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
2871           uint tag;
2872           while ((tag = input.ReadTag()) != 0) {
2873             switch(tag) {
2874               default:
2875                 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
2876                 break;
2877               case 8: {
2878                 X = input.ReadInt32();
2879                 break;
2880               }
2881               case 16: {
2882                 Y = input.ReadInt32();
2883                 break;
2884               }
2885             }
2886           }
2887         }
2888         #endif
2889 
2890       }
2891 
2892     }
2893     #endregion
2894 
2895   }
2896 
2897   public sealed partial class NullValueOutsideStruct : pb::IMessage<NullValueOutsideStruct>
2898   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
2899       , pb::IBufferMessage
2900   #endif
2901   {
2902     private static readonly pb::MessageParser<NullValueOutsideStruct> _parser = new pb::MessageParser<NullValueOutsideStruct>(() => new NullValueOutsideStruct());
2903     private pb::UnknownFieldSet _unknownFields;
2904     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2905     public static pb::MessageParser<NullValueOutsideStruct> Parser { get { return _parser; } }
2906 
2907     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2908     public static pbr::MessageDescriptor Descriptor {
2909       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[9]; }
2910     }
2911 
2912     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2913     pbr::MessageDescriptor pb::IMessage.Descriptor {
2914       get { return Descriptor; }
2915     }
2916 
2917     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
NullValueOutsideStruct()2918     public NullValueOutsideStruct() {
2919       OnConstruction();
2920     }
2921 
OnConstruction()2922     partial void OnConstruction();
2923 
2924     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
NullValueOutsideStruct(NullValueOutsideStruct other)2925     public NullValueOutsideStruct(NullValueOutsideStruct other) : this() {
2926       switch (other.ValueCase) {
2927         case ValueOneofCase.StringValue:
2928           StringValue = other.StringValue;
2929           break;
2930         case ValueOneofCase.NullValue:
2931           NullValue = other.NullValue;
2932           break;
2933       }
2934 
2935       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
2936     }
2937 
2938     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()2939     public NullValueOutsideStruct Clone() {
2940       return new NullValueOutsideStruct(this);
2941     }
2942 
2943     /// <summary>Field number for the "string_value" field.</summary>
2944     public const int StringValueFieldNumber = 1;
2945     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2946     public string StringValue {
2947       get { return valueCase_ == ValueOneofCase.StringValue ? (string) value_ : ""; }
2948       set {
2949         value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
2950         valueCase_ = ValueOneofCase.StringValue;
2951       }
2952     }
2953 
2954     /// <summary>Field number for the "null_value" field.</summary>
2955     public const int NullValueFieldNumber = 2;
2956     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2957     public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
2958       get { return valueCase_ == ValueOneofCase.NullValue ? (global::Google.Protobuf.WellKnownTypes.NullValue) value_ : global::Google.Protobuf.WellKnownTypes.NullValue.NullValue; }
2959       set {
2960         value_ = value;
2961         valueCase_ = ValueOneofCase.NullValue;
2962       }
2963     }
2964 
2965     private object value_;
2966     /// <summary>Enum of possible cases for the "value" oneof.</summary>
2967     public enum ValueOneofCase {
2968       None = 0,
2969       StringValue = 1,
2970       NullValue = 2,
2971     }
2972     private ValueOneofCase valueCase_ = ValueOneofCase.None;
2973     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
2974     public ValueOneofCase ValueCase {
2975       get { return valueCase_; }
2976     }
2977 
2978     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ClearValue()2979     public void ClearValue() {
2980       valueCase_ = ValueOneofCase.None;
2981       value_ = null;
2982     }
2983 
2984     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)2985     public override bool Equals(object other) {
2986       return Equals(other as NullValueOutsideStruct);
2987     }
2988 
2989     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(NullValueOutsideStruct other)2990     public bool Equals(NullValueOutsideStruct other) {
2991       if (ReferenceEquals(other, null)) {
2992         return false;
2993       }
2994       if (ReferenceEquals(other, this)) {
2995         return true;
2996       }
2997       if (StringValue != other.StringValue) return false;
2998       if (NullValue != other.NullValue) return false;
2999       if (ValueCase != other.ValueCase) return false;
3000       return Equals(_unknownFields, other._unknownFields);
3001     }
3002 
3003     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()3004     public override int GetHashCode() {
3005       int hash = 1;
3006       if (valueCase_ == ValueOneofCase.StringValue) hash ^= StringValue.GetHashCode();
3007       if (valueCase_ == ValueOneofCase.NullValue) hash ^= NullValue.GetHashCode();
3008       hash ^= (int) valueCase_;
3009       if (_unknownFields != null) {
3010         hash ^= _unknownFields.GetHashCode();
3011       }
3012       return hash;
3013     }
3014 
3015     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()3016     public override string ToString() {
3017       return pb::JsonFormatter.ToDiagnosticString(this);
3018     }
3019 
3020     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)3021     public void WriteTo(pb::CodedOutputStream output) {
3022     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3023       output.WriteRawMessage(this);
3024     #else
3025       if (valueCase_ == ValueOneofCase.StringValue) {
3026         output.WriteRawTag(10);
3027         output.WriteString(StringValue);
3028       }
3029       if (valueCase_ == ValueOneofCase.NullValue) {
3030         output.WriteRawTag(16);
3031         output.WriteEnum((int) NullValue);
3032       }
3033       if (_unknownFields != null) {
3034         _unknownFields.WriteTo(output);
3035       }
3036     #endif
3037     }
3038 
3039     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3040     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)3041     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3042       if (valueCase_ == ValueOneofCase.StringValue) {
3043         output.WriteRawTag(10);
3044         output.WriteString(StringValue);
3045       }
3046       if (valueCase_ == ValueOneofCase.NullValue) {
3047         output.WriteRawTag(16);
3048         output.WriteEnum((int) NullValue);
3049       }
3050       if (_unknownFields != null) {
3051         _unknownFields.WriteTo(ref output);
3052       }
3053     }
3054     #endif
3055 
3056     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()3057     public int CalculateSize() {
3058       int size = 0;
3059       if (valueCase_ == ValueOneofCase.StringValue) {
3060         size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
3061       }
3062       if (valueCase_ == ValueOneofCase.NullValue) {
3063         size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
3064       }
3065       if (_unknownFields != null) {
3066         size += _unknownFields.CalculateSize();
3067       }
3068       return size;
3069     }
3070 
3071     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(NullValueOutsideStruct other)3072     public void MergeFrom(NullValueOutsideStruct other) {
3073       if (other == null) {
3074         return;
3075       }
3076       switch (other.ValueCase) {
3077         case ValueOneofCase.StringValue:
3078           StringValue = other.StringValue;
3079           break;
3080         case ValueOneofCase.NullValue:
3081           NullValue = other.NullValue;
3082           break;
3083       }
3084 
3085       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3086     }
3087 
3088     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)3089     public void MergeFrom(pb::CodedInputStream input) {
3090     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3091       input.ReadRawMessage(this);
3092     #else
3093       uint tag;
3094       while ((tag = input.ReadTag()) != 0) {
3095         switch(tag) {
3096           default:
3097             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3098             break;
3099           case 10: {
3100             StringValue = input.ReadString();
3101             break;
3102           }
3103           case 16: {
3104             value_ = input.ReadEnum();
3105             valueCase_ = ValueOneofCase.NullValue;
3106             break;
3107           }
3108         }
3109       }
3110     #endif
3111     }
3112 
3113     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3114     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)3115     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3116       uint tag;
3117       while ((tag = input.ReadTag()) != 0) {
3118         switch(tag) {
3119           default:
3120             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3121             break;
3122           case 10: {
3123             StringValue = input.ReadString();
3124             break;
3125           }
3126           case 16: {
3127             value_ = input.ReadEnum();
3128             valueCase_ = ValueOneofCase.NullValue;
3129             break;
3130           }
3131         }
3132       }
3133     }
3134     #endif
3135 
3136   }
3137 
3138   public sealed partial class NullValueNotInOneof : pb::IMessage<NullValueNotInOneof>
3139   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3140       , pb::IBufferMessage
3141   #endif
3142   {
3143     private static readonly pb::MessageParser<NullValueNotInOneof> _parser = new pb::MessageParser<NullValueNotInOneof>(() => new NullValueNotInOneof());
3144     private pb::UnknownFieldSet _unknownFields;
3145     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3146     public static pb::MessageParser<NullValueNotInOneof> Parser { get { return _parser; } }
3147 
3148     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3149     public static pbr::MessageDescriptor Descriptor {
3150       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[10]; }
3151     }
3152 
3153     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3154     pbr::MessageDescriptor pb::IMessage.Descriptor {
3155       get { return Descriptor; }
3156     }
3157 
3158     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
NullValueNotInOneof()3159     public NullValueNotInOneof() {
3160       OnConstruction();
3161     }
3162 
OnConstruction()3163     partial void OnConstruction();
3164 
3165     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
NullValueNotInOneof(NullValueNotInOneof other)3166     public NullValueNotInOneof(NullValueNotInOneof other) : this() {
3167       nullValue_ = other.nullValue_;
3168       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
3169     }
3170 
3171     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()3172     public NullValueNotInOneof Clone() {
3173       return new NullValueNotInOneof(this);
3174     }
3175 
3176     /// <summary>Field number for the "null_value" field.</summary>
3177     public const int NullValueFieldNumber = 2;
3178     private global::Google.Protobuf.WellKnownTypes.NullValue nullValue_ = global::Google.Protobuf.WellKnownTypes.NullValue.NullValue;
3179     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3180     public global::Google.Protobuf.WellKnownTypes.NullValue NullValue {
3181       get { return nullValue_; }
3182       set {
3183         nullValue_ = value;
3184       }
3185     }
3186 
3187     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)3188     public override bool Equals(object other) {
3189       return Equals(other as NullValueNotInOneof);
3190     }
3191 
3192     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(NullValueNotInOneof other)3193     public bool Equals(NullValueNotInOneof other) {
3194       if (ReferenceEquals(other, null)) {
3195         return false;
3196       }
3197       if (ReferenceEquals(other, this)) {
3198         return true;
3199       }
3200       if (NullValue != other.NullValue) return false;
3201       return Equals(_unknownFields, other._unknownFields);
3202     }
3203 
3204     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()3205     public override int GetHashCode() {
3206       int hash = 1;
3207       if (NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) hash ^= NullValue.GetHashCode();
3208       if (_unknownFields != null) {
3209         hash ^= _unknownFields.GetHashCode();
3210       }
3211       return hash;
3212     }
3213 
3214     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()3215     public override string ToString() {
3216       return pb::JsonFormatter.ToDiagnosticString(this);
3217     }
3218 
3219     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)3220     public void WriteTo(pb::CodedOutputStream output) {
3221     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3222       output.WriteRawMessage(this);
3223     #else
3224       if (NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) {
3225         output.WriteRawTag(16);
3226         output.WriteEnum((int) NullValue);
3227       }
3228       if (_unknownFields != null) {
3229         _unknownFields.WriteTo(output);
3230       }
3231     #endif
3232     }
3233 
3234     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3235     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)3236     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3237       if (NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) {
3238         output.WriteRawTag(16);
3239         output.WriteEnum((int) NullValue);
3240       }
3241       if (_unknownFields != null) {
3242         _unknownFields.WriteTo(ref output);
3243       }
3244     }
3245     #endif
3246 
3247     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()3248     public int CalculateSize() {
3249       int size = 0;
3250       if (NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) {
3251         size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) NullValue);
3252       }
3253       if (_unknownFields != null) {
3254         size += _unknownFields.CalculateSize();
3255       }
3256       return size;
3257     }
3258 
3259     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(NullValueNotInOneof other)3260     public void MergeFrom(NullValueNotInOneof other) {
3261       if (other == null) {
3262         return;
3263       }
3264       if (other.NullValue != global::Google.Protobuf.WellKnownTypes.NullValue.NullValue) {
3265         NullValue = other.NullValue;
3266       }
3267       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3268     }
3269 
3270     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)3271     public void MergeFrom(pb::CodedInputStream input) {
3272     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3273       input.ReadRawMessage(this);
3274     #else
3275       uint tag;
3276       while ((tag = input.ReadTag()) != 0) {
3277         switch(tag) {
3278           default:
3279             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3280             break;
3281           case 16: {
3282             NullValue = (global::Google.Protobuf.WellKnownTypes.NullValue) input.ReadEnum();
3283             break;
3284           }
3285         }
3286       }
3287     #endif
3288     }
3289 
3290     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3291     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)3292     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3293       uint tag;
3294       while ((tag = input.ReadTag()) != 0) {
3295         switch(tag) {
3296           default:
3297             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3298             break;
3299           case 16: {
3300             NullValue = (global::Google.Protobuf.WellKnownTypes.NullValue) input.ReadEnum();
3301             break;
3302           }
3303         }
3304       }
3305     }
3306     #endif
3307 
3308   }
3309 
3310   public sealed partial class MixedRegularAndOptional : pb::IMessage<MixedRegularAndOptional>
3311   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3312       , pb::IBufferMessage
3313   #endif
3314   {
3315     private static readonly pb::MessageParser<MixedRegularAndOptional> _parser = new pb::MessageParser<MixedRegularAndOptional>(() => new MixedRegularAndOptional());
3316     private pb::UnknownFieldSet _unknownFields;
3317     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3318     public static pb::MessageParser<MixedRegularAndOptional> Parser { get { return _parser; } }
3319 
3320     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3321     public static pbr::MessageDescriptor Descriptor {
3322       get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.Descriptor.MessageTypes[11]; }
3323     }
3324 
3325     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3326     pbr::MessageDescriptor pb::IMessage.Descriptor {
3327       get { return Descriptor; }
3328     }
3329 
3330     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MixedRegularAndOptional()3331     public MixedRegularAndOptional() {
3332       OnConstruction();
3333     }
3334 
OnConstruction()3335     partial void OnConstruction();
3336 
3337     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MixedRegularAndOptional(MixedRegularAndOptional other)3338     public MixedRegularAndOptional(MixedRegularAndOptional other) : this() {
3339       regularField_ = other.regularField_;
3340       optionalField_ = other.optionalField_;
3341       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
3342     }
3343 
3344     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()3345     public MixedRegularAndOptional Clone() {
3346       return new MixedRegularAndOptional(this);
3347     }
3348 
3349     /// <summary>Field number for the "regular_field" field.</summary>
3350     public const int RegularFieldFieldNumber = 1;
3351     private string regularField_ = "";
3352     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3353     public string RegularField {
3354       get { return regularField_; }
3355       set {
3356         regularField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
3357       }
3358     }
3359 
3360     /// <summary>Field number for the "optional_field" field.</summary>
3361     public const int OptionalFieldFieldNumber = 2;
3362     private string optionalField_;
3363     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3364     public string OptionalField {
3365       get { return optionalField_ ?? ""; }
3366       set {
3367         optionalField_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
3368       }
3369     }
3370     /// <summary>Gets whether the "optional_field" field is set</summary>
3371     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
3372     public bool HasOptionalField {
3373       get { return optionalField_ != null; }
3374     }
3375     /// <summary>Clears the value of the "optional_field" field</summary>
3376     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ClearOptionalField()3377     public void ClearOptionalField() {
3378       optionalField_ = null;
3379     }
3380 
3381     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)3382     public override bool Equals(object other) {
3383       return Equals(other as MixedRegularAndOptional);
3384     }
3385 
3386     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(MixedRegularAndOptional other)3387     public bool Equals(MixedRegularAndOptional other) {
3388       if (ReferenceEquals(other, null)) {
3389         return false;
3390       }
3391       if (ReferenceEquals(other, this)) {
3392         return true;
3393       }
3394       if (RegularField != other.RegularField) return false;
3395       if (OptionalField != other.OptionalField) return false;
3396       return Equals(_unknownFields, other._unknownFields);
3397     }
3398 
3399     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()3400     public override int GetHashCode() {
3401       int hash = 1;
3402       if (RegularField.Length != 0) hash ^= RegularField.GetHashCode();
3403       if (HasOptionalField) hash ^= OptionalField.GetHashCode();
3404       if (_unknownFields != null) {
3405         hash ^= _unknownFields.GetHashCode();
3406       }
3407       return hash;
3408     }
3409 
3410     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()3411     public override string ToString() {
3412       return pb::JsonFormatter.ToDiagnosticString(this);
3413     }
3414 
3415     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)3416     public void WriteTo(pb::CodedOutputStream output) {
3417     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3418       output.WriteRawMessage(this);
3419     #else
3420       if (RegularField.Length != 0) {
3421         output.WriteRawTag(10);
3422         output.WriteString(RegularField);
3423       }
3424       if (HasOptionalField) {
3425         output.WriteRawTag(18);
3426         output.WriteString(OptionalField);
3427       }
3428       if (_unknownFields != null) {
3429         _unknownFields.WriteTo(output);
3430       }
3431     #endif
3432     }
3433 
3434     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3435     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)3436     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
3437       if (RegularField.Length != 0) {
3438         output.WriteRawTag(10);
3439         output.WriteString(RegularField);
3440       }
3441       if (HasOptionalField) {
3442         output.WriteRawTag(18);
3443         output.WriteString(OptionalField);
3444       }
3445       if (_unknownFields != null) {
3446         _unknownFields.WriteTo(ref output);
3447       }
3448     }
3449     #endif
3450 
3451     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()3452     public int CalculateSize() {
3453       int size = 0;
3454       if (RegularField.Length != 0) {
3455         size += 1 + pb::CodedOutputStream.ComputeStringSize(RegularField);
3456       }
3457       if (HasOptionalField) {
3458         size += 1 + pb::CodedOutputStream.ComputeStringSize(OptionalField);
3459       }
3460       if (_unknownFields != null) {
3461         size += _unknownFields.CalculateSize();
3462       }
3463       return size;
3464     }
3465 
3466     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(MixedRegularAndOptional other)3467     public void MergeFrom(MixedRegularAndOptional other) {
3468       if (other == null) {
3469         return;
3470       }
3471       if (other.RegularField.Length != 0) {
3472         RegularField = other.RegularField;
3473       }
3474       if (other.HasOptionalField) {
3475         OptionalField = other.OptionalField;
3476       }
3477       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
3478     }
3479 
3480     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)3481     public void MergeFrom(pb::CodedInputStream input) {
3482     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3483       input.ReadRawMessage(this);
3484     #else
3485       uint tag;
3486       while ((tag = input.ReadTag()) != 0) {
3487         switch(tag) {
3488           default:
3489             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
3490             break;
3491           case 10: {
3492             RegularField = input.ReadString();
3493             break;
3494           }
3495           case 18: {
3496             OptionalField = input.ReadString();
3497             break;
3498           }
3499         }
3500       }
3501     #endif
3502     }
3503 
3504     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
3505     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)3506     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
3507       uint tag;
3508       while ((tag = input.ReadTag()) != 0) {
3509         switch(tag) {
3510           default:
3511             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
3512             break;
3513           case 10: {
3514             RegularField = input.ReadString();
3515             break;
3516           }
3517           case 18: {
3518             OptionalField = input.ReadString();
3519             break;
3520           }
3521         }
3522       }
3523     }
3524     #endif
3525 
3526   }
3527 
3528   #endregion
3529 
3530 }
3531 
3532 #endregion Designer generated code
3533