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