Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | // source: conformance.proto |
| 3 | #pragma warning disable 1591, 0612, 3021 |
| 4 | #region Designer generated code |
| 5 | |
| 6 | using pb = global::Google.Protobuf; |
| 7 | using pbc = global::Google.Protobuf.Collections; |
| 8 | using pbr = global::Google.Protobuf.Reflection; |
| 9 | using scg = global::System.Collections.Generic; |
| 10 | namespace Conformance { |
| 11 | |
Jon Skeet | b0888a4 | 2015-09-29 13:37:30 +0100 | [diff] [blame] | 12 | /// <summary>Holder for reflection information generated from conformance.proto</summary> |
Jon Skeet | e2c8230 | 2015-09-29 14:34:31 +0100 | [diff] [blame] | 13 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 14 | public static partial class Conformance { |
| 15 | |
| 16 | #region Descriptor |
Jon Skeet | b0888a4 | 2015-09-29 13:37:30 +0100 | [diff] [blame] | 17 | /// <summary>File descriptor for conformance.proto</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 18 | public static pbr::FileDescriptor Descriptor { |
| 19 | get { return descriptor; } |
| 20 | } |
| 21 | private static pbr::FileDescriptor descriptor; |
| 22 | |
| 23 | static Conformance() { |
| 24 | byte[] descriptorData = global::System.Convert.FromBase64String( |
| 25 | string.Concat( |
Jon Skeet | 9489817 | 2015-09-01 15:47:48 +0100 | [diff] [blame] | 26 | "ChFjb25mb3JtYW5jZS5wcm90bxILY29uZm9ybWFuY2UijQEKEkNvbmZvcm1h", |
| 27 | "bmNlUmVxdWVzdBIaChBwcm90b2J1Zl9wYXlsb2FkGAEgASgMSAASFgoManNv", |
| 28 | "bl9wYXlsb2FkGAIgASgJSAASOAoXcmVxdWVzdGVkX291dHB1dF9mb3JtYXQY", |
| 29 | "AyABKA4yFy5jb25mb3JtYW5jZS5XaXJlRm9ybWF0QgkKB3BheWxvYWQilgEK", |
| 30 | "E0NvbmZvcm1hbmNlUmVzcG9uc2USFQoLcGFyc2VfZXJyb3IYASABKAlIABIX", |
| 31 | "Cg1ydW50aW1lX2Vycm9yGAIgASgJSAASGgoQcHJvdG9idWZfcGF5bG9hZBgD", |
| 32 | "IAEoDEgAEhYKDGpzb25fcGF5bG9hZBgEIAEoCUgAEhEKB3NraXBwZWQYBSAB", |
| 33 | "KAlIAEIICgZyZXN1bHQi6yIKDFRlc3RBbGxUeXBlcxIWCg5vcHRpb25hbF9p", |
| 34 | "bnQzMhgBIAEoBRIWCg5vcHRpb25hbF9pbnQ2NBgCIAEoAxIXCg9vcHRpb25h", |
| 35 | "bF91aW50MzIYAyABKA0SFwoPb3B0aW9uYWxfdWludDY0GAQgASgEEhcKD29w", |
| 36 | "dGlvbmFsX3NpbnQzMhgFIAEoERIXCg9vcHRpb25hbF9zaW50NjQYBiABKBIS", |
| 37 | "GAoQb3B0aW9uYWxfZml4ZWQzMhgHIAEoBxIYChBvcHRpb25hbF9maXhlZDY0", |
| 38 | "GAggASgGEhkKEW9wdGlvbmFsX3NmaXhlZDMyGAkgASgPEhkKEW9wdGlvbmFs", |
| 39 | "X3NmaXhlZDY0GAogASgQEhYKDm9wdGlvbmFsX2Zsb2F0GAsgASgCEhcKD29w", |
| 40 | "dGlvbmFsX2RvdWJsZRgMIAEoARIVCg1vcHRpb25hbF9ib29sGA0gASgIEhcK", |
| 41 | "D29wdGlvbmFsX3N0cmluZxgOIAEoCRIWCg5vcHRpb25hbF9ieXRlcxgPIAEo", |
| 42 | "DBJIChdvcHRpb25hbF9uZXN0ZWRfbWVzc2FnZRgSIAEoCzInLmNvbmZvcm1h", |
| 43 | "bmNlLlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlEj0KGG9wdGlvbmFsX2Zv", |
| 44 | "cmVpZ25fbWVzc2FnZRgTIAEoCzIbLmNvbmZvcm1hbmNlLkZvcmVpZ25NZXNz", |
| 45 | "YWdlEkIKFG9wdGlvbmFsX25lc3RlZF9lbnVtGBUgASgOMiQuY29uZm9ybWFu", |
| 46 | "Y2UuVGVzdEFsbFR5cGVzLk5lc3RlZEVudW0SNwoVb3B0aW9uYWxfZm9yZWln", |
| 47 | "bl9lbnVtGBYgASgOMhguY29uZm9ybWFuY2UuRm9yZWlnbkVudW0SIQoVb3B0", |
| 48 | "aW9uYWxfc3RyaW5nX3BpZWNlGBggASgJQgIIAhIZCg1vcHRpb25hbF9jb3Jk", |
| 49 | "GBkgASgJQgIIARI0ChFyZWN1cnNpdmVfbWVzc2FnZRgbIAEoCzIZLmNvbmZv", |
| 50 | "cm1hbmNlLlRlc3RBbGxUeXBlcxIWCg5yZXBlYXRlZF9pbnQzMhgfIAMoBRIW", |
| 51 | "Cg5yZXBlYXRlZF9pbnQ2NBggIAMoAxIXCg9yZXBlYXRlZF91aW50MzIYISAD", |
| 52 | "KA0SFwoPcmVwZWF0ZWRfdWludDY0GCIgAygEEhcKD3JlcGVhdGVkX3NpbnQz", |
| 53 | "MhgjIAMoERIXCg9yZXBlYXRlZF9zaW50NjQYJCADKBISGAoQcmVwZWF0ZWRf", |
| 54 | "Zml4ZWQzMhglIAMoBxIYChByZXBlYXRlZF9maXhlZDY0GCYgAygGEhkKEXJl", |
| 55 | "cGVhdGVkX3NmaXhlZDMyGCcgAygPEhkKEXJlcGVhdGVkX3NmaXhlZDY0GCgg", |
| 56 | "AygQEhYKDnJlcGVhdGVkX2Zsb2F0GCkgAygCEhcKD3JlcGVhdGVkX2RvdWJs", |
| 57 | "ZRgqIAMoARIVCg1yZXBlYXRlZF9ib29sGCsgAygIEhcKD3JlcGVhdGVkX3N0", |
| 58 | "cmluZxgsIAMoCRIWCg5yZXBlYXRlZF9ieXRlcxgtIAMoDBJIChdyZXBlYXRl", |
| 59 | "ZF9uZXN0ZWRfbWVzc2FnZRgwIAMoCzInLmNvbmZvcm1hbmNlLlRlc3RBbGxU", |
| 60 | "eXBlcy5OZXN0ZWRNZXNzYWdlEj0KGHJlcGVhdGVkX2ZvcmVpZ25fbWVzc2Fn", |
| 61 | "ZRgxIAMoCzIbLmNvbmZvcm1hbmNlLkZvcmVpZ25NZXNzYWdlEkIKFHJlcGVh", |
| 62 | "dGVkX25lc3RlZF9lbnVtGDMgAygOMiQuY29uZm9ybWFuY2UuVGVzdEFsbFR5", |
| 63 | "cGVzLk5lc3RlZEVudW0SNwoVcmVwZWF0ZWRfZm9yZWlnbl9lbnVtGDQgAygO", |
| 64 | "MhguY29uZm9ybWFuY2UuRm9yZWlnbkVudW0SIQoVcmVwZWF0ZWRfc3RyaW5n", |
| 65 | "X3BpZWNlGDYgAygJQgIIAhIZCg1yZXBlYXRlZF9jb3JkGDcgAygJQgIIARJF", |
| 66 | "Cg9tYXBfaW50MzJfaW50MzIYOCADKAsyLC5jb25mb3JtYW5jZS5UZXN0QWxs", |
| 67 | "VHlwZXMuTWFwSW50MzJJbnQzMkVudHJ5EkUKD21hcF9pbnQ2NF9pbnQ2NBg5", |
| 68 | "IAMoCzIsLmNvbmZvcm1hbmNlLlRlc3RBbGxUeXBlcy5NYXBJbnQ2NEludDY0", |
| 69 | "RW50cnkSSQoRbWFwX3VpbnQzMl91aW50MzIYOiADKAsyLi5jb25mb3JtYW5j", |
| 70 | "ZS5UZXN0QWxsVHlwZXMuTWFwVWludDMyVWludDMyRW50cnkSSQoRbWFwX3Vp", |
| 71 | "bnQ2NF91aW50NjQYOyADKAsyLi5jb25mb3JtYW5jZS5UZXN0QWxsVHlwZXMu", |
| 72 | "TWFwVWludDY0VWludDY0RW50cnkSSQoRbWFwX3NpbnQzMl9zaW50MzIYPCAD", |
| 73 | "KAsyLi5jb25mb3JtYW5jZS5UZXN0QWxsVHlwZXMuTWFwU2ludDMyU2ludDMy", |
| 74 | "RW50cnkSSQoRbWFwX3NpbnQ2NF9zaW50NjQYPSADKAsyLi5jb25mb3JtYW5j", |
| 75 | "ZS5UZXN0QWxsVHlwZXMuTWFwU2ludDY0U2ludDY0RW50cnkSTQoTbWFwX2Zp", |
| 76 | "eGVkMzJfZml4ZWQzMhg+IAMoCzIwLmNvbmZvcm1hbmNlLlRlc3RBbGxUeXBl", |
| 77 | "cy5NYXBGaXhlZDMyRml4ZWQzMkVudHJ5Ek0KE21hcF9maXhlZDY0X2ZpeGVk", |
| 78 | "NjQYPyADKAsyMC5jb25mb3JtYW5jZS5UZXN0QWxsVHlwZXMuTWFwRml4ZWQ2", |
| 79 | "NEZpeGVkNjRFbnRyeRJRChVtYXBfc2ZpeGVkMzJfc2ZpeGVkMzIYQCADKAsy", |
| 80 | "Mi5jb25mb3JtYW5jZS5UZXN0QWxsVHlwZXMuTWFwU2ZpeGVkMzJTZml4ZWQz", |
| 81 | "MkVudHJ5ElEKFW1hcF9zZml4ZWQ2NF9zZml4ZWQ2NBhBIAMoCzIyLmNvbmZv", |
| 82 | "cm1hbmNlLlRlc3RBbGxUeXBlcy5NYXBTZml4ZWQ2NFNmaXhlZDY0RW50cnkS", |
| 83 | "RQoPbWFwX2ludDMyX2Zsb2F0GEIgAygLMiwuY29uZm9ybWFuY2UuVGVzdEFs", |
| 84 | "bFR5cGVzLk1hcEludDMyRmxvYXRFbnRyeRJHChBtYXBfaW50MzJfZG91Ymxl", |
| 85 | "GEMgAygLMi0uY29uZm9ybWFuY2UuVGVzdEFsbFR5cGVzLk1hcEludDMyRG91", |
| 86 | "YmxlRW50cnkSQQoNbWFwX2Jvb2xfYm9vbBhEIAMoCzIqLmNvbmZvcm1hbmNl", |
| 87 | "LlRlc3RBbGxUeXBlcy5NYXBCb29sQm9vbEVudHJ5EkkKEW1hcF9zdHJpbmdf", |
| 88 | "c3RyaW5nGEUgAygLMi4uY29uZm9ybWFuY2UuVGVzdEFsbFR5cGVzLk1hcFN0", |
| 89 | "cmluZ1N0cmluZ0VudHJ5EkcKEG1hcF9zdHJpbmdfYnl0ZXMYRiADKAsyLS5j", |
| 90 | "b25mb3JtYW5jZS5UZXN0QWxsVHlwZXMuTWFwU3RyaW5nQnl0ZXNFbnRyeRJY", |
| 91 | "ChltYXBfc3RyaW5nX25lc3RlZF9tZXNzYWdlGEcgAygLMjUuY29uZm9ybWFu", |
| 92 | "Y2UuVGVzdEFsbFR5cGVzLk1hcFN0cmluZ05lc3RlZE1lc3NhZ2VFbnRyeRJa", |
| 93 | "ChptYXBfc3RyaW5nX2ZvcmVpZ25fbWVzc2FnZRhIIAMoCzI2LmNvbmZvcm1h", |
| 94 | "bmNlLlRlc3RBbGxUeXBlcy5NYXBTdHJpbmdGb3JlaWduTWVzc2FnZUVudHJ5", |
| 95 | "ElIKFm1hcF9zdHJpbmdfbmVzdGVkX2VudW0YSSADKAsyMi5jb25mb3JtYW5j", |
| 96 | "ZS5UZXN0QWxsVHlwZXMuTWFwU3RyaW5nTmVzdGVkRW51bUVudHJ5ElQKF21h", |
| 97 | "cF9zdHJpbmdfZm9yZWlnbl9lbnVtGEogAygLMjMuY29uZm9ybWFuY2UuVGVz", |
| 98 | "dEFsbFR5cGVzLk1hcFN0cmluZ0ZvcmVpZ25FbnVtRW50cnkSFgoMb25lb2Zf", |
| 99 | "dWludDMyGG8gASgNSAASRwoUb25lb2ZfbmVzdGVkX21lc3NhZ2UYcCABKAsy", |
| 100 | "Jy5jb25mb3JtYW5jZS5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2FnZUgAEhYK", |
| 101 | "DG9uZW9mX3N0cmluZxhxIAEoCUgAEhUKC29uZW9mX2J5dGVzGHIgASgMSAAa", |
| 102 | "SgoNTmVzdGVkTWVzc2FnZRIJCgFhGAEgASgFEi4KC2NvcmVjdXJzaXZlGAIg", |
| 103 | "ASgLMhkuY29uZm9ybWFuY2UuVGVzdEFsbFR5cGVzGjQKEk1hcEludDMySW50", |
| 104 | "MzJFbnRyeRILCgNrZXkYASABKAUSDQoFdmFsdWUYAiABKAU6AjgBGjQKEk1h", |
| 105 | "cEludDY0SW50NjRFbnRyeRILCgNrZXkYASABKAMSDQoFdmFsdWUYAiABKAM6", |
| 106 | "AjgBGjYKFE1hcFVpbnQzMlVpbnQzMkVudHJ5EgsKA2tleRgBIAEoDRINCgV2", |
| 107 | "YWx1ZRgCIAEoDToCOAEaNgoUTWFwVWludDY0VWludDY0RW50cnkSCwoDa2V5", |
| 108 | "GAEgASgEEg0KBXZhbHVlGAIgASgEOgI4ARo2ChRNYXBTaW50MzJTaW50MzJF", |
| 109 | "bnRyeRILCgNrZXkYASABKBESDQoFdmFsdWUYAiABKBE6AjgBGjYKFE1hcFNp", |
| 110 | "bnQ2NFNpbnQ2NEVudHJ5EgsKA2tleRgBIAEoEhINCgV2YWx1ZRgCIAEoEjoC", |
| 111 | "OAEaOAoWTWFwRml4ZWQzMkZpeGVkMzJFbnRyeRILCgNrZXkYASABKAcSDQoF", |
| 112 | "dmFsdWUYAiABKAc6AjgBGjgKFk1hcEZpeGVkNjRGaXhlZDY0RW50cnkSCwoD", |
| 113 | "a2V5GAEgASgGEg0KBXZhbHVlGAIgASgGOgI4ARo6ChhNYXBTZml4ZWQzMlNm", |
| 114 | "aXhlZDMyRW50cnkSCwoDa2V5GAEgASgPEg0KBXZhbHVlGAIgASgPOgI4ARo6", |
| 115 | "ChhNYXBTZml4ZWQ2NFNmaXhlZDY0RW50cnkSCwoDa2V5GAEgASgQEg0KBXZh", |
| 116 | "bHVlGAIgASgQOgI4ARo0ChJNYXBJbnQzMkZsb2F0RW50cnkSCwoDa2V5GAEg", |
| 117 | "ASgFEg0KBXZhbHVlGAIgASgCOgI4ARo1ChNNYXBJbnQzMkRvdWJsZUVudHJ5", |
| 118 | "EgsKA2tleRgBIAEoBRINCgV2YWx1ZRgCIAEoAToCOAEaMgoQTWFwQm9vbEJv", |
| 119 | "b2xFbnRyeRILCgNrZXkYASABKAgSDQoFdmFsdWUYAiABKAg6AjgBGjYKFE1h", |
| 120 | "cFN0cmluZ1N0cmluZ0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEo", |
| 121 | "CToCOAEaNQoTTWFwU3RyaW5nQnl0ZXNFbnRyeRILCgNrZXkYASABKAkSDQoF", |
| 122 | "dmFsdWUYAiABKAw6AjgBGmYKG01hcFN0cmluZ05lc3RlZE1lc3NhZ2VFbnRy", |
| 123 | "eRILCgNrZXkYASABKAkSNgoFdmFsdWUYAiABKAsyJy5jb25mb3JtYW5jZS5U", |
| 124 | "ZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2FnZToCOAEaWwocTWFwU3RyaW5nRm9y", |
| 125 | "ZWlnbk1lc3NhZ2VFbnRyeRILCgNrZXkYASABKAkSKgoFdmFsdWUYAiABKAsy", |
| 126 | "Gy5jb25mb3JtYW5jZS5Gb3JlaWduTWVzc2FnZToCOAEaYAoYTWFwU3RyaW5n", |
| 127 | "TmVzdGVkRW51bUVudHJ5EgsKA2tleRgBIAEoCRIzCgV2YWx1ZRgCIAEoDjIk", |
| 128 | "LmNvbmZvcm1hbmNlLlRlc3RBbGxUeXBlcy5OZXN0ZWRFbnVtOgI4ARpVChlN", |
| 129 | "YXBTdHJpbmdGb3JlaWduRW51bUVudHJ5EgsKA2tleRgBIAEoCRInCgV2YWx1", |
| 130 | "ZRgCIAEoDjIYLmNvbmZvcm1hbmNlLkZvcmVpZ25FbnVtOgI4ASI5CgpOZXN0", |
| 131 | "ZWRFbnVtEgcKA0ZPTxAAEgcKA0JBUhABEgcKA0JBWhACEhAKA05FRxD/////", |
| 132 | "//////8BQg0KC29uZW9mX2ZpZWxkIhsKDkZvcmVpZ25NZXNzYWdlEgkKAWMY", |
| 133 | "ASABKAUqNQoKV2lyZUZvcm1hdBIPCgtVTlNQRUNJRklFRBAAEgwKCFBST1RP", |
| 134 | "QlVGEAESCAoESlNPThACKkAKC0ZvcmVpZ25FbnVtEg8KC0ZPUkVJR05fRk9P", |
| 135 | "EAASDwoLRk9SRUlHTl9CQVIQARIPCgtGT1JFSUdOX0JBWhACQiEKH2NvbS5n", |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 136 | "b29nbGUucHJvdG9idWYuY29uZm9ybWFuY2ViBnByb3RvMw==")); |
| 137 | descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
| 138 | new pbr::FileDescriptor[] { }, |
| 139 | new pbr::GeneratedCodeInfo(new[] {typeof(global::Conformance.WireFormat), typeof(global::Conformance.ForeignEnum), }, new pbr::GeneratedCodeInfo[] { |
| 140 | new pbr::GeneratedCodeInfo(typeof(global::Conformance.ConformanceRequest), new[]{ "ProtobufPayload", "JsonPayload", "RequestedOutputFormat" }, new[]{ "Payload" }, null, null), |
| 141 | new pbr::GeneratedCodeInfo(typeof(global::Conformance.ConformanceResponse), new[]{ "ParseError", "RuntimeError", "ProtobufPayload", "JsonPayload", "Skipped" }, new[]{ "Result" }, null, null), |
| 142 | new pbr::GeneratedCodeInfo(typeof(global::Conformance.TestAllTypes), new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalStringPiece", "OptionalCord", "RecursiveMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedStringPiece", "RepeatedCord", "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapStringBytes", "MapStringNestedMessage", "MapStringForeignMessage", "MapStringNestedEnum", "MapStringForeignEnum", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes" }, new[]{ "OneofField" }, new[]{ typeof(global::Conformance.TestAllTypes.Types.NestedEnum) }, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::Conformance.TestAllTypes.Types.NestedMessage), new[]{ "A", "Corecursive" }, null, null, null), |
| 143 | null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }), |
| 144 | new pbr::GeneratedCodeInfo(typeof(global::Conformance.ForeignMessage), new[]{ "C" }, null, null, null) |
| 145 | })); |
| 146 | } |
| 147 | #endregion |
| 148 | |
| 149 | } |
| 150 | #region Enums |
| 151 | public enum WireFormat { |
| 152 | UNSPECIFIED = 0, |
| 153 | PROTOBUF = 1, |
| 154 | JSON = 2, |
| 155 | } |
| 156 | |
| 157 | public enum ForeignEnum { |
| 158 | FOREIGN_FOO = 0, |
| 159 | FOREIGN_BAR = 1, |
| 160 | FOREIGN_BAZ = 2, |
| 161 | } |
| 162 | |
| 163 | #endregion |
| 164 | |
| 165 | #region Messages |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 166 | /// <summary> |
| 167 | /// Represents a single test case's input. The testee should: |
Jon Skeet | cff900e | 2015-11-06 18:38:31 +0000 | [diff] [blame^] | 168 | /// |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 169 | /// 1. parse this proto (which should always succeed) |
| 170 | /// 2. parse the protobuf or JSON payload in "payload" (which may fail) |
| 171 | /// 3. if the parse succeeded, serialize the message in the requested format. |
| 172 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 173 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 174 | public sealed partial class ConformanceRequest : pb::IMessage<ConformanceRequest> { |
| 175 | private static readonly pb::MessageParser<ConformanceRequest> _parser = new pb::MessageParser<ConformanceRequest>(() => new ConformanceRequest()); |
| 176 | public static pb::MessageParser<ConformanceRequest> Parser { get { return _parser; } } |
| 177 | |
| 178 | public static pbr::MessageDescriptor Descriptor { |
| 179 | get { return global::Conformance.Conformance.Descriptor.MessageTypes[0]; } |
| 180 | } |
| 181 | |
| 182 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 183 | get { return Descriptor; } |
| 184 | } |
| 185 | |
| 186 | public ConformanceRequest() { |
| 187 | OnConstruction(); |
| 188 | } |
| 189 | |
| 190 | partial void OnConstruction(); |
| 191 | |
| 192 | public ConformanceRequest(ConformanceRequest other) : this() { |
| 193 | requestedOutputFormat_ = other.requestedOutputFormat_; |
| 194 | switch (other.PayloadCase) { |
| 195 | case PayloadOneofCase.ProtobufPayload: |
| 196 | ProtobufPayload = other.ProtobufPayload; |
| 197 | break; |
| 198 | case PayloadOneofCase.JsonPayload: |
| 199 | JsonPayload = other.JsonPayload; |
| 200 | break; |
| 201 | } |
| 202 | |
| 203 | } |
| 204 | |
| 205 | public ConformanceRequest Clone() { |
| 206 | return new ConformanceRequest(this); |
| 207 | } |
| 208 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 209 | /// <summary>Field number for the "protobuf_payload" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 210 | public const int ProtobufPayloadFieldNumber = 1; |
| 211 | public pb::ByteString ProtobufPayload { |
| 212 | get { return payloadCase_ == PayloadOneofCase.ProtobufPayload ? (pb::ByteString) payload_ : pb::ByteString.Empty; } |
| 213 | set { |
| 214 | payload_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 215 | payloadCase_ = PayloadOneofCase.ProtobufPayload; |
| 216 | } |
| 217 | } |
| 218 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 219 | /// <summary>Field number for the "json_payload" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 220 | public const int JsonPayloadFieldNumber = 2; |
| 221 | public string JsonPayload { |
| 222 | get { return payloadCase_ == PayloadOneofCase.JsonPayload ? (string) payload_ : ""; } |
| 223 | set { |
| 224 | payload_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 225 | payloadCase_ = PayloadOneofCase.JsonPayload; |
| 226 | } |
| 227 | } |
| 228 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 229 | /// <summary>Field number for the "requested_output_format" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 230 | public const int RequestedOutputFormatFieldNumber = 3; |
| 231 | private global::Conformance.WireFormat requestedOutputFormat_ = global::Conformance.WireFormat.UNSPECIFIED; |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 232 | /// <summary> |
| 233 | /// Which format should the testee serialize its message to? |
| 234 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 235 | public global::Conformance.WireFormat RequestedOutputFormat { |
| 236 | get { return requestedOutputFormat_; } |
| 237 | set { |
| 238 | requestedOutputFormat_ = value; |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | private object payload_; |
Jon Skeet | 6bbbdfa | 2015-09-30 06:59:38 +0100 | [diff] [blame] | 243 | /// <summary>Enum of possible cases for the "payload" oneof.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 244 | public enum PayloadOneofCase { |
| 245 | None = 0, |
| 246 | ProtobufPayload = 1, |
| 247 | JsonPayload = 2, |
| 248 | } |
| 249 | private PayloadOneofCase payloadCase_ = PayloadOneofCase.None; |
| 250 | public PayloadOneofCase PayloadCase { |
| 251 | get { return payloadCase_; } |
| 252 | } |
| 253 | |
| 254 | public void ClearPayload() { |
| 255 | payloadCase_ = PayloadOneofCase.None; |
| 256 | payload_ = null; |
| 257 | } |
| 258 | |
| 259 | public override bool Equals(object other) { |
| 260 | return Equals(other as ConformanceRequest); |
| 261 | } |
| 262 | |
| 263 | public bool Equals(ConformanceRequest other) { |
| 264 | if (ReferenceEquals(other, null)) { |
| 265 | return false; |
| 266 | } |
| 267 | if (ReferenceEquals(other, this)) { |
| 268 | return true; |
| 269 | } |
| 270 | if (ProtobufPayload != other.ProtobufPayload) return false; |
| 271 | if (JsonPayload != other.JsonPayload) return false; |
| 272 | if (RequestedOutputFormat != other.RequestedOutputFormat) return false; |
Jon Skeet | 55313c9 | 2015-10-24 06:46:02 +0100 | [diff] [blame] | 273 | if (PayloadCase != other.PayloadCase) return false; |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 274 | return true; |
| 275 | } |
| 276 | |
| 277 | public override int GetHashCode() { |
| 278 | int hash = 1; |
| 279 | if (payloadCase_ == PayloadOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode(); |
| 280 | if (payloadCase_ == PayloadOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode(); |
| 281 | if (RequestedOutputFormat != global::Conformance.WireFormat.UNSPECIFIED) hash ^= RequestedOutputFormat.GetHashCode(); |
Jon Skeet | 55313c9 | 2015-10-24 06:46:02 +0100 | [diff] [blame] | 282 | hash ^= (int) payloadCase_; |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 283 | return hash; |
| 284 | } |
| 285 | |
| 286 | public override string ToString() { |
| 287 | return pb::JsonFormatter.Default.Format(this); |
| 288 | } |
| 289 | |
| 290 | public void WriteTo(pb::CodedOutputStream output) { |
| 291 | if (payloadCase_ == PayloadOneofCase.ProtobufPayload) { |
| 292 | output.WriteRawTag(10); |
| 293 | output.WriteBytes(ProtobufPayload); |
| 294 | } |
| 295 | if (payloadCase_ == PayloadOneofCase.JsonPayload) { |
| 296 | output.WriteRawTag(18); |
| 297 | output.WriteString(JsonPayload); |
| 298 | } |
| 299 | if (RequestedOutputFormat != global::Conformance.WireFormat.UNSPECIFIED) { |
| 300 | output.WriteRawTag(24); |
| 301 | output.WriteEnum((int) RequestedOutputFormat); |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | public int CalculateSize() { |
| 306 | int size = 0; |
| 307 | if (payloadCase_ == PayloadOneofCase.ProtobufPayload) { |
| 308 | size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload); |
| 309 | } |
| 310 | if (payloadCase_ == PayloadOneofCase.JsonPayload) { |
| 311 | size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload); |
| 312 | } |
| 313 | if (RequestedOutputFormat != global::Conformance.WireFormat.UNSPECIFIED) { |
| 314 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RequestedOutputFormat); |
| 315 | } |
| 316 | return size; |
| 317 | } |
| 318 | |
| 319 | public void MergeFrom(ConformanceRequest other) { |
| 320 | if (other == null) { |
| 321 | return; |
| 322 | } |
| 323 | if (other.RequestedOutputFormat != global::Conformance.WireFormat.UNSPECIFIED) { |
| 324 | RequestedOutputFormat = other.RequestedOutputFormat; |
| 325 | } |
| 326 | switch (other.PayloadCase) { |
| 327 | case PayloadOneofCase.ProtobufPayload: |
| 328 | ProtobufPayload = other.ProtobufPayload; |
| 329 | break; |
| 330 | case PayloadOneofCase.JsonPayload: |
| 331 | JsonPayload = other.JsonPayload; |
| 332 | break; |
| 333 | } |
| 334 | |
| 335 | } |
| 336 | |
| 337 | public void MergeFrom(pb::CodedInputStream input) { |
| 338 | uint tag; |
Jon Skeet | 1a57ad8 | 2015-08-05 11:23:52 +0100 | [diff] [blame] | 339 | while ((tag = input.ReadTag()) != 0) { |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 340 | switch(tag) { |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 341 | default: |
Jon Skeet | 5bdc572 | 2015-08-06 11:40:43 +0100 | [diff] [blame] | 342 | input.SkipLastField(); |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 343 | break; |
| 344 | case 10: { |
| 345 | ProtobufPayload = input.ReadBytes(); |
| 346 | break; |
| 347 | } |
| 348 | case 18: { |
| 349 | JsonPayload = input.ReadString(); |
| 350 | break; |
| 351 | } |
| 352 | case 24: { |
| 353 | requestedOutputFormat_ = (global::Conformance.WireFormat) input.ReadEnum(); |
| 354 | break; |
| 355 | } |
| 356 | } |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | } |
| 361 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 362 | /// <summary> |
| 363 | /// Represents a single test case's output. |
| 364 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 365 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 366 | public sealed partial class ConformanceResponse : pb::IMessage<ConformanceResponse> { |
| 367 | private static readonly pb::MessageParser<ConformanceResponse> _parser = new pb::MessageParser<ConformanceResponse>(() => new ConformanceResponse()); |
| 368 | public static pb::MessageParser<ConformanceResponse> Parser { get { return _parser; } } |
| 369 | |
| 370 | public static pbr::MessageDescriptor Descriptor { |
| 371 | get { return global::Conformance.Conformance.Descriptor.MessageTypes[1]; } |
| 372 | } |
| 373 | |
| 374 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 375 | get { return Descriptor; } |
| 376 | } |
| 377 | |
| 378 | public ConformanceResponse() { |
| 379 | OnConstruction(); |
| 380 | } |
| 381 | |
| 382 | partial void OnConstruction(); |
| 383 | |
| 384 | public ConformanceResponse(ConformanceResponse other) : this() { |
| 385 | switch (other.ResultCase) { |
| 386 | case ResultOneofCase.ParseError: |
| 387 | ParseError = other.ParseError; |
| 388 | break; |
| 389 | case ResultOneofCase.RuntimeError: |
| 390 | RuntimeError = other.RuntimeError; |
| 391 | break; |
| 392 | case ResultOneofCase.ProtobufPayload: |
| 393 | ProtobufPayload = other.ProtobufPayload; |
| 394 | break; |
| 395 | case ResultOneofCase.JsonPayload: |
| 396 | JsonPayload = other.JsonPayload; |
| 397 | break; |
| 398 | case ResultOneofCase.Skipped: |
| 399 | Skipped = other.Skipped; |
| 400 | break; |
| 401 | } |
| 402 | |
| 403 | } |
| 404 | |
| 405 | public ConformanceResponse Clone() { |
| 406 | return new ConformanceResponse(this); |
| 407 | } |
| 408 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 409 | /// <summary>Field number for the "parse_error" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 410 | public const int ParseErrorFieldNumber = 1; |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 411 | /// <summary> |
| 412 | /// This string should be set to indicate parsing failed. The string can |
| 413 | /// provide more information about the parse error if it is available. |
Jon Skeet | cff900e | 2015-11-06 18:38:31 +0000 | [diff] [blame^] | 414 | /// |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 415 | /// Setting this string does not necessarily mean the testee failed the |
| 416 | /// test. Some of the test cases are intentionally invalid input. |
| 417 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 418 | public string ParseError { |
| 419 | get { return resultCase_ == ResultOneofCase.ParseError ? (string) result_ : ""; } |
| 420 | set { |
| 421 | result_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 422 | resultCase_ = ResultOneofCase.ParseError; |
| 423 | } |
| 424 | } |
| 425 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 426 | /// <summary>Field number for the "runtime_error" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 427 | public const int RuntimeErrorFieldNumber = 2; |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 428 | /// <summary> |
| 429 | /// This should be set if some other error occurred. This will always |
| 430 | /// indicate that the test failed. The string can provide more information |
| 431 | /// about the failure. |
| 432 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 433 | public string RuntimeError { |
| 434 | get { return resultCase_ == ResultOneofCase.RuntimeError ? (string) result_ : ""; } |
| 435 | set { |
| 436 | result_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 437 | resultCase_ = ResultOneofCase.RuntimeError; |
| 438 | } |
| 439 | } |
| 440 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 441 | /// <summary>Field number for the "protobuf_payload" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 442 | public const int ProtobufPayloadFieldNumber = 3; |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 443 | /// <summary> |
| 444 | /// If the input was successfully parsed and the requested output was |
| 445 | /// protobuf, serialize it to protobuf and set it in this field. |
| 446 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 447 | public pb::ByteString ProtobufPayload { |
| 448 | get { return resultCase_ == ResultOneofCase.ProtobufPayload ? (pb::ByteString) result_ : pb::ByteString.Empty; } |
| 449 | set { |
| 450 | result_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 451 | resultCase_ = ResultOneofCase.ProtobufPayload; |
| 452 | } |
| 453 | } |
| 454 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 455 | /// <summary>Field number for the "json_payload" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 456 | public const int JsonPayloadFieldNumber = 4; |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 457 | /// <summary> |
| 458 | /// If the input was successfully parsed and the requested output was JSON, |
| 459 | /// serialize to JSON and set it in this field. |
| 460 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 461 | public string JsonPayload { |
| 462 | get { return resultCase_ == ResultOneofCase.JsonPayload ? (string) result_ : ""; } |
| 463 | set { |
| 464 | result_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 465 | resultCase_ = ResultOneofCase.JsonPayload; |
| 466 | } |
| 467 | } |
| 468 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 469 | /// <summary>Field number for the "skipped" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 470 | public const int SkippedFieldNumber = 5; |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 471 | /// <summary> |
| 472 | /// For when the testee skipped the test, likely because a certain feature |
| 473 | /// wasn't supported, like JSON input/output. |
| 474 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 475 | public string Skipped { |
| 476 | get { return resultCase_ == ResultOneofCase.Skipped ? (string) result_ : ""; } |
| 477 | set { |
| 478 | result_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 479 | resultCase_ = ResultOneofCase.Skipped; |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | private object result_; |
Jon Skeet | 6bbbdfa | 2015-09-30 06:59:38 +0100 | [diff] [blame] | 484 | /// <summary>Enum of possible cases for the "result" oneof.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 485 | public enum ResultOneofCase { |
| 486 | None = 0, |
| 487 | ParseError = 1, |
| 488 | RuntimeError = 2, |
| 489 | ProtobufPayload = 3, |
| 490 | JsonPayload = 4, |
| 491 | Skipped = 5, |
| 492 | } |
| 493 | private ResultOneofCase resultCase_ = ResultOneofCase.None; |
| 494 | public ResultOneofCase ResultCase { |
| 495 | get { return resultCase_; } |
| 496 | } |
| 497 | |
| 498 | public void ClearResult() { |
| 499 | resultCase_ = ResultOneofCase.None; |
| 500 | result_ = null; |
| 501 | } |
| 502 | |
| 503 | public override bool Equals(object other) { |
| 504 | return Equals(other as ConformanceResponse); |
| 505 | } |
| 506 | |
| 507 | public bool Equals(ConformanceResponse other) { |
| 508 | if (ReferenceEquals(other, null)) { |
| 509 | return false; |
| 510 | } |
| 511 | if (ReferenceEquals(other, this)) { |
| 512 | return true; |
| 513 | } |
| 514 | if (ParseError != other.ParseError) return false; |
| 515 | if (RuntimeError != other.RuntimeError) return false; |
| 516 | if (ProtobufPayload != other.ProtobufPayload) return false; |
| 517 | if (JsonPayload != other.JsonPayload) return false; |
| 518 | if (Skipped != other.Skipped) return false; |
Jon Skeet | 55313c9 | 2015-10-24 06:46:02 +0100 | [diff] [blame] | 519 | if (ResultCase != other.ResultCase) return false; |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 520 | return true; |
| 521 | } |
| 522 | |
| 523 | public override int GetHashCode() { |
| 524 | int hash = 1; |
| 525 | if (resultCase_ == ResultOneofCase.ParseError) hash ^= ParseError.GetHashCode(); |
| 526 | if (resultCase_ == ResultOneofCase.RuntimeError) hash ^= RuntimeError.GetHashCode(); |
| 527 | if (resultCase_ == ResultOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode(); |
| 528 | if (resultCase_ == ResultOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode(); |
| 529 | if (resultCase_ == ResultOneofCase.Skipped) hash ^= Skipped.GetHashCode(); |
Jon Skeet | 55313c9 | 2015-10-24 06:46:02 +0100 | [diff] [blame] | 530 | hash ^= (int) resultCase_; |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 531 | return hash; |
| 532 | } |
| 533 | |
| 534 | public override string ToString() { |
| 535 | return pb::JsonFormatter.Default.Format(this); |
| 536 | } |
| 537 | |
| 538 | public void WriteTo(pb::CodedOutputStream output) { |
| 539 | if (resultCase_ == ResultOneofCase.ParseError) { |
| 540 | output.WriteRawTag(10); |
| 541 | output.WriteString(ParseError); |
| 542 | } |
| 543 | if (resultCase_ == ResultOneofCase.RuntimeError) { |
| 544 | output.WriteRawTag(18); |
| 545 | output.WriteString(RuntimeError); |
| 546 | } |
| 547 | if (resultCase_ == ResultOneofCase.ProtobufPayload) { |
| 548 | output.WriteRawTag(26); |
| 549 | output.WriteBytes(ProtobufPayload); |
| 550 | } |
| 551 | if (resultCase_ == ResultOneofCase.JsonPayload) { |
| 552 | output.WriteRawTag(34); |
| 553 | output.WriteString(JsonPayload); |
| 554 | } |
| 555 | if (resultCase_ == ResultOneofCase.Skipped) { |
| 556 | output.WriteRawTag(42); |
| 557 | output.WriteString(Skipped); |
| 558 | } |
| 559 | } |
| 560 | |
| 561 | public int CalculateSize() { |
| 562 | int size = 0; |
| 563 | if (resultCase_ == ResultOneofCase.ParseError) { |
| 564 | size += 1 + pb::CodedOutputStream.ComputeStringSize(ParseError); |
| 565 | } |
| 566 | if (resultCase_ == ResultOneofCase.RuntimeError) { |
| 567 | size += 1 + pb::CodedOutputStream.ComputeStringSize(RuntimeError); |
| 568 | } |
| 569 | if (resultCase_ == ResultOneofCase.ProtobufPayload) { |
| 570 | size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload); |
| 571 | } |
| 572 | if (resultCase_ == ResultOneofCase.JsonPayload) { |
| 573 | size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload); |
| 574 | } |
| 575 | if (resultCase_ == ResultOneofCase.Skipped) { |
| 576 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Skipped); |
| 577 | } |
| 578 | return size; |
| 579 | } |
| 580 | |
| 581 | public void MergeFrom(ConformanceResponse other) { |
| 582 | if (other == null) { |
| 583 | return; |
| 584 | } |
| 585 | switch (other.ResultCase) { |
| 586 | case ResultOneofCase.ParseError: |
| 587 | ParseError = other.ParseError; |
| 588 | break; |
| 589 | case ResultOneofCase.RuntimeError: |
| 590 | RuntimeError = other.RuntimeError; |
| 591 | break; |
| 592 | case ResultOneofCase.ProtobufPayload: |
| 593 | ProtobufPayload = other.ProtobufPayload; |
| 594 | break; |
| 595 | case ResultOneofCase.JsonPayload: |
| 596 | JsonPayload = other.JsonPayload; |
| 597 | break; |
| 598 | case ResultOneofCase.Skipped: |
| 599 | Skipped = other.Skipped; |
| 600 | break; |
| 601 | } |
| 602 | |
| 603 | } |
| 604 | |
| 605 | public void MergeFrom(pb::CodedInputStream input) { |
| 606 | uint tag; |
Jon Skeet | 1a57ad8 | 2015-08-05 11:23:52 +0100 | [diff] [blame] | 607 | while ((tag = input.ReadTag()) != 0) { |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 608 | switch(tag) { |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 609 | default: |
Jon Skeet | 5bdc572 | 2015-08-06 11:40:43 +0100 | [diff] [blame] | 610 | input.SkipLastField(); |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 611 | break; |
| 612 | case 10: { |
| 613 | ParseError = input.ReadString(); |
| 614 | break; |
| 615 | } |
| 616 | case 18: { |
| 617 | RuntimeError = input.ReadString(); |
| 618 | break; |
| 619 | } |
| 620 | case 26: { |
| 621 | ProtobufPayload = input.ReadBytes(); |
| 622 | break; |
| 623 | } |
| 624 | case 34: { |
| 625 | JsonPayload = input.ReadString(); |
| 626 | break; |
| 627 | } |
| 628 | case 42: { |
| 629 | Skipped = input.ReadString(); |
| 630 | break; |
| 631 | } |
| 632 | } |
| 633 | } |
| 634 | } |
| 635 | |
| 636 | } |
| 637 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 638 | /// <summary> |
| 639 | /// This proto includes every type of field in both singular and repeated |
| 640 | /// forms. |
| 641 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 642 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 643 | public sealed partial class TestAllTypes : pb::IMessage<TestAllTypes> { |
| 644 | private static readonly pb::MessageParser<TestAllTypes> _parser = new pb::MessageParser<TestAllTypes>(() => new TestAllTypes()); |
| 645 | public static pb::MessageParser<TestAllTypes> Parser { get { return _parser; } } |
| 646 | |
| 647 | public static pbr::MessageDescriptor Descriptor { |
| 648 | get { return global::Conformance.Conformance.Descriptor.MessageTypes[2]; } |
| 649 | } |
| 650 | |
| 651 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 652 | get { return Descriptor; } |
| 653 | } |
| 654 | |
| 655 | public TestAllTypes() { |
| 656 | OnConstruction(); |
| 657 | } |
| 658 | |
| 659 | partial void OnConstruction(); |
| 660 | |
| 661 | public TestAllTypes(TestAllTypes other) : this() { |
| 662 | optionalInt32_ = other.optionalInt32_; |
| 663 | optionalInt64_ = other.optionalInt64_; |
| 664 | optionalUint32_ = other.optionalUint32_; |
| 665 | optionalUint64_ = other.optionalUint64_; |
| 666 | optionalSint32_ = other.optionalSint32_; |
| 667 | optionalSint64_ = other.optionalSint64_; |
| 668 | optionalFixed32_ = other.optionalFixed32_; |
| 669 | optionalFixed64_ = other.optionalFixed64_; |
| 670 | optionalSfixed32_ = other.optionalSfixed32_; |
| 671 | optionalSfixed64_ = other.optionalSfixed64_; |
| 672 | optionalFloat_ = other.optionalFloat_; |
| 673 | optionalDouble_ = other.optionalDouble_; |
| 674 | optionalBool_ = other.optionalBool_; |
| 675 | optionalString_ = other.optionalString_; |
| 676 | optionalBytes_ = other.optionalBytes_; |
| 677 | OptionalNestedMessage = other.optionalNestedMessage_ != null ? other.OptionalNestedMessage.Clone() : null; |
| 678 | OptionalForeignMessage = other.optionalForeignMessage_ != null ? other.OptionalForeignMessage.Clone() : null; |
| 679 | optionalNestedEnum_ = other.optionalNestedEnum_; |
| 680 | optionalForeignEnum_ = other.optionalForeignEnum_; |
| 681 | optionalStringPiece_ = other.optionalStringPiece_; |
| 682 | optionalCord_ = other.optionalCord_; |
| 683 | RecursiveMessage = other.recursiveMessage_ != null ? other.RecursiveMessage.Clone() : null; |
| 684 | repeatedInt32_ = other.repeatedInt32_.Clone(); |
| 685 | repeatedInt64_ = other.repeatedInt64_.Clone(); |
| 686 | repeatedUint32_ = other.repeatedUint32_.Clone(); |
| 687 | repeatedUint64_ = other.repeatedUint64_.Clone(); |
| 688 | repeatedSint32_ = other.repeatedSint32_.Clone(); |
| 689 | repeatedSint64_ = other.repeatedSint64_.Clone(); |
| 690 | repeatedFixed32_ = other.repeatedFixed32_.Clone(); |
| 691 | repeatedFixed64_ = other.repeatedFixed64_.Clone(); |
| 692 | repeatedSfixed32_ = other.repeatedSfixed32_.Clone(); |
| 693 | repeatedSfixed64_ = other.repeatedSfixed64_.Clone(); |
| 694 | repeatedFloat_ = other.repeatedFloat_.Clone(); |
| 695 | repeatedDouble_ = other.repeatedDouble_.Clone(); |
| 696 | repeatedBool_ = other.repeatedBool_.Clone(); |
| 697 | repeatedString_ = other.repeatedString_.Clone(); |
| 698 | repeatedBytes_ = other.repeatedBytes_.Clone(); |
| 699 | repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone(); |
| 700 | repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone(); |
| 701 | repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone(); |
| 702 | repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone(); |
| 703 | repeatedStringPiece_ = other.repeatedStringPiece_.Clone(); |
| 704 | repeatedCord_ = other.repeatedCord_.Clone(); |
| 705 | mapInt32Int32_ = other.mapInt32Int32_.Clone(); |
| 706 | mapInt64Int64_ = other.mapInt64Int64_.Clone(); |
| 707 | mapUint32Uint32_ = other.mapUint32Uint32_.Clone(); |
| 708 | mapUint64Uint64_ = other.mapUint64Uint64_.Clone(); |
| 709 | mapSint32Sint32_ = other.mapSint32Sint32_.Clone(); |
| 710 | mapSint64Sint64_ = other.mapSint64Sint64_.Clone(); |
| 711 | mapFixed32Fixed32_ = other.mapFixed32Fixed32_.Clone(); |
| 712 | mapFixed64Fixed64_ = other.mapFixed64Fixed64_.Clone(); |
| 713 | mapSfixed32Sfixed32_ = other.mapSfixed32Sfixed32_.Clone(); |
| 714 | mapSfixed64Sfixed64_ = other.mapSfixed64Sfixed64_.Clone(); |
| 715 | mapInt32Float_ = other.mapInt32Float_.Clone(); |
| 716 | mapInt32Double_ = other.mapInt32Double_.Clone(); |
| 717 | mapBoolBool_ = other.mapBoolBool_.Clone(); |
| 718 | mapStringString_ = other.mapStringString_.Clone(); |
| 719 | mapStringBytes_ = other.mapStringBytes_.Clone(); |
| 720 | mapStringNestedMessage_ = other.mapStringNestedMessage_.Clone(); |
| 721 | mapStringForeignMessage_ = other.mapStringForeignMessage_.Clone(); |
| 722 | mapStringNestedEnum_ = other.mapStringNestedEnum_.Clone(); |
| 723 | mapStringForeignEnum_ = other.mapStringForeignEnum_.Clone(); |
| 724 | switch (other.OneofFieldCase) { |
| 725 | case OneofFieldOneofCase.OneofUint32: |
| 726 | OneofUint32 = other.OneofUint32; |
| 727 | break; |
| 728 | case OneofFieldOneofCase.OneofNestedMessage: |
| 729 | OneofNestedMessage = other.OneofNestedMessage.Clone(); |
| 730 | break; |
| 731 | case OneofFieldOneofCase.OneofString: |
| 732 | OneofString = other.OneofString; |
| 733 | break; |
| 734 | case OneofFieldOneofCase.OneofBytes: |
| 735 | OneofBytes = other.OneofBytes; |
| 736 | break; |
| 737 | } |
| 738 | |
| 739 | } |
| 740 | |
| 741 | public TestAllTypes Clone() { |
| 742 | return new TestAllTypes(this); |
| 743 | } |
| 744 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 745 | /// <summary>Field number for the "optional_int32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 746 | public const int OptionalInt32FieldNumber = 1; |
| 747 | private int optionalInt32_; |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 748 | /// <summary> |
| 749 | /// Singular |
| 750 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 751 | public int OptionalInt32 { |
| 752 | get { return optionalInt32_; } |
| 753 | set { |
| 754 | optionalInt32_ = value; |
| 755 | } |
| 756 | } |
| 757 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 758 | /// <summary>Field number for the "optional_int64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 759 | public const int OptionalInt64FieldNumber = 2; |
| 760 | private long optionalInt64_; |
| 761 | public long OptionalInt64 { |
| 762 | get { return optionalInt64_; } |
| 763 | set { |
| 764 | optionalInt64_ = value; |
| 765 | } |
| 766 | } |
| 767 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 768 | /// <summary>Field number for the "optional_uint32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 769 | public const int OptionalUint32FieldNumber = 3; |
| 770 | private uint optionalUint32_; |
| 771 | public uint OptionalUint32 { |
| 772 | get { return optionalUint32_; } |
| 773 | set { |
| 774 | optionalUint32_ = value; |
| 775 | } |
| 776 | } |
| 777 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 778 | /// <summary>Field number for the "optional_uint64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 779 | public const int OptionalUint64FieldNumber = 4; |
| 780 | private ulong optionalUint64_; |
| 781 | public ulong OptionalUint64 { |
| 782 | get { return optionalUint64_; } |
| 783 | set { |
| 784 | optionalUint64_ = value; |
| 785 | } |
| 786 | } |
| 787 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 788 | /// <summary>Field number for the "optional_sint32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 789 | public const int OptionalSint32FieldNumber = 5; |
| 790 | private int optionalSint32_; |
| 791 | public int OptionalSint32 { |
| 792 | get { return optionalSint32_; } |
| 793 | set { |
| 794 | optionalSint32_ = value; |
| 795 | } |
| 796 | } |
| 797 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 798 | /// <summary>Field number for the "optional_sint64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 799 | public const int OptionalSint64FieldNumber = 6; |
| 800 | private long optionalSint64_; |
| 801 | public long OptionalSint64 { |
| 802 | get { return optionalSint64_; } |
| 803 | set { |
| 804 | optionalSint64_ = value; |
| 805 | } |
| 806 | } |
| 807 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 808 | /// <summary>Field number for the "optional_fixed32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 809 | public const int OptionalFixed32FieldNumber = 7; |
| 810 | private uint optionalFixed32_; |
| 811 | public uint OptionalFixed32 { |
| 812 | get { return optionalFixed32_; } |
| 813 | set { |
| 814 | optionalFixed32_ = value; |
| 815 | } |
| 816 | } |
| 817 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 818 | /// <summary>Field number for the "optional_fixed64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 819 | public const int OptionalFixed64FieldNumber = 8; |
| 820 | private ulong optionalFixed64_; |
| 821 | public ulong OptionalFixed64 { |
| 822 | get { return optionalFixed64_; } |
| 823 | set { |
| 824 | optionalFixed64_ = value; |
| 825 | } |
| 826 | } |
| 827 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 828 | /// <summary>Field number for the "optional_sfixed32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 829 | public const int OptionalSfixed32FieldNumber = 9; |
| 830 | private int optionalSfixed32_; |
| 831 | public int OptionalSfixed32 { |
| 832 | get { return optionalSfixed32_; } |
| 833 | set { |
| 834 | optionalSfixed32_ = value; |
| 835 | } |
| 836 | } |
| 837 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 838 | /// <summary>Field number for the "optional_sfixed64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 839 | public const int OptionalSfixed64FieldNumber = 10; |
| 840 | private long optionalSfixed64_; |
| 841 | public long OptionalSfixed64 { |
| 842 | get { return optionalSfixed64_; } |
| 843 | set { |
| 844 | optionalSfixed64_ = value; |
| 845 | } |
| 846 | } |
| 847 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 848 | /// <summary>Field number for the "optional_float" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 849 | public const int OptionalFloatFieldNumber = 11; |
| 850 | private float optionalFloat_; |
| 851 | public float OptionalFloat { |
| 852 | get { return optionalFloat_; } |
| 853 | set { |
| 854 | optionalFloat_ = value; |
| 855 | } |
| 856 | } |
| 857 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 858 | /// <summary>Field number for the "optional_double" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 859 | public const int OptionalDoubleFieldNumber = 12; |
| 860 | private double optionalDouble_; |
| 861 | public double OptionalDouble { |
| 862 | get { return optionalDouble_; } |
| 863 | set { |
| 864 | optionalDouble_ = value; |
| 865 | } |
| 866 | } |
| 867 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 868 | /// <summary>Field number for the "optional_bool" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 869 | public const int OptionalBoolFieldNumber = 13; |
| 870 | private bool optionalBool_; |
| 871 | public bool OptionalBool { |
| 872 | get { return optionalBool_; } |
| 873 | set { |
| 874 | optionalBool_ = value; |
| 875 | } |
| 876 | } |
| 877 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 878 | /// <summary>Field number for the "optional_string" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 879 | public const int OptionalStringFieldNumber = 14; |
| 880 | private string optionalString_ = ""; |
| 881 | public string OptionalString { |
| 882 | get { return optionalString_; } |
| 883 | set { |
| 884 | optionalString_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 885 | } |
| 886 | } |
| 887 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 888 | /// <summary>Field number for the "optional_bytes" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 889 | public const int OptionalBytesFieldNumber = 15; |
| 890 | private pb::ByteString optionalBytes_ = pb::ByteString.Empty; |
| 891 | public pb::ByteString OptionalBytes { |
| 892 | get { return optionalBytes_; } |
| 893 | set { |
| 894 | optionalBytes_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 895 | } |
| 896 | } |
| 897 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 898 | /// <summary>Field number for the "optional_nested_message" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 899 | public const int OptionalNestedMessageFieldNumber = 18; |
| 900 | private global::Conformance.TestAllTypes.Types.NestedMessage optionalNestedMessage_; |
| 901 | public global::Conformance.TestAllTypes.Types.NestedMessage OptionalNestedMessage { |
| 902 | get { return optionalNestedMessage_; } |
| 903 | set { |
| 904 | optionalNestedMessage_ = value; |
| 905 | } |
| 906 | } |
| 907 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 908 | /// <summary>Field number for the "optional_foreign_message" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 909 | public const int OptionalForeignMessageFieldNumber = 19; |
| 910 | private global::Conformance.ForeignMessage optionalForeignMessage_; |
| 911 | public global::Conformance.ForeignMessage OptionalForeignMessage { |
| 912 | get { return optionalForeignMessage_; } |
| 913 | set { |
| 914 | optionalForeignMessage_ = value; |
| 915 | } |
| 916 | } |
| 917 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 918 | /// <summary>Field number for the "optional_nested_enum" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 919 | public const int OptionalNestedEnumFieldNumber = 21; |
| 920 | private global::Conformance.TestAllTypes.Types.NestedEnum optionalNestedEnum_ = global::Conformance.TestAllTypes.Types.NestedEnum.FOO; |
| 921 | public global::Conformance.TestAllTypes.Types.NestedEnum OptionalNestedEnum { |
| 922 | get { return optionalNestedEnum_; } |
| 923 | set { |
| 924 | optionalNestedEnum_ = value; |
| 925 | } |
| 926 | } |
| 927 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 928 | /// <summary>Field number for the "optional_foreign_enum" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 929 | public const int OptionalForeignEnumFieldNumber = 22; |
| 930 | private global::Conformance.ForeignEnum optionalForeignEnum_ = global::Conformance.ForeignEnum.FOREIGN_FOO; |
| 931 | public global::Conformance.ForeignEnum OptionalForeignEnum { |
| 932 | get { return optionalForeignEnum_; } |
| 933 | set { |
| 934 | optionalForeignEnum_ = value; |
| 935 | } |
| 936 | } |
| 937 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 938 | /// <summary>Field number for the "optional_string_piece" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 939 | public const int OptionalStringPieceFieldNumber = 24; |
| 940 | private string optionalStringPiece_ = ""; |
| 941 | public string OptionalStringPiece { |
| 942 | get { return optionalStringPiece_; } |
| 943 | set { |
| 944 | optionalStringPiece_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 945 | } |
| 946 | } |
| 947 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 948 | /// <summary>Field number for the "optional_cord" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 949 | public const int OptionalCordFieldNumber = 25; |
| 950 | private string optionalCord_ = ""; |
| 951 | public string OptionalCord { |
| 952 | get { return optionalCord_; } |
| 953 | set { |
| 954 | optionalCord_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 955 | } |
| 956 | } |
| 957 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 958 | /// <summary>Field number for the "recursive_message" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 959 | public const int RecursiveMessageFieldNumber = 27; |
| 960 | private global::Conformance.TestAllTypes recursiveMessage_; |
| 961 | public global::Conformance.TestAllTypes RecursiveMessage { |
| 962 | get { return recursiveMessage_; } |
| 963 | set { |
| 964 | recursiveMessage_ = value; |
| 965 | } |
| 966 | } |
| 967 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 968 | /// <summary>Field number for the "repeated_int32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 969 | public const int RepeatedInt32FieldNumber = 31; |
| 970 | private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec |
| 971 | = pb::FieldCodec.ForInt32(250); |
| 972 | private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedField<int>(); |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 973 | /// <summary> |
| 974 | /// Repeated |
| 975 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 976 | public pbc::RepeatedField<int> RepeatedInt32 { |
| 977 | get { return repeatedInt32_; } |
| 978 | } |
| 979 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 980 | /// <summary>Field number for the "repeated_int64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 981 | public const int RepeatedInt64FieldNumber = 32; |
| 982 | private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec |
| 983 | = pb::FieldCodec.ForInt64(258); |
| 984 | private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::RepeatedField<long>(); |
| 985 | public pbc::RepeatedField<long> RepeatedInt64 { |
| 986 | get { return repeatedInt64_; } |
| 987 | } |
| 988 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 989 | /// <summary>Field number for the "repeated_uint32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 990 | public const int RepeatedUint32FieldNumber = 33; |
| 991 | private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec |
| 992 | = pb::FieldCodec.ForUInt32(266); |
| 993 | private readonly pbc::RepeatedField<uint> repeatedUint32_ = new pbc::RepeatedField<uint>(); |
| 994 | public pbc::RepeatedField<uint> RepeatedUint32 { |
| 995 | get { return repeatedUint32_; } |
| 996 | } |
| 997 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 998 | /// <summary>Field number for the "repeated_uint64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 999 | public const int RepeatedUint64FieldNumber = 34; |
| 1000 | private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec |
| 1001 | = pb::FieldCodec.ForUInt64(274); |
| 1002 | private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::RepeatedField<ulong>(); |
| 1003 | public pbc::RepeatedField<ulong> RepeatedUint64 { |
| 1004 | get { return repeatedUint64_; } |
| 1005 | } |
| 1006 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1007 | /// <summary>Field number for the "repeated_sint32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1008 | public const int RepeatedSint32FieldNumber = 35; |
| 1009 | private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec |
| 1010 | = pb::FieldCodec.ForSInt32(282); |
| 1011 | private readonly pbc::RepeatedField<int> repeatedSint32_ = new pbc::RepeatedField<int>(); |
| 1012 | public pbc::RepeatedField<int> RepeatedSint32 { |
| 1013 | get { return repeatedSint32_; } |
| 1014 | } |
| 1015 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1016 | /// <summary>Field number for the "repeated_sint64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1017 | public const int RepeatedSint64FieldNumber = 36; |
| 1018 | private static readonly pb::FieldCodec<long> _repeated_repeatedSint64_codec |
| 1019 | = pb::FieldCodec.ForSInt64(290); |
| 1020 | private readonly pbc::RepeatedField<long> repeatedSint64_ = new pbc::RepeatedField<long>(); |
| 1021 | public pbc::RepeatedField<long> RepeatedSint64 { |
| 1022 | get { return repeatedSint64_; } |
| 1023 | } |
| 1024 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1025 | /// <summary>Field number for the "repeated_fixed32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1026 | public const int RepeatedFixed32FieldNumber = 37; |
| 1027 | private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec |
| 1028 | = pb::FieldCodec.ForFixed32(298); |
| 1029 | private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::RepeatedField<uint>(); |
| 1030 | public pbc::RepeatedField<uint> RepeatedFixed32 { |
| 1031 | get { return repeatedFixed32_; } |
| 1032 | } |
| 1033 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1034 | /// <summary>Field number for the "repeated_fixed64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1035 | public const int RepeatedFixed64FieldNumber = 38; |
| 1036 | private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_codec |
| 1037 | = pb::FieldCodec.ForFixed64(306); |
| 1038 | private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::RepeatedField<ulong>(); |
| 1039 | public pbc::RepeatedField<ulong> RepeatedFixed64 { |
| 1040 | get { return repeatedFixed64_; } |
| 1041 | } |
| 1042 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1043 | /// <summary>Field number for the "repeated_sfixed32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1044 | public const int RepeatedSfixed32FieldNumber = 39; |
| 1045 | private static readonly pb::FieldCodec<int> _repeated_repeatedSfixed32_codec |
| 1046 | = pb::FieldCodec.ForSFixed32(314); |
| 1047 | private readonly pbc::RepeatedField<int> repeatedSfixed32_ = new pbc::RepeatedField<int>(); |
| 1048 | public pbc::RepeatedField<int> RepeatedSfixed32 { |
| 1049 | get { return repeatedSfixed32_; } |
| 1050 | } |
| 1051 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1052 | /// <summary>Field number for the "repeated_sfixed64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1053 | public const int RepeatedSfixed64FieldNumber = 40; |
| 1054 | private static readonly pb::FieldCodec<long> _repeated_repeatedSfixed64_codec |
| 1055 | = pb::FieldCodec.ForSFixed64(322); |
| 1056 | private readonly pbc::RepeatedField<long> repeatedSfixed64_ = new pbc::RepeatedField<long>(); |
| 1057 | public pbc::RepeatedField<long> RepeatedSfixed64 { |
| 1058 | get { return repeatedSfixed64_; } |
| 1059 | } |
| 1060 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1061 | /// <summary>Field number for the "repeated_float" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1062 | public const int RepeatedFloatFieldNumber = 41; |
| 1063 | private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec |
| 1064 | = pb::FieldCodec.ForFloat(330); |
| 1065 | private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::RepeatedField<float>(); |
| 1066 | public pbc::RepeatedField<float> RepeatedFloat { |
| 1067 | get { return repeatedFloat_; } |
| 1068 | } |
| 1069 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1070 | /// <summary>Field number for the "repeated_double" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1071 | public const int RepeatedDoubleFieldNumber = 42; |
| 1072 | private static readonly pb::FieldCodec<double> _repeated_repeatedDouble_codec |
| 1073 | = pb::FieldCodec.ForDouble(338); |
| 1074 | private readonly pbc::RepeatedField<double> repeatedDouble_ = new pbc::RepeatedField<double>(); |
| 1075 | public pbc::RepeatedField<double> RepeatedDouble { |
| 1076 | get { return repeatedDouble_; } |
| 1077 | } |
| 1078 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1079 | /// <summary>Field number for the "repeated_bool" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1080 | public const int RepeatedBoolFieldNumber = 43; |
| 1081 | private static readonly pb::FieldCodec<bool> _repeated_repeatedBool_codec |
| 1082 | = pb::FieldCodec.ForBool(346); |
| 1083 | private readonly pbc::RepeatedField<bool> repeatedBool_ = new pbc::RepeatedField<bool>(); |
| 1084 | public pbc::RepeatedField<bool> RepeatedBool { |
| 1085 | get { return repeatedBool_; } |
| 1086 | } |
| 1087 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1088 | /// <summary>Field number for the "repeated_string" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1089 | public const int RepeatedStringFieldNumber = 44; |
| 1090 | private static readonly pb::FieldCodec<string> _repeated_repeatedString_codec |
| 1091 | = pb::FieldCodec.ForString(354); |
| 1092 | private readonly pbc::RepeatedField<string> repeatedString_ = new pbc::RepeatedField<string>(); |
| 1093 | public pbc::RepeatedField<string> RepeatedString { |
| 1094 | get { return repeatedString_; } |
| 1095 | } |
| 1096 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1097 | /// <summary>Field number for the "repeated_bytes" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1098 | public const int RepeatedBytesFieldNumber = 45; |
| 1099 | private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedBytes_codec |
| 1100 | = pb::FieldCodec.ForBytes(362); |
| 1101 | private readonly pbc::RepeatedField<pb::ByteString> repeatedBytes_ = new pbc::RepeatedField<pb::ByteString>(); |
| 1102 | public pbc::RepeatedField<pb::ByteString> RepeatedBytes { |
| 1103 | get { return repeatedBytes_; } |
| 1104 | } |
| 1105 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1106 | /// <summary>Field number for the "repeated_nested_message" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1107 | public const int RepeatedNestedMessageFieldNumber = 48; |
| 1108 | private static readonly pb::FieldCodec<global::Conformance.TestAllTypes.Types.NestedMessage> _repeated_repeatedNestedMessage_codec |
| 1109 | = pb::FieldCodec.ForMessage(386, global::Conformance.TestAllTypes.Types.NestedMessage.Parser); |
| 1110 | private readonly pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedMessage>(); |
| 1111 | public pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedMessage> RepeatedNestedMessage { |
| 1112 | get { return repeatedNestedMessage_; } |
| 1113 | } |
| 1114 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1115 | /// <summary>Field number for the "repeated_foreign_message" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1116 | public const int RepeatedForeignMessageFieldNumber = 49; |
| 1117 | private static readonly pb::FieldCodec<global::Conformance.ForeignMessage> _repeated_repeatedForeignMessage_codec |
| 1118 | = pb::FieldCodec.ForMessage(394, global::Conformance.ForeignMessage.Parser); |
| 1119 | private readonly pbc::RepeatedField<global::Conformance.ForeignMessage> repeatedForeignMessage_ = new pbc::RepeatedField<global::Conformance.ForeignMessage>(); |
| 1120 | public pbc::RepeatedField<global::Conformance.ForeignMessage> RepeatedForeignMessage { |
| 1121 | get { return repeatedForeignMessage_; } |
| 1122 | } |
| 1123 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1124 | /// <summary>Field number for the "repeated_nested_enum" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1125 | public const int RepeatedNestedEnumFieldNumber = 51; |
| 1126 | private static readonly pb::FieldCodec<global::Conformance.TestAllTypes.Types.NestedEnum> _repeated_repeatedNestedEnum_codec |
| 1127 | = pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::Conformance.TestAllTypes.Types.NestedEnum) x); |
| 1128 | private readonly pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedEnum>(); |
| 1129 | public pbc::RepeatedField<global::Conformance.TestAllTypes.Types.NestedEnum> RepeatedNestedEnum { |
| 1130 | get { return repeatedNestedEnum_; } |
| 1131 | } |
| 1132 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1133 | /// <summary>Field number for the "repeated_foreign_enum" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1134 | public const int RepeatedForeignEnumFieldNumber = 52; |
| 1135 | private static readonly pb::FieldCodec<global::Conformance.ForeignEnum> _repeated_repeatedForeignEnum_codec |
| 1136 | = pb::FieldCodec.ForEnum(418, x => (int) x, x => (global::Conformance.ForeignEnum) x); |
| 1137 | private readonly pbc::RepeatedField<global::Conformance.ForeignEnum> repeatedForeignEnum_ = new pbc::RepeatedField<global::Conformance.ForeignEnum>(); |
| 1138 | public pbc::RepeatedField<global::Conformance.ForeignEnum> RepeatedForeignEnum { |
| 1139 | get { return repeatedForeignEnum_; } |
| 1140 | } |
| 1141 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1142 | /// <summary>Field number for the "repeated_string_piece" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1143 | public const int RepeatedStringPieceFieldNumber = 54; |
| 1144 | private static readonly pb::FieldCodec<string> _repeated_repeatedStringPiece_codec |
| 1145 | = pb::FieldCodec.ForString(434); |
| 1146 | private readonly pbc::RepeatedField<string> repeatedStringPiece_ = new pbc::RepeatedField<string>(); |
| 1147 | public pbc::RepeatedField<string> RepeatedStringPiece { |
| 1148 | get { return repeatedStringPiece_; } |
| 1149 | } |
| 1150 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1151 | /// <summary>Field number for the "repeated_cord" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1152 | public const int RepeatedCordFieldNumber = 55; |
| 1153 | private static readonly pb::FieldCodec<string> _repeated_repeatedCord_codec |
| 1154 | = pb::FieldCodec.ForString(442); |
| 1155 | private readonly pbc::RepeatedField<string> repeatedCord_ = new pbc::RepeatedField<string>(); |
| 1156 | public pbc::RepeatedField<string> RepeatedCord { |
| 1157 | get { return repeatedCord_; } |
| 1158 | } |
| 1159 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1160 | /// <summary>Field number for the "map_int32_int32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1161 | public const int MapInt32Int32FieldNumber = 56; |
| 1162 | private static readonly pbc::MapField<int, int>.Codec _map_mapInt32Int32_codec |
| 1163 | = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 450); |
| 1164 | private readonly pbc::MapField<int, int> mapInt32Int32_ = new pbc::MapField<int, int>(); |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1165 | /// <summary> |
| 1166 | /// Map |
| 1167 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1168 | public pbc::MapField<int, int> MapInt32Int32 { |
| 1169 | get { return mapInt32Int32_; } |
| 1170 | } |
| 1171 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1172 | /// <summary>Field number for the "map_int64_int64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1173 | public const int MapInt64Int64FieldNumber = 57; |
| 1174 | private static readonly pbc::MapField<long, long>.Codec _map_mapInt64Int64_codec |
| 1175 | = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForInt64(8), pb::FieldCodec.ForInt64(16), 458); |
| 1176 | private readonly pbc::MapField<long, long> mapInt64Int64_ = new pbc::MapField<long, long>(); |
| 1177 | public pbc::MapField<long, long> MapInt64Int64 { |
| 1178 | get { return mapInt64Int64_; } |
| 1179 | } |
| 1180 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1181 | /// <summary>Field number for the "map_uint32_uint32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1182 | public const int MapUint32Uint32FieldNumber = 58; |
| 1183 | private static readonly pbc::MapField<uint, uint>.Codec _map_mapUint32Uint32_codec |
| 1184 | = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8), pb::FieldCodec.ForUInt32(16), 466); |
| 1185 | private readonly pbc::MapField<uint, uint> mapUint32Uint32_ = new pbc::MapField<uint, uint>(); |
| 1186 | public pbc::MapField<uint, uint> MapUint32Uint32 { |
| 1187 | get { return mapUint32Uint32_; } |
| 1188 | } |
| 1189 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1190 | /// <summary>Field number for the "map_uint64_uint64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1191 | public const int MapUint64Uint64FieldNumber = 59; |
| 1192 | private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapUint64Uint64_codec |
| 1193 | = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForUInt64(8), pb::FieldCodec.ForUInt64(16), 474); |
| 1194 | private readonly pbc::MapField<ulong, ulong> mapUint64Uint64_ = new pbc::MapField<ulong, ulong>(); |
| 1195 | public pbc::MapField<ulong, ulong> MapUint64Uint64 { |
| 1196 | get { return mapUint64Uint64_; } |
| 1197 | } |
| 1198 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1199 | /// <summary>Field number for the "map_sint32_sint32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1200 | public const int MapSint32Sint32FieldNumber = 60; |
| 1201 | private static readonly pbc::MapField<int, int>.Codec _map_mapSint32Sint32_codec |
| 1202 | = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSInt32(8), pb::FieldCodec.ForSInt32(16), 482); |
| 1203 | private readonly pbc::MapField<int, int> mapSint32Sint32_ = new pbc::MapField<int, int>(); |
| 1204 | public pbc::MapField<int, int> MapSint32Sint32 { |
| 1205 | get { return mapSint32Sint32_; } |
| 1206 | } |
| 1207 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1208 | /// <summary>Field number for the "map_sint64_sint64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1209 | public const int MapSint64Sint64FieldNumber = 61; |
| 1210 | private static readonly pbc::MapField<long, long>.Codec _map_mapSint64Sint64_codec |
| 1211 | = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSInt64(8), pb::FieldCodec.ForSInt64(16), 490); |
| 1212 | private readonly pbc::MapField<long, long> mapSint64Sint64_ = new pbc::MapField<long, long>(); |
| 1213 | public pbc::MapField<long, long> MapSint64Sint64 { |
| 1214 | get { return mapSint64Sint64_; } |
| 1215 | } |
| 1216 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1217 | /// <summary>Field number for the "map_fixed32_fixed32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1218 | public const int MapFixed32Fixed32FieldNumber = 62; |
| 1219 | private static readonly pbc::MapField<uint, uint>.Codec _map_mapFixed32Fixed32_codec |
| 1220 | = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForFixed32(13), pb::FieldCodec.ForFixed32(21), 498); |
| 1221 | private readonly pbc::MapField<uint, uint> mapFixed32Fixed32_ = new pbc::MapField<uint, uint>(); |
| 1222 | public pbc::MapField<uint, uint> MapFixed32Fixed32 { |
| 1223 | get { return mapFixed32Fixed32_; } |
| 1224 | } |
| 1225 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1226 | /// <summary>Field number for the "map_fixed64_fixed64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1227 | public const int MapFixed64Fixed64FieldNumber = 63; |
| 1228 | private static readonly pbc::MapField<ulong, ulong>.Codec _map_mapFixed64Fixed64_codec |
| 1229 | = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForFixed64(9), pb::FieldCodec.ForFixed64(17), 506); |
| 1230 | private readonly pbc::MapField<ulong, ulong> mapFixed64Fixed64_ = new pbc::MapField<ulong, ulong>(); |
| 1231 | public pbc::MapField<ulong, ulong> MapFixed64Fixed64 { |
| 1232 | get { return mapFixed64Fixed64_; } |
| 1233 | } |
| 1234 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1235 | /// <summary>Field number for the "map_sfixed32_sfixed32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1236 | public const int MapSfixed32Sfixed32FieldNumber = 64; |
| 1237 | private static readonly pbc::MapField<int, int>.Codec _map_mapSfixed32Sfixed32_codec |
| 1238 | = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSFixed32(13), pb::FieldCodec.ForSFixed32(21), 514); |
| 1239 | private readonly pbc::MapField<int, int> mapSfixed32Sfixed32_ = new pbc::MapField<int, int>(); |
| 1240 | public pbc::MapField<int, int> MapSfixed32Sfixed32 { |
| 1241 | get { return mapSfixed32Sfixed32_; } |
| 1242 | } |
| 1243 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1244 | /// <summary>Field number for the "map_sfixed64_sfixed64" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1245 | public const int MapSfixed64Sfixed64FieldNumber = 65; |
| 1246 | private static readonly pbc::MapField<long, long>.Codec _map_mapSfixed64Sfixed64_codec |
| 1247 | = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSFixed64(9), pb::FieldCodec.ForSFixed64(17), 522); |
| 1248 | private readonly pbc::MapField<long, long> mapSfixed64Sfixed64_ = new pbc::MapField<long, long>(); |
| 1249 | public pbc::MapField<long, long> MapSfixed64Sfixed64 { |
| 1250 | get { return mapSfixed64Sfixed64_; } |
| 1251 | } |
| 1252 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1253 | /// <summary>Field number for the "map_int32_float" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1254 | public const int MapInt32FloatFieldNumber = 66; |
| 1255 | private static readonly pbc::MapField<int, float>.Codec _map_mapInt32Float_codec |
| 1256 | = new pbc::MapField<int, float>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForFloat(21), 530); |
| 1257 | private readonly pbc::MapField<int, float> mapInt32Float_ = new pbc::MapField<int, float>(); |
| 1258 | public pbc::MapField<int, float> MapInt32Float { |
| 1259 | get { return mapInt32Float_; } |
| 1260 | } |
| 1261 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1262 | /// <summary>Field number for the "map_int32_double" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1263 | public const int MapInt32DoubleFieldNumber = 67; |
| 1264 | private static readonly pbc::MapField<int, double>.Codec _map_mapInt32Double_codec |
| 1265 | = new pbc::MapField<int, double>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForDouble(17), 538); |
| 1266 | private readonly pbc::MapField<int, double> mapInt32Double_ = new pbc::MapField<int, double>(); |
| 1267 | public pbc::MapField<int, double> MapInt32Double { |
| 1268 | get { return mapInt32Double_; } |
| 1269 | } |
| 1270 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1271 | /// <summary>Field number for the "map_bool_bool" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1272 | public const int MapBoolBoolFieldNumber = 68; |
| 1273 | private static readonly pbc::MapField<bool, bool>.Codec _map_mapBoolBool_codec |
| 1274 | = new pbc::MapField<bool, bool>.Codec(pb::FieldCodec.ForBool(8), pb::FieldCodec.ForBool(16), 546); |
| 1275 | private readonly pbc::MapField<bool, bool> mapBoolBool_ = new pbc::MapField<bool, bool>(); |
| 1276 | public pbc::MapField<bool, bool> MapBoolBool { |
| 1277 | get { return mapBoolBool_; } |
| 1278 | } |
| 1279 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1280 | /// <summary>Field number for the "map_string_string" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1281 | public const int MapStringStringFieldNumber = 69; |
| 1282 | private static readonly pbc::MapField<string, string>.Codec _map_mapStringString_codec |
| 1283 | = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 554); |
| 1284 | private readonly pbc::MapField<string, string> mapStringString_ = new pbc::MapField<string, string>(); |
| 1285 | public pbc::MapField<string, string> MapStringString { |
| 1286 | get { return mapStringString_; } |
| 1287 | } |
| 1288 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1289 | /// <summary>Field number for the "map_string_bytes" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1290 | public const int MapStringBytesFieldNumber = 70; |
| 1291 | private static readonly pbc::MapField<string, pb::ByteString>.Codec _map_mapStringBytes_codec |
| 1292 | = new pbc::MapField<string, pb::ByteString>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForBytes(18), 562); |
| 1293 | private readonly pbc::MapField<string, pb::ByteString> mapStringBytes_ = new pbc::MapField<string, pb::ByteString>(); |
| 1294 | public pbc::MapField<string, pb::ByteString> MapStringBytes { |
| 1295 | get { return mapStringBytes_; } |
| 1296 | } |
| 1297 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1298 | /// <summary>Field number for the "map_string_nested_message" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1299 | public const int MapStringNestedMessageFieldNumber = 71; |
| 1300 | private static readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage>.Codec _map_mapStringNestedMessage_codec |
| 1301 | = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Conformance.TestAllTypes.Types.NestedMessage.Parser), 570); |
| 1302 | private readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage> mapStringNestedMessage_ = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage>(); |
| 1303 | public pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedMessage> MapStringNestedMessage { |
| 1304 | get { return mapStringNestedMessage_; } |
| 1305 | } |
| 1306 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1307 | /// <summary>Field number for the "map_string_foreign_message" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1308 | public const int MapStringForeignMessageFieldNumber = 72; |
| 1309 | private static readonly pbc::MapField<string, global::Conformance.ForeignMessage>.Codec _map_mapStringForeignMessage_codec |
| 1310 | = new pbc::MapField<string, global::Conformance.ForeignMessage>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::Conformance.ForeignMessage.Parser), 578); |
| 1311 | private readonly pbc::MapField<string, global::Conformance.ForeignMessage> mapStringForeignMessage_ = new pbc::MapField<string, global::Conformance.ForeignMessage>(); |
| 1312 | public pbc::MapField<string, global::Conformance.ForeignMessage> MapStringForeignMessage { |
| 1313 | get { return mapStringForeignMessage_; } |
| 1314 | } |
| 1315 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1316 | /// <summary>Field number for the "map_string_nested_enum" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1317 | public const int MapStringNestedEnumFieldNumber = 73; |
| 1318 | private static readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum>.Codec _map_mapStringNestedEnum_codec |
| 1319 | = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::Conformance.TestAllTypes.Types.NestedEnum) x), 586); |
| 1320 | private readonly pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum> mapStringNestedEnum_ = new pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum>(); |
| 1321 | public pbc::MapField<string, global::Conformance.TestAllTypes.Types.NestedEnum> MapStringNestedEnum { |
| 1322 | get { return mapStringNestedEnum_; } |
| 1323 | } |
| 1324 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1325 | /// <summary>Field number for the "map_string_foreign_enum" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1326 | public const int MapStringForeignEnumFieldNumber = 74; |
| 1327 | private static readonly pbc::MapField<string, global::Conformance.ForeignEnum>.Codec _map_mapStringForeignEnum_codec |
| 1328 | = new pbc::MapField<string, global::Conformance.ForeignEnum>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::Conformance.ForeignEnum) x), 594); |
| 1329 | private readonly pbc::MapField<string, global::Conformance.ForeignEnum> mapStringForeignEnum_ = new pbc::MapField<string, global::Conformance.ForeignEnum>(); |
| 1330 | public pbc::MapField<string, global::Conformance.ForeignEnum> MapStringForeignEnum { |
| 1331 | get { return mapStringForeignEnum_; } |
| 1332 | } |
| 1333 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1334 | /// <summary>Field number for the "oneof_uint32" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1335 | public const int OneofUint32FieldNumber = 111; |
| 1336 | public uint OneofUint32 { |
| 1337 | get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32 ? (uint) oneofField_ : 0; } |
| 1338 | set { |
| 1339 | oneofField_ = value; |
| 1340 | oneofFieldCase_ = OneofFieldOneofCase.OneofUint32; |
| 1341 | } |
| 1342 | } |
| 1343 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1344 | /// <summary>Field number for the "oneof_nested_message" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1345 | public const int OneofNestedMessageFieldNumber = 112; |
| 1346 | public global::Conformance.TestAllTypes.Types.NestedMessage OneofNestedMessage { |
| 1347 | get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (global::Conformance.TestAllTypes.Types.NestedMessage) oneofField_ : null; } |
| 1348 | set { |
| 1349 | oneofField_ = value; |
| 1350 | oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage; |
| 1351 | } |
| 1352 | } |
| 1353 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1354 | /// <summary>Field number for the "oneof_string" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1355 | public const int OneofStringFieldNumber = 113; |
| 1356 | public string OneofString { |
| 1357 | get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString ? (string) oneofField_ : ""; } |
| 1358 | set { |
| 1359 | oneofField_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 1360 | oneofFieldCase_ = OneofFieldOneofCase.OneofString; |
| 1361 | } |
| 1362 | } |
| 1363 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 1364 | /// <summary>Field number for the "oneof_bytes" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1365 | public const int OneofBytesFieldNumber = 114; |
| 1366 | public pb::ByteString OneofBytes { |
| 1367 | get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; } |
| 1368 | set { |
| 1369 | oneofField_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 1370 | oneofFieldCase_ = OneofFieldOneofCase.OneofBytes; |
| 1371 | } |
| 1372 | } |
| 1373 | |
| 1374 | private object oneofField_; |
Jon Skeet | 6bbbdfa | 2015-09-30 06:59:38 +0100 | [diff] [blame] | 1375 | /// <summary>Enum of possible cases for the "oneof_field" oneof.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1376 | public enum OneofFieldOneofCase { |
| 1377 | None = 0, |
| 1378 | OneofUint32 = 111, |
| 1379 | OneofNestedMessage = 112, |
| 1380 | OneofString = 113, |
| 1381 | OneofBytes = 114, |
| 1382 | } |
| 1383 | private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None; |
| 1384 | public OneofFieldOneofCase OneofFieldCase { |
| 1385 | get { return oneofFieldCase_; } |
| 1386 | } |
| 1387 | |
| 1388 | public void ClearOneofField() { |
| 1389 | oneofFieldCase_ = OneofFieldOneofCase.None; |
| 1390 | oneofField_ = null; |
| 1391 | } |
| 1392 | |
| 1393 | public override bool Equals(object other) { |
| 1394 | return Equals(other as TestAllTypes); |
| 1395 | } |
| 1396 | |
| 1397 | public bool Equals(TestAllTypes other) { |
| 1398 | if (ReferenceEquals(other, null)) { |
| 1399 | return false; |
| 1400 | } |
| 1401 | if (ReferenceEquals(other, this)) { |
| 1402 | return true; |
| 1403 | } |
| 1404 | if (OptionalInt32 != other.OptionalInt32) return false; |
| 1405 | if (OptionalInt64 != other.OptionalInt64) return false; |
| 1406 | if (OptionalUint32 != other.OptionalUint32) return false; |
| 1407 | if (OptionalUint64 != other.OptionalUint64) return false; |
| 1408 | if (OptionalSint32 != other.OptionalSint32) return false; |
| 1409 | if (OptionalSint64 != other.OptionalSint64) return false; |
| 1410 | if (OptionalFixed32 != other.OptionalFixed32) return false; |
| 1411 | if (OptionalFixed64 != other.OptionalFixed64) return false; |
| 1412 | if (OptionalSfixed32 != other.OptionalSfixed32) return false; |
| 1413 | if (OptionalSfixed64 != other.OptionalSfixed64) return false; |
| 1414 | if (OptionalFloat != other.OptionalFloat) return false; |
| 1415 | if (OptionalDouble != other.OptionalDouble) return false; |
| 1416 | if (OptionalBool != other.OptionalBool) return false; |
| 1417 | if (OptionalString != other.OptionalString) return false; |
| 1418 | if (OptionalBytes != other.OptionalBytes) return false; |
| 1419 | if (!object.Equals(OptionalNestedMessage, other.OptionalNestedMessage)) return false; |
| 1420 | if (!object.Equals(OptionalForeignMessage, other.OptionalForeignMessage)) return false; |
| 1421 | if (OptionalNestedEnum != other.OptionalNestedEnum) return false; |
| 1422 | if (OptionalForeignEnum != other.OptionalForeignEnum) return false; |
| 1423 | if (OptionalStringPiece != other.OptionalStringPiece) return false; |
| 1424 | if (OptionalCord != other.OptionalCord) return false; |
| 1425 | if (!object.Equals(RecursiveMessage, other.RecursiveMessage)) return false; |
| 1426 | if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false; |
| 1427 | if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false; |
| 1428 | if(!repeatedUint32_.Equals(other.repeatedUint32_)) return false; |
| 1429 | if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false; |
| 1430 | if(!repeatedSint32_.Equals(other.repeatedSint32_)) return false; |
| 1431 | if(!repeatedSint64_.Equals(other.repeatedSint64_)) return false; |
| 1432 | if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false; |
| 1433 | if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false; |
| 1434 | if(!repeatedSfixed32_.Equals(other.repeatedSfixed32_)) return false; |
| 1435 | if(!repeatedSfixed64_.Equals(other.repeatedSfixed64_)) return false; |
| 1436 | if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false; |
| 1437 | if(!repeatedDouble_.Equals(other.repeatedDouble_)) return false; |
| 1438 | if(!repeatedBool_.Equals(other.repeatedBool_)) return false; |
| 1439 | if(!repeatedString_.Equals(other.repeatedString_)) return false; |
| 1440 | if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false; |
| 1441 | if(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return false; |
| 1442 | if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false; |
| 1443 | if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false; |
| 1444 | if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false; |
| 1445 | if(!repeatedStringPiece_.Equals(other.repeatedStringPiece_)) return false; |
| 1446 | if(!repeatedCord_.Equals(other.repeatedCord_)) return false; |
| 1447 | if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false; |
| 1448 | if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false; |
| 1449 | if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false; |
| 1450 | if (!MapUint64Uint64.Equals(other.MapUint64Uint64)) return false; |
| 1451 | if (!MapSint32Sint32.Equals(other.MapSint32Sint32)) return false; |
| 1452 | if (!MapSint64Sint64.Equals(other.MapSint64Sint64)) return false; |
| 1453 | if (!MapFixed32Fixed32.Equals(other.MapFixed32Fixed32)) return false; |
| 1454 | if (!MapFixed64Fixed64.Equals(other.MapFixed64Fixed64)) return false; |
| 1455 | if (!MapSfixed32Sfixed32.Equals(other.MapSfixed32Sfixed32)) return false; |
| 1456 | if (!MapSfixed64Sfixed64.Equals(other.MapSfixed64Sfixed64)) return false; |
| 1457 | if (!MapInt32Float.Equals(other.MapInt32Float)) return false; |
| 1458 | if (!MapInt32Double.Equals(other.MapInt32Double)) return false; |
| 1459 | if (!MapBoolBool.Equals(other.MapBoolBool)) return false; |
| 1460 | if (!MapStringString.Equals(other.MapStringString)) return false; |
| 1461 | if (!MapStringBytes.Equals(other.MapStringBytes)) return false; |
| 1462 | if (!MapStringNestedMessage.Equals(other.MapStringNestedMessage)) return false; |
| 1463 | if (!MapStringForeignMessage.Equals(other.MapStringForeignMessage)) return false; |
| 1464 | if (!MapStringNestedEnum.Equals(other.MapStringNestedEnum)) return false; |
| 1465 | if (!MapStringForeignEnum.Equals(other.MapStringForeignEnum)) return false; |
| 1466 | if (OneofUint32 != other.OneofUint32) return false; |
| 1467 | if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return false; |
| 1468 | if (OneofString != other.OneofString) return false; |
| 1469 | if (OneofBytes != other.OneofBytes) return false; |
Jon Skeet | 55313c9 | 2015-10-24 06:46:02 +0100 | [diff] [blame] | 1470 | if (OneofFieldCase != other.OneofFieldCase) return false; |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1471 | return true; |
| 1472 | } |
| 1473 | |
| 1474 | public override int GetHashCode() { |
| 1475 | int hash = 1; |
| 1476 | if (OptionalInt32 != 0) hash ^= OptionalInt32.GetHashCode(); |
| 1477 | if (OptionalInt64 != 0L) hash ^= OptionalInt64.GetHashCode(); |
| 1478 | if (OptionalUint32 != 0) hash ^= OptionalUint32.GetHashCode(); |
| 1479 | if (OptionalUint64 != 0UL) hash ^= OptionalUint64.GetHashCode(); |
| 1480 | if (OptionalSint32 != 0) hash ^= OptionalSint32.GetHashCode(); |
| 1481 | if (OptionalSint64 != 0L) hash ^= OptionalSint64.GetHashCode(); |
| 1482 | if (OptionalFixed32 != 0) hash ^= OptionalFixed32.GetHashCode(); |
| 1483 | if (OptionalFixed64 != 0UL) hash ^= OptionalFixed64.GetHashCode(); |
| 1484 | if (OptionalSfixed32 != 0) hash ^= OptionalSfixed32.GetHashCode(); |
| 1485 | if (OptionalSfixed64 != 0L) hash ^= OptionalSfixed64.GetHashCode(); |
| 1486 | if (OptionalFloat != 0F) hash ^= OptionalFloat.GetHashCode(); |
| 1487 | if (OptionalDouble != 0D) hash ^= OptionalDouble.GetHashCode(); |
| 1488 | if (OptionalBool != false) hash ^= OptionalBool.GetHashCode(); |
| 1489 | if (OptionalString.Length != 0) hash ^= OptionalString.GetHashCode(); |
| 1490 | if (OptionalBytes.Length != 0) hash ^= OptionalBytes.GetHashCode(); |
| 1491 | if (optionalNestedMessage_ != null) hash ^= OptionalNestedMessage.GetHashCode(); |
| 1492 | if (optionalForeignMessage_ != null) hash ^= OptionalForeignMessage.GetHashCode(); |
| 1493 | if (OptionalNestedEnum != global::Conformance.TestAllTypes.Types.NestedEnum.FOO) hash ^= OptionalNestedEnum.GetHashCode(); |
| 1494 | if (OptionalForeignEnum != global::Conformance.ForeignEnum.FOREIGN_FOO) hash ^= OptionalForeignEnum.GetHashCode(); |
| 1495 | if (OptionalStringPiece.Length != 0) hash ^= OptionalStringPiece.GetHashCode(); |
| 1496 | if (OptionalCord.Length != 0) hash ^= OptionalCord.GetHashCode(); |
| 1497 | if (recursiveMessage_ != null) hash ^= RecursiveMessage.GetHashCode(); |
| 1498 | hash ^= repeatedInt32_.GetHashCode(); |
| 1499 | hash ^= repeatedInt64_.GetHashCode(); |
| 1500 | hash ^= repeatedUint32_.GetHashCode(); |
| 1501 | hash ^= repeatedUint64_.GetHashCode(); |
| 1502 | hash ^= repeatedSint32_.GetHashCode(); |
| 1503 | hash ^= repeatedSint64_.GetHashCode(); |
| 1504 | hash ^= repeatedFixed32_.GetHashCode(); |
| 1505 | hash ^= repeatedFixed64_.GetHashCode(); |
| 1506 | hash ^= repeatedSfixed32_.GetHashCode(); |
| 1507 | hash ^= repeatedSfixed64_.GetHashCode(); |
| 1508 | hash ^= repeatedFloat_.GetHashCode(); |
| 1509 | hash ^= repeatedDouble_.GetHashCode(); |
| 1510 | hash ^= repeatedBool_.GetHashCode(); |
| 1511 | hash ^= repeatedString_.GetHashCode(); |
| 1512 | hash ^= repeatedBytes_.GetHashCode(); |
| 1513 | hash ^= repeatedNestedMessage_.GetHashCode(); |
| 1514 | hash ^= repeatedForeignMessage_.GetHashCode(); |
| 1515 | hash ^= repeatedNestedEnum_.GetHashCode(); |
| 1516 | hash ^= repeatedForeignEnum_.GetHashCode(); |
| 1517 | hash ^= repeatedStringPiece_.GetHashCode(); |
| 1518 | hash ^= repeatedCord_.GetHashCode(); |
| 1519 | hash ^= MapInt32Int32.GetHashCode(); |
| 1520 | hash ^= MapInt64Int64.GetHashCode(); |
| 1521 | hash ^= MapUint32Uint32.GetHashCode(); |
| 1522 | hash ^= MapUint64Uint64.GetHashCode(); |
| 1523 | hash ^= MapSint32Sint32.GetHashCode(); |
| 1524 | hash ^= MapSint64Sint64.GetHashCode(); |
| 1525 | hash ^= MapFixed32Fixed32.GetHashCode(); |
| 1526 | hash ^= MapFixed64Fixed64.GetHashCode(); |
| 1527 | hash ^= MapSfixed32Sfixed32.GetHashCode(); |
| 1528 | hash ^= MapSfixed64Sfixed64.GetHashCode(); |
| 1529 | hash ^= MapInt32Float.GetHashCode(); |
| 1530 | hash ^= MapInt32Double.GetHashCode(); |
| 1531 | hash ^= MapBoolBool.GetHashCode(); |
| 1532 | hash ^= MapStringString.GetHashCode(); |
| 1533 | hash ^= MapStringBytes.GetHashCode(); |
| 1534 | hash ^= MapStringNestedMessage.GetHashCode(); |
| 1535 | hash ^= MapStringForeignMessage.GetHashCode(); |
| 1536 | hash ^= MapStringNestedEnum.GetHashCode(); |
| 1537 | hash ^= MapStringForeignEnum.GetHashCode(); |
| 1538 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) hash ^= OneofUint32.GetHashCode(); |
| 1539 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode(); |
| 1540 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) hash ^= OneofString.GetHashCode(); |
| 1541 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.GetHashCode(); |
Jon Skeet | 55313c9 | 2015-10-24 06:46:02 +0100 | [diff] [blame] | 1542 | hash ^= (int) oneofFieldCase_; |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1543 | return hash; |
| 1544 | } |
| 1545 | |
| 1546 | public override string ToString() { |
| 1547 | return pb::JsonFormatter.Default.Format(this); |
| 1548 | } |
| 1549 | |
| 1550 | public void WriteTo(pb::CodedOutputStream output) { |
| 1551 | if (OptionalInt32 != 0) { |
| 1552 | output.WriteRawTag(8); |
| 1553 | output.WriteInt32(OptionalInt32); |
| 1554 | } |
| 1555 | if (OptionalInt64 != 0L) { |
| 1556 | output.WriteRawTag(16); |
| 1557 | output.WriteInt64(OptionalInt64); |
| 1558 | } |
| 1559 | if (OptionalUint32 != 0) { |
| 1560 | output.WriteRawTag(24); |
| 1561 | output.WriteUInt32(OptionalUint32); |
| 1562 | } |
| 1563 | if (OptionalUint64 != 0UL) { |
| 1564 | output.WriteRawTag(32); |
| 1565 | output.WriteUInt64(OptionalUint64); |
| 1566 | } |
| 1567 | if (OptionalSint32 != 0) { |
| 1568 | output.WriteRawTag(40); |
| 1569 | output.WriteSInt32(OptionalSint32); |
| 1570 | } |
| 1571 | if (OptionalSint64 != 0L) { |
| 1572 | output.WriteRawTag(48); |
| 1573 | output.WriteSInt64(OptionalSint64); |
| 1574 | } |
| 1575 | if (OptionalFixed32 != 0) { |
| 1576 | output.WriteRawTag(61); |
| 1577 | output.WriteFixed32(OptionalFixed32); |
| 1578 | } |
| 1579 | if (OptionalFixed64 != 0UL) { |
| 1580 | output.WriteRawTag(65); |
| 1581 | output.WriteFixed64(OptionalFixed64); |
| 1582 | } |
| 1583 | if (OptionalSfixed32 != 0) { |
| 1584 | output.WriteRawTag(77); |
| 1585 | output.WriteSFixed32(OptionalSfixed32); |
| 1586 | } |
| 1587 | if (OptionalSfixed64 != 0L) { |
| 1588 | output.WriteRawTag(81); |
| 1589 | output.WriteSFixed64(OptionalSfixed64); |
| 1590 | } |
| 1591 | if (OptionalFloat != 0F) { |
| 1592 | output.WriteRawTag(93); |
| 1593 | output.WriteFloat(OptionalFloat); |
| 1594 | } |
| 1595 | if (OptionalDouble != 0D) { |
| 1596 | output.WriteRawTag(97); |
| 1597 | output.WriteDouble(OptionalDouble); |
| 1598 | } |
| 1599 | if (OptionalBool != false) { |
| 1600 | output.WriteRawTag(104); |
| 1601 | output.WriteBool(OptionalBool); |
| 1602 | } |
| 1603 | if (OptionalString.Length != 0) { |
| 1604 | output.WriteRawTag(114); |
| 1605 | output.WriteString(OptionalString); |
| 1606 | } |
| 1607 | if (OptionalBytes.Length != 0) { |
| 1608 | output.WriteRawTag(122); |
| 1609 | output.WriteBytes(OptionalBytes); |
| 1610 | } |
| 1611 | if (optionalNestedMessage_ != null) { |
| 1612 | output.WriteRawTag(146, 1); |
| 1613 | output.WriteMessage(OptionalNestedMessage); |
| 1614 | } |
| 1615 | if (optionalForeignMessage_ != null) { |
| 1616 | output.WriteRawTag(154, 1); |
| 1617 | output.WriteMessage(OptionalForeignMessage); |
| 1618 | } |
| 1619 | if (OptionalNestedEnum != global::Conformance.TestAllTypes.Types.NestedEnum.FOO) { |
| 1620 | output.WriteRawTag(168, 1); |
| 1621 | output.WriteEnum((int) OptionalNestedEnum); |
| 1622 | } |
| 1623 | if (OptionalForeignEnum != global::Conformance.ForeignEnum.FOREIGN_FOO) { |
| 1624 | output.WriteRawTag(176, 1); |
| 1625 | output.WriteEnum((int) OptionalForeignEnum); |
| 1626 | } |
| 1627 | if (OptionalStringPiece.Length != 0) { |
| 1628 | output.WriteRawTag(194, 1); |
| 1629 | output.WriteString(OptionalStringPiece); |
| 1630 | } |
| 1631 | if (OptionalCord.Length != 0) { |
| 1632 | output.WriteRawTag(202, 1); |
| 1633 | output.WriteString(OptionalCord); |
| 1634 | } |
| 1635 | if (recursiveMessage_ != null) { |
| 1636 | output.WriteRawTag(218, 1); |
| 1637 | output.WriteMessage(RecursiveMessage); |
| 1638 | } |
| 1639 | repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec); |
| 1640 | repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec); |
| 1641 | repeatedUint32_.WriteTo(output, _repeated_repeatedUint32_codec); |
| 1642 | repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec); |
| 1643 | repeatedSint32_.WriteTo(output, _repeated_repeatedSint32_codec); |
| 1644 | repeatedSint64_.WriteTo(output, _repeated_repeatedSint64_codec); |
| 1645 | repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec); |
| 1646 | repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec); |
| 1647 | repeatedSfixed32_.WriteTo(output, _repeated_repeatedSfixed32_codec); |
| 1648 | repeatedSfixed64_.WriteTo(output, _repeated_repeatedSfixed64_codec); |
| 1649 | repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec); |
| 1650 | repeatedDouble_.WriteTo(output, _repeated_repeatedDouble_codec); |
| 1651 | repeatedBool_.WriteTo(output, _repeated_repeatedBool_codec); |
| 1652 | repeatedString_.WriteTo(output, _repeated_repeatedString_codec); |
| 1653 | repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec); |
| 1654 | repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_codec); |
| 1655 | repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec); |
| 1656 | repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec); |
| 1657 | repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec); |
| 1658 | repeatedStringPiece_.WriteTo(output, _repeated_repeatedStringPiece_codec); |
| 1659 | repeatedCord_.WriteTo(output, _repeated_repeatedCord_codec); |
| 1660 | mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec); |
| 1661 | mapInt64Int64_.WriteTo(output, _map_mapInt64Int64_codec); |
| 1662 | mapUint32Uint32_.WriteTo(output, _map_mapUint32Uint32_codec); |
| 1663 | mapUint64Uint64_.WriteTo(output, _map_mapUint64Uint64_codec); |
| 1664 | mapSint32Sint32_.WriteTo(output, _map_mapSint32Sint32_codec); |
| 1665 | mapSint64Sint64_.WriteTo(output, _map_mapSint64Sint64_codec); |
| 1666 | mapFixed32Fixed32_.WriteTo(output, _map_mapFixed32Fixed32_codec); |
| 1667 | mapFixed64Fixed64_.WriteTo(output, _map_mapFixed64Fixed64_codec); |
| 1668 | mapSfixed32Sfixed32_.WriteTo(output, _map_mapSfixed32Sfixed32_codec); |
| 1669 | mapSfixed64Sfixed64_.WriteTo(output, _map_mapSfixed64Sfixed64_codec); |
| 1670 | mapInt32Float_.WriteTo(output, _map_mapInt32Float_codec); |
| 1671 | mapInt32Double_.WriteTo(output, _map_mapInt32Double_codec); |
| 1672 | mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec); |
| 1673 | mapStringString_.WriteTo(output, _map_mapStringString_codec); |
| 1674 | mapStringBytes_.WriteTo(output, _map_mapStringBytes_codec); |
| 1675 | mapStringNestedMessage_.WriteTo(output, _map_mapStringNestedMessage_codec); |
| 1676 | mapStringForeignMessage_.WriteTo(output, _map_mapStringForeignMessage_codec); |
| 1677 | mapStringNestedEnum_.WriteTo(output, _map_mapStringNestedEnum_codec); |
| 1678 | mapStringForeignEnum_.WriteTo(output, _map_mapStringForeignEnum_codec); |
| 1679 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) { |
| 1680 | output.WriteRawTag(248, 6); |
| 1681 | output.WriteUInt32(OneofUint32); |
| 1682 | } |
| 1683 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) { |
| 1684 | output.WriteRawTag(130, 7); |
| 1685 | output.WriteMessage(OneofNestedMessage); |
| 1686 | } |
| 1687 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) { |
| 1688 | output.WriteRawTag(138, 7); |
| 1689 | output.WriteString(OneofString); |
| 1690 | } |
| 1691 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) { |
| 1692 | output.WriteRawTag(146, 7); |
| 1693 | output.WriteBytes(OneofBytes); |
| 1694 | } |
| 1695 | } |
| 1696 | |
| 1697 | public int CalculateSize() { |
| 1698 | int size = 0; |
| 1699 | if (OptionalInt32 != 0) { |
| 1700 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32); |
| 1701 | } |
| 1702 | if (OptionalInt64 != 0L) { |
| 1703 | size += 1 + pb::CodedOutputStream.ComputeInt64Size(OptionalInt64); |
| 1704 | } |
| 1705 | if (OptionalUint32 != 0) { |
| 1706 | size += 1 + pb::CodedOutputStream.ComputeUInt32Size(OptionalUint32); |
| 1707 | } |
| 1708 | if (OptionalUint64 != 0UL) { |
| 1709 | size += 1 + pb::CodedOutputStream.ComputeUInt64Size(OptionalUint64); |
| 1710 | } |
| 1711 | if (OptionalSint32 != 0) { |
| 1712 | size += 1 + pb::CodedOutputStream.ComputeSInt32Size(OptionalSint32); |
| 1713 | } |
| 1714 | if (OptionalSint64 != 0L) { |
| 1715 | size += 1 + pb::CodedOutputStream.ComputeSInt64Size(OptionalSint64); |
| 1716 | } |
| 1717 | if (OptionalFixed32 != 0) { |
| 1718 | size += 1 + 4; |
| 1719 | } |
| 1720 | if (OptionalFixed64 != 0UL) { |
| 1721 | size += 1 + 8; |
| 1722 | } |
| 1723 | if (OptionalSfixed32 != 0) { |
| 1724 | size += 1 + 4; |
| 1725 | } |
| 1726 | if (OptionalSfixed64 != 0L) { |
| 1727 | size += 1 + 8; |
| 1728 | } |
| 1729 | if (OptionalFloat != 0F) { |
| 1730 | size += 1 + 4; |
| 1731 | } |
| 1732 | if (OptionalDouble != 0D) { |
| 1733 | size += 1 + 8; |
| 1734 | } |
| 1735 | if (OptionalBool != false) { |
| 1736 | size += 1 + 1; |
| 1737 | } |
| 1738 | if (OptionalString.Length != 0) { |
| 1739 | size += 1 + pb::CodedOutputStream.ComputeStringSize(OptionalString); |
| 1740 | } |
| 1741 | if (OptionalBytes.Length != 0) { |
| 1742 | size += 1 + pb::CodedOutputStream.ComputeBytesSize(OptionalBytes); |
| 1743 | } |
| 1744 | if (optionalNestedMessage_ != null) { |
| 1745 | size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage); |
| 1746 | } |
| 1747 | if (optionalForeignMessage_ != null) { |
| 1748 | size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalForeignMessage); |
| 1749 | } |
| 1750 | if (OptionalNestedEnum != global::Conformance.TestAllTypes.Types.NestedEnum.FOO) { |
| 1751 | size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalNestedEnum); |
| 1752 | } |
| 1753 | if (OptionalForeignEnum != global::Conformance.ForeignEnum.FOREIGN_FOO) { |
| 1754 | size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalForeignEnum); |
| 1755 | } |
| 1756 | if (OptionalStringPiece.Length != 0) { |
| 1757 | size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalStringPiece); |
| 1758 | } |
| 1759 | if (OptionalCord.Length != 0) { |
| 1760 | size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalCord); |
| 1761 | } |
| 1762 | if (recursiveMessage_ != null) { |
| 1763 | size += 2 + pb::CodedOutputStream.ComputeMessageSize(RecursiveMessage); |
| 1764 | } |
| 1765 | size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec); |
| 1766 | size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec); |
| 1767 | size += repeatedUint32_.CalculateSize(_repeated_repeatedUint32_codec); |
| 1768 | size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec); |
| 1769 | size += repeatedSint32_.CalculateSize(_repeated_repeatedSint32_codec); |
| 1770 | size += repeatedSint64_.CalculateSize(_repeated_repeatedSint64_codec); |
| 1771 | size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec); |
| 1772 | size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec); |
| 1773 | size += repeatedSfixed32_.CalculateSize(_repeated_repeatedSfixed32_codec); |
| 1774 | size += repeatedSfixed64_.CalculateSize(_repeated_repeatedSfixed64_codec); |
| 1775 | size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec); |
| 1776 | size += repeatedDouble_.CalculateSize(_repeated_repeatedDouble_codec); |
| 1777 | size += repeatedBool_.CalculateSize(_repeated_repeatedBool_codec); |
| 1778 | size += repeatedString_.CalculateSize(_repeated_repeatedString_codec); |
| 1779 | size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec); |
| 1780 | size += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessage_codec); |
| 1781 | size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec); |
| 1782 | size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_codec); |
| 1783 | size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec); |
| 1784 | size += repeatedStringPiece_.CalculateSize(_repeated_repeatedStringPiece_codec); |
| 1785 | size += repeatedCord_.CalculateSize(_repeated_repeatedCord_codec); |
| 1786 | size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec); |
| 1787 | size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec); |
| 1788 | size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec); |
| 1789 | size += mapUint64Uint64_.CalculateSize(_map_mapUint64Uint64_codec); |
| 1790 | size += mapSint32Sint32_.CalculateSize(_map_mapSint32Sint32_codec); |
| 1791 | size += mapSint64Sint64_.CalculateSize(_map_mapSint64Sint64_codec); |
| 1792 | size += mapFixed32Fixed32_.CalculateSize(_map_mapFixed32Fixed32_codec); |
| 1793 | size += mapFixed64Fixed64_.CalculateSize(_map_mapFixed64Fixed64_codec); |
| 1794 | size += mapSfixed32Sfixed32_.CalculateSize(_map_mapSfixed32Sfixed32_codec); |
| 1795 | size += mapSfixed64Sfixed64_.CalculateSize(_map_mapSfixed64Sfixed64_codec); |
| 1796 | size += mapInt32Float_.CalculateSize(_map_mapInt32Float_codec); |
| 1797 | size += mapInt32Double_.CalculateSize(_map_mapInt32Double_codec); |
| 1798 | size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec); |
| 1799 | size += mapStringString_.CalculateSize(_map_mapStringString_codec); |
| 1800 | size += mapStringBytes_.CalculateSize(_map_mapStringBytes_codec); |
| 1801 | size += mapStringNestedMessage_.CalculateSize(_map_mapStringNestedMessage_codec); |
| 1802 | size += mapStringForeignMessage_.CalculateSize(_map_mapStringForeignMessage_codec); |
| 1803 | size += mapStringNestedEnum_.CalculateSize(_map_mapStringNestedEnum_codec); |
| 1804 | size += mapStringForeignEnum_.CalculateSize(_map_mapStringForeignEnum_codec); |
| 1805 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) { |
| 1806 | size += 2 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32); |
| 1807 | } |
| 1808 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) { |
| 1809 | size += 2 + pb::CodedOutputStream.ComputeMessageSize(OneofNestedMessage); |
| 1810 | } |
| 1811 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) { |
| 1812 | size += 2 + pb::CodedOutputStream.ComputeStringSize(OneofString); |
| 1813 | } |
| 1814 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) { |
| 1815 | size += 2 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes); |
| 1816 | } |
| 1817 | return size; |
| 1818 | } |
| 1819 | |
| 1820 | public void MergeFrom(TestAllTypes other) { |
| 1821 | if (other == null) { |
| 1822 | return; |
| 1823 | } |
| 1824 | if (other.OptionalInt32 != 0) { |
| 1825 | OptionalInt32 = other.OptionalInt32; |
| 1826 | } |
| 1827 | if (other.OptionalInt64 != 0L) { |
| 1828 | OptionalInt64 = other.OptionalInt64; |
| 1829 | } |
| 1830 | if (other.OptionalUint32 != 0) { |
| 1831 | OptionalUint32 = other.OptionalUint32; |
| 1832 | } |
| 1833 | if (other.OptionalUint64 != 0UL) { |
| 1834 | OptionalUint64 = other.OptionalUint64; |
| 1835 | } |
| 1836 | if (other.OptionalSint32 != 0) { |
| 1837 | OptionalSint32 = other.OptionalSint32; |
| 1838 | } |
| 1839 | if (other.OptionalSint64 != 0L) { |
| 1840 | OptionalSint64 = other.OptionalSint64; |
| 1841 | } |
| 1842 | if (other.OptionalFixed32 != 0) { |
| 1843 | OptionalFixed32 = other.OptionalFixed32; |
| 1844 | } |
| 1845 | if (other.OptionalFixed64 != 0UL) { |
| 1846 | OptionalFixed64 = other.OptionalFixed64; |
| 1847 | } |
| 1848 | if (other.OptionalSfixed32 != 0) { |
| 1849 | OptionalSfixed32 = other.OptionalSfixed32; |
| 1850 | } |
| 1851 | if (other.OptionalSfixed64 != 0L) { |
| 1852 | OptionalSfixed64 = other.OptionalSfixed64; |
| 1853 | } |
| 1854 | if (other.OptionalFloat != 0F) { |
| 1855 | OptionalFloat = other.OptionalFloat; |
| 1856 | } |
| 1857 | if (other.OptionalDouble != 0D) { |
| 1858 | OptionalDouble = other.OptionalDouble; |
| 1859 | } |
| 1860 | if (other.OptionalBool != false) { |
| 1861 | OptionalBool = other.OptionalBool; |
| 1862 | } |
| 1863 | if (other.OptionalString.Length != 0) { |
| 1864 | OptionalString = other.OptionalString; |
| 1865 | } |
| 1866 | if (other.OptionalBytes.Length != 0) { |
| 1867 | OptionalBytes = other.OptionalBytes; |
| 1868 | } |
| 1869 | if (other.optionalNestedMessage_ != null) { |
| 1870 | if (optionalNestedMessage_ == null) { |
| 1871 | optionalNestedMessage_ = new global::Conformance.TestAllTypes.Types.NestedMessage(); |
| 1872 | } |
| 1873 | OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage); |
| 1874 | } |
| 1875 | if (other.optionalForeignMessage_ != null) { |
| 1876 | if (optionalForeignMessage_ == null) { |
| 1877 | optionalForeignMessage_ = new global::Conformance.ForeignMessage(); |
| 1878 | } |
| 1879 | OptionalForeignMessage.MergeFrom(other.OptionalForeignMessage); |
| 1880 | } |
| 1881 | if (other.OptionalNestedEnum != global::Conformance.TestAllTypes.Types.NestedEnum.FOO) { |
| 1882 | OptionalNestedEnum = other.OptionalNestedEnum; |
| 1883 | } |
| 1884 | if (other.OptionalForeignEnum != global::Conformance.ForeignEnum.FOREIGN_FOO) { |
| 1885 | OptionalForeignEnum = other.OptionalForeignEnum; |
| 1886 | } |
| 1887 | if (other.OptionalStringPiece.Length != 0) { |
| 1888 | OptionalStringPiece = other.OptionalStringPiece; |
| 1889 | } |
| 1890 | if (other.OptionalCord.Length != 0) { |
| 1891 | OptionalCord = other.OptionalCord; |
| 1892 | } |
| 1893 | if (other.recursiveMessage_ != null) { |
| 1894 | if (recursiveMessage_ == null) { |
| 1895 | recursiveMessage_ = new global::Conformance.TestAllTypes(); |
| 1896 | } |
| 1897 | RecursiveMessage.MergeFrom(other.RecursiveMessage); |
| 1898 | } |
| 1899 | repeatedInt32_.Add(other.repeatedInt32_); |
| 1900 | repeatedInt64_.Add(other.repeatedInt64_); |
| 1901 | repeatedUint32_.Add(other.repeatedUint32_); |
| 1902 | repeatedUint64_.Add(other.repeatedUint64_); |
| 1903 | repeatedSint32_.Add(other.repeatedSint32_); |
| 1904 | repeatedSint64_.Add(other.repeatedSint64_); |
| 1905 | repeatedFixed32_.Add(other.repeatedFixed32_); |
| 1906 | repeatedFixed64_.Add(other.repeatedFixed64_); |
| 1907 | repeatedSfixed32_.Add(other.repeatedSfixed32_); |
| 1908 | repeatedSfixed64_.Add(other.repeatedSfixed64_); |
| 1909 | repeatedFloat_.Add(other.repeatedFloat_); |
| 1910 | repeatedDouble_.Add(other.repeatedDouble_); |
| 1911 | repeatedBool_.Add(other.repeatedBool_); |
| 1912 | repeatedString_.Add(other.repeatedString_); |
| 1913 | repeatedBytes_.Add(other.repeatedBytes_); |
| 1914 | repeatedNestedMessage_.Add(other.repeatedNestedMessage_); |
| 1915 | repeatedForeignMessage_.Add(other.repeatedForeignMessage_); |
| 1916 | repeatedNestedEnum_.Add(other.repeatedNestedEnum_); |
| 1917 | repeatedForeignEnum_.Add(other.repeatedForeignEnum_); |
| 1918 | repeatedStringPiece_.Add(other.repeatedStringPiece_); |
| 1919 | repeatedCord_.Add(other.repeatedCord_); |
| 1920 | mapInt32Int32_.Add(other.mapInt32Int32_); |
| 1921 | mapInt64Int64_.Add(other.mapInt64Int64_); |
| 1922 | mapUint32Uint32_.Add(other.mapUint32Uint32_); |
| 1923 | mapUint64Uint64_.Add(other.mapUint64Uint64_); |
| 1924 | mapSint32Sint32_.Add(other.mapSint32Sint32_); |
| 1925 | mapSint64Sint64_.Add(other.mapSint64Sint64_); |
| 1926 | mapFixed32Fixed32_.Add(other.mapFixed32Fixed32_); |
| 1927 | mapFixed64Fixed64_.Add(other.mapFixed64Fixed64_); |
| 1928 | mapSfixed32Sfixed32_.Add(other.mapSfixed32Sfixed32_); |
| 1929 | mapSfixed64Sfixed64_.Add(other.mapSfixed64Sfixed64_); |
| 1930 | mapInt32Float_.Add(other.mapInt32Float_); |
| 1931 | mapInt32Double_.Add(other.mapInt32Double_); |
| 1932 | mapBoolBool_.Add(other.mapBoolBool_); |
| 1933 | mapStringString_.Add(other.mapStringString_); |
| 1934 | mapStringBytes_.Add(other.mapStringBytes_); |
| 1935 | mapStringNestedMessage_.Add(other.mapStringNestedMessage_); |
| 1936 | mapStringForeignMessage_.Add(other.mapStringForeignMessage_); |
| 1937 | mapStringNestedEnum_.Add(other.mapStringNestedEnum_); |
| 1938 | mapStringForeignEnum_.Add(other.mapStringForeignEnum_); |
| 1939 | switch (other.OneofFieldCase) { |
| 1940 | case OneofFieldOneofCase.OneofUint32: |
| 1941 | OneofUint32 = other.OneofUint32; |
| 1942 | break; |
| 1943 | case OneofFieldOneofCase.OneofNestedMessage: |
| 1944 | OneofNestedMessage = other.OneofNestedMessage; |
| 1945 | break; |
| 1946 | case OneofFieldOneofCase.OneofString: |
| 1947 | OneofString = other.OneofString; |
| 1948 | break; |
| 1949 | case OneofFieldOneofCase.OneofBytes: |
| 1950 | OneofBytes = other.OneofBytes; |
| 1951 | break; |
| 1952 | } |
| 1953 | |
| 1954 | } |
| 1955 | |
| 1956 | public void MergeFrom(pb::CodedInputStream input) { |
| 1957 | uint tag; |
Jon Skeet | 1a57ad8 | 2015-08-05 11:23:52 +0100 | [diff] [blame] | 1958 | while ((tag = input.ReadTag()) != 0) { |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1959 | switch(tag) { |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1960 | default: |
Jon Skeet | 5bdc572 | 2015-08-06 11:40:43 +0100 | [diff] [blame] | 1961 | input.SkipLastField(); |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 1962 | break; |
| 1963 | case 8: { |
| 1964 | OptionalInt32 = input.ReadInt32(); |
| 1965 | break; |
| 1966 | } |
| 1967 | case 16: { |
| 1968 | OptionalInt64 = input.ReadInt64(); |
| 1969 | break; |
| 1970 | } |
| 1971 | case 24: { |
| 1972 | OptionalUint32 = input.ReadUInt32(); |
| 1973 | break; |
| 1974 | } |
| 1975 | case 32: { |
| 1976 | OptionalUint64 = input.ReadUInt64(); |
| 1977 | break; |
| 1978 | } |
| 1979 | case 40: { |
| 1980 | OptionalSint32 = input.ReadSInt32(); |
| 1981 | break; |
| 1982 | } |
| 1983 | case 48: { |
| 1984 | OptionalSint64 = input.ReadSInt64(); |
| 1985 | break; |
| 1986 | } |
| 1987 | case 61: { |
| 1988 | OptionalFixed32 = input.ReadFixed32(); |
| 1989 | break; |
| 1990 | } |
| 1991 | case 65: { |
| 1992 | OptionalFixed64 = input.ReadFixed64(); |
| 1993 | break; |
| 1994 | } |
| 1995 | case 77: { |
| 1996 | OptionalSfixed32 = input.ReadSFixed32(); |
| 1997 | break; |
| 1998 | } |
| 1999 | case 81: { |
| 2000 | OptionalSfixed64 = input.ReadSFixed64(); |
| 2001 | break; |
| 2002 | } |
| 2003 | case 93: { |
| 2004 | OptionalFloat = input.ReadFloat(); |
| 2005 | break; |
| 2006 | } |
| 2007 | case 97: { |
| 2008 | OptionalDouble = input.ReadDouble(); |
| 2009 | break; |
| 2010 | } |
| 2011 | case 104: { |
| 2012 | OptionalBool = input.ReadBool(); |
| 2013 | break; |
| 2014 | } |
| 2015 | case 114: { |
| 2016 | OptionalString = input.ReadString(); |
| 2017 | break; |
| 2018 | } |
| 2019 | case 122: { |
| 2020 | OptionalBytes = input.ReadBytes(); |
| 2021 | break; |
| 2022 | } |
| 2023 | case 146: { |
| 2024 | if (optionalNestedMessage_ == null) { |
| 2025 | optionalNestedMessage_ = new global::Conformance.TestAllTypes.Types.NestedMessage(); |
| 2026 | } |
| 2027 | input.ReadMessage(optionalNestedMessage_); |
| 2028 | break; |
| 2029 | } |
| 2030 | case 154: { |
| 2031 | if (optionalForeignMessage_ == null) { |
| 2032 | optionalForeignMessage_ = new global::Conformance.ForeignMessage(); |
| 2033 | } |
| 2034 | input.ReadMessage(optionalForeignMessage_); |
| 2035 | break; |
| 2036 | } |
| 2037 | case 168: { |
| 2038 | optionalNestedEnum_ = (global::Conformance.TestAllTypes.Types.NestedEnum) input.ReadEnum(); |
| 2039 | break; |
| 2040 | } |
| 2041 | case 176: { |
| 2042 | optionalForeignEnum_ = (global::Conformance.ForeignEnum) input.ReadEnum(); |
| 2043 | break; |
| 2044 | } |
| 2045 | case 194: { |
| 2046 | OptionalStringPiece = input.ReadString(); |
| 2047 | break; |
| 2048 | } |
| 2049 | case 202: { |
| 2050 | OptionalCord = input.ReadString(); |
| 2051 | break; |
| 2052 | } |
| 2053 | case 218: { |
| 2054 | if (recursiveMessage_ == null) { |
| 2055 | recursiveMessage_ = new global::Conformance.TestAllTypes(); |
| 2056 | } |
| 2057 | input.ReadMessage(recursiveMessage_); |
| 2058 | break; |
| 2059 | } |
| 2060 | case 250: |
| 2061 | case 248: { |
| 2062 | repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec); |
| 2063 | break; |
| 2064 | } |
| 2065 | case 258: |
| 2066 | case 256: { |
| 2067 | repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec); |
| 2068 | break; |
| 2069 | } |
| 2070 | case 266: |
| 2071 | case 264: { |
| 2072 | repeatedUint32_.AddEntriesFrom(input, _repeated_repeatedUint32_codec); |
| 2073 | break; |
| 2074 | } |
| 2075 | case 274: |
| 2076 | case 272: { |
| 2077 | repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec); |
| 2078 | break; |
| 2079 | } |
| 2080 | case 282: |
| 2081 | case 280: { |
| 2082 | repeatedSint32_.AddEntriesFrom(input, _repeated_repeatedSint32_codec); |
| 2083 | break; |
| 2084 | } |
| 2085 | case 290: |
| 2086 | case 288: { |
| 2087 | repeatedSint64_.AddEntriesFrom(input, _repeated_repeatedSint64_codec); |
| 2088 | break; |
| 2089 | } |
| 2090 | case 298: |
| 2091 | case 301: { |
| 2092 | repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec); |
| 2093 | break; |
| 2094 | } |
| 2095 | case 306: |
| 2096 | case 305: { |
| 2097 | repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec); |
| 2098 | break; |
| 2099 | } |
| 2100 | case 314: |
| 2101 | case 317: { |
| 2102 | repeatedSfixed32_.AddEntriesFrom(input, _repeated_repeatedSfixed32_codec); |
| 2103 | break; |
| 2104 | } |
| 2105 | case 322: |
| 2106 | case 321: { |
| 2107 | repeatedSfixed64_.AddEntriesFrom(input, _repeated_repeatedSfixed64_codec); |
| 2108 | break; |
| 2109 | } |
| 2110 | case 330: |
| 2111 | case 333: { |
| 2112 | repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec); |
| 2113 | break; |
| 2114 | } |
| 2115 | case 338: |
| 2116 | case 337: { |
| 2117 | repeatedDouble_.AddEntriesFrom(input, _repeated_repeatedDouble_codec); |
| 2118 | break; |
| 2119 | } |
| 2120 | case 346: |
| 2121 | case 344: { |
| 2122 | repeatedBool_.AddEntriesFrom(input, _repeated_repeatedBool_codec); |
| 2123 | break; |
| 2124 | } |
| 2125 | case 354: { |
| 2126 | repeatedString_.AddEntriesFrom(input, _repeated_repeatedString_codec); |
| 2127 | break; |
| 2128 | } |
| 2129 | case 362: { |
| 2130 | repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec); |
| 2131 | break; |
| 2132 | } |
| 2133 | case 386: { |
| 2134 | repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNestedMessage_codec); |
| 2135 | break; |
| 2136 | } |
| 2137 | case 394: { |
| 2138 | repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_codec); |
| 2139 | break; |
| 2140 | } |
| 2141 | case 410: |
| 2142 | case 408: { |
| 2143 | repeatedNestedEnum_.AddEntriesFrom(input, _repeated_repeatedNestedEnum_codec); |
| 2144 | break; |
| 2145 | } |
| 2146 | case 418: |
| 2147 | case 416: { |
| 2148 | repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeignEnum_codec); |
| 2149 | break; |
| 2150 | } |
| 2151 | case 434: { |
| 2152 | repeatedStringPiece_.AddEntriesFrom(input, _repeated_repeatedStringPiece_codec); |
| 2153 | break; |
| 2154 | } |
| 2155 | case 442: { |
| 2156 | repeatedCord_.AddEntriesFrom(input, _repeated_repeatedCord_codec); |
| 2157 | break; |
| 2158 | } |
| 2159 | case 450: { |
| 2160 | mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec); |
| 2161 | break; |
| 2162 | } |
| 2163 | case 458: { |
| 2164 | mapInt64Int64_.AddEntriesFrom(input, _map_mapInt64Int64_codec); |
| 2165 | break; |
| 2166 | } |
| 2167 | case 466: { |
| 2168 | mapUint32Uint32_.AddEntriesFrom(input, _map_mapUint32Uint32_codec); |
| 2169 | break; |
| 2170 | } |
| 2171 | case 474: { |
| 2172 | mapUint64Uint64_.AddEntriesFrom(input, _map_mapUint64Uint64_codec); |
| 2173 | break; |
| 2174 | } |
| 2175 | case 482: { |
| 2176 | mapSint32Sint32_.AddEntriesFrom(input, _map_mapSint32Sint32_codec); |
| 2177 | break; |
| 2178 | } |
| 2179 | case 490: { |
| 2180 | mapSint64Sint64_.AddEntriesFrom(input, _map_mapSint64Sint64_codec); |
| 2181 | break; |
| 2182 | } |
| 2183 | case 498: { |
| 2184 | mapFixed32Fixed32_.AddEntriesFrom(input, _map_mapFixed32Fixed32_codec); |
| 2185 | break; |
| 2186 | } |
| 2187 | case 506: { |
| 2188 | mapFixed64Fixed64_.AddEntriesFrom(input, _map_mapFixed64Fixed64_codec); |
| 2189 | break; |
| 2190 | } |
| 2191 | case 514: { |
| 2192 | mapSfixed32Sfixed32_.AddEntriesFrom(input, _map_mapSfixed32Sfixed32_codec); |
| 2193 | break; |
| 2194 | } |
| 2195 | case 522: { |
| 2196 | mapSfixed64Sfixed64_.AddEntriesFrom(input, _map_mapSfixed64Sfixed64_codec); |
| 2197 | break; |
| 2198 | } |
| 2199 | case 530: { |
| 2200 | mapInt32Float_.AddEntriesFrom(input, _map_mapInt32Float_codec); |
| 2201 | break; |
| 2202 | } |
| 2203 | case 538: { |
| 2204 | mapInt32Double_.AddEntriesFrom(input, _map_mapInt32Double_codec); |
| 2205 | break; |
| 2206 | } |
| 2207 | case 546: { |
| 2208 | mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec); |
| 2209 | break; |
| 2210 | } |
| 2211 | case 554: { |
| 2212 | mapStringString_.AddEntriesFrom(input, _map_mapStringString_codec); |
| 2213 | break; |
| 2214 | } |
| 2215 | case 562: { |
| 2216 | mapStringBytes_.AddEntriesFrom(input, _map_mapStringBytes_codec); |
| 2217 | break; |
| 2218 | } |
| 2219 | case 570: { |
| 2220 | mapStringNestedMessage_.AddEntriesFrom(input, _map_mapStringNestedMessage_codec); |
| 2221 | break; |
| 2222 | } |
| 2223 | case 578: { |
| 2224 | mapStringForeignMessage_.AddEntriesFrom(input, _map_mapStringForeignMessage_codec); |
| 2225 | break; |
| 2226 | } |
| 2227 | case 586: { |
| 2228 | mapStringNestedEnum_.AddEntriesFrom(input, _map_mapStringNestedEnum_codec); |
| 2229 | break; |
| 2230 | } |
| 2231 | case 594: { |
| 2232 | mapStringForeignEnum_.AddEntriesFrom(input, _map_mapStringForeignEnum_codec); |
| 2233 | break; |
| 2234 | } |
| 2235 | case 888: { |
| 2236 | OneofUint32 = input.ReadUInt32(); |
| 2237 | break; |
| 2238 | } |
| 2239 | case 898: { |
| 2240 | global::Conformance.TestAllTypes.Types.NestedMessage subBuilder = new global::Conformance.TestAllTypes.Types.NestedMessage(); |
| 2241 | if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) { |
| 2242 | subBuilder.MergeFrom(OneofNestedMessage); |
| 2243 | } |
| 2244 | input.ReadMessage(subBuilder); |
| 2245 | OneofNestedMessage = subBuilder; |
| 2246 | break; |
| 2247 | } |
| 2248 | case 906: { |
| 2249 | OneofString = input.ReadString(); |
| 2250 | break; |
| 2251 | } |
| 2252 | case 914: { |
| 2253 | OneofBytes = input.ReadBytes(); |
| 2254 | break; |
| 2255 | } |
| 2256 | } |
| 2257 | } |
| 2258 | } |
| 2259 | |
| 2260 | #region Nested types |
Jon Skeet | b0888a4 | 2015-09-29 13:37:30 +0100 | [diff] [blame] | 2261 | /// <summary>Container for nested types declared in the TestAllTypes message type.</summary> |
Jon Skeet | e2c8230 | 2015-09-29 14:34:31 +0100 | [diff] [blame] | 2262 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 2263 | public static partial class Types { |
| 2264 | public enum NestedEnum { |
| 2265 | FOO = 0, |
| 2266 | BAR = 1, |
| 2267 | BAZ = 2, |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 2268 | /// <summary> |
| 2269 | /// Intentionally negative. |
| 2270 | /// </summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 2271 | NEG = -1, |
| 2272 | } |
| 2273 | |
| 2274 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2275 | public sealed partial class NestedMessage : pb::IMessage<NestedMessage> { |
| 2276 | private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage()); |
| 2277 | public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } } |
| 2278 | |
| 2279 | public static pbr::MessageDescriptor Descriptor { |
| 2280 | get { return global::Conformance.TestAllTypes.Descriptor.NestedTypes[0]; } |
| 2281 | } |
| 2282 | |
| 2283 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2284 | get { return Descriptor; } |
| 2285 | } |
| 2286 | |
| 2287 | public NestedMessage() { |
| 2288 | OnConstruction(); |
| 2289 | } |
| 2290 | |
| 2291 | partial void OnConstruction(); |
| 2292 | |
| 2293 | public NestedMessage(NestedMessage other) : this() { |
| 2294 | a_ = other.a_; |
| 2295 | Corecursive = other.corecursive_ != null ? other.Corecursive.Clone() : null; |
| 2296 | } |
| 2297 | |
| 2298 | public NestedMessage Clone() { |
| 2299 | return new NestedMessage(this); |
| 2300 | } |
| 2301 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 2302 | /// <summary>Field number for the "a" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 2303 | public const int AFieldNumber = 1; |
| 2304 | private int a_; |
| 2305 | public int A { |
| 2306 | get { return a_; } |
| 2307 | set { |
| 2308 | a_ = value; |
| 2309 | } |
| 2310 | } |
| 2311 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 2312 | /// <summary>Field number for the "corecursive" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 2313 | public const int CorecursiveFieldNumber = 2; |
| 2314 | private global::Conformance.TestAllTypes corecursive_; |
| 2315 | public global::Conformance.TestAllTypes Corecursive { |
| 2316 | get { return corecursive_; } |
| 2317 | set { |
| 2318 | corecursive_ = value; |
| 2319 | } |
| 2320 | } |
| 2321 | |
| 2322 | public override bool Equals(object other) { |
| 2323 | return Equals(other as NestedMessage); |
| 2324 | } |
| 2325 | |
| 2326 | public bool Equals(NestedMessage other) { |
| 2327 | if (ReferenceEquals(other, null)) { |
| 2328 | return false; |
| 2329 | } |
| 2330 | if (ReferenceEquals(other, this)) { |
| 2331 | return true; |
| 2332 | } |
| 2333 | if (A != other.A) return false; |
| 2334 | if (!object.Equals(Corecursive, other.Corecursive)) return false; |
| 2335 | return true; |
| 2336 | } |
| 2337 | |
| 2338 | public override int GetHashCode() { |
| 2339 | int hash = 1; |
| 2340 | if (A != 0) hash ^= A.GetHashCode(); |
| 2341 | if (corecursive_ != null) hash ^= Corecursive.GetHashCode(); |
| 2342 | return hash; |
| 2343 | } |
| 2344 | |
| 2345 | public override string ToString() { |
| 2346 | return pb::JsonFormatter.Default.Format(this); |
| 2347 | } |
| 2348 | |
| 2349 | public void WriteTo(pb::CodedOutputStream output) { |
| 2350 | if (A != 0) { |
| 2351 | output.WriteRawTag(8); |
| 2352 | output.WriteInt32(A); |
| 2353 | } |
| 2354 | if (corecursive_ != null) { |
| 2355 | output.WriteRawTag(18); |
| 2356 | output.WriteMessage(Corecursive); |
| 2357 | } |
| 2358 | } |
| 2359 | |
| 2360 | public int CalculateSize() { |
| 2361 | int size = 0; |
| 2362 | if (A != 0) { |
| 2363 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(A); |
| 2364 | } |
| 2365 | if (corecursive_ != null) { |
| 2366 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Corecursive); |
| 2367 | } |
| 2368 | return size; |
| 2369 | } |
| 2370 | |
| 2371 | public void MergeFrom(NestedMessage other) { |
| 2372 | if (other == null) { |
| 2373 | return; |
| 2374 | } |
| 2375 | if (other.A != 0) { |
| 2376 | A = other.A; |
| 2377 | } |
| 2378 | if (other.corecursive_ != null) { |
| 2379 | if (corecursive_ == null) { |
| 2380 | corecursive_ = new global::Conformance.TestAllTypes(); |
| 2381 | } |
| 2382 | Corecursive.MergeFrom(other.Corecursive); |
| 2383 | } |
| 2384 | } |
| 2385 | |
| 2386 | public void MergeFrom(pb::CodedInputStream input) { |
| 2387 | uint tag; |
Jon Skeet | 1a57ad8 | 2015-08-05 11:23:52 +0100 | [diff] [blame] | 2388 | while ((tag = input.ReadTag()) != 0) { |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 2389 | switch(tag) { |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 2390 | default: |
Jon Skeet | 5bdc572 | 2015-08-06 11:40:43 +0100 | [diff] [blame] | 2391 | input.SkipLastField(); |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 2392 | break; |
| 2393 | case 8: { |
| 2394 | A = input.ReadInt32(); |
| 2395 | break; |
| 2396 | } |
| 2397 | case 18: { |
| 2398 | if (corecursive_ == null) { |
| 2399 | corecursive_ = new global::Conformance.TestAllTypes(); |
| 2400 | } |
| 2401 | input.ReadMessage(corecursive_); |
| 2402 | break; |
| 2403 | } |
| 2404 | } |
| 2405 | } |
| 2406 | } |
| 2407 | |
| 2408 | } |
| 2409 | |
| 2410 | } |
| 2411 | #endregion |
| 2412 | |
| 2413 | } |
| 2414 | |
| 2415 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2416 | public sealed partial class ForeignMessage : pb::IMessage<ForeignMessage> { |
| 2417 | private static readonly pb::MessageParser<ForeignMessage> _parser = new pb::MessageParser<ForeignMessage>(() => new ForeignMessage()); |
| 2418 | public static pb::MessageParser<ForeignMessage> Parser { get { return _parser; } } |
| 2419 | |
| 2420 | public static pbr::MessageDescriptor Descriptor { |
| 2421 | get { return global::Conformance.Conformance.Descriptor.MessageTypes[3]; } |
| 2422 | } |
| 2423 | |
| 2424 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2425 | get { return Descriptor; } |
| 2426 | } |
| 2427 | |
| 2428 | public ForeignMessage() { |
| 2429 | OnConstruction(); |
| 2430 | } |
| 2431 | |
| 2432 | partial void OnConstruction(); |
| 2433 | |
| 2434 | public ForeignMessage(ForeignMessage other) : this() { |
| 2435 | c_ = other.c_; |
| 2436 | } |
| 2437 | |
| 2438 | public ForeignMessage Clone() { |
| 2439 | return new ForeignMessage(this); |
| 2440 | } |
| 2441 | |
Jon Skeet | 18e0a2e | 2015-10-01 10:38:01 +0100 | [diff] [blame] | 2442 | /// <summary>Field number for the "c" field.</summary> |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 2443 | public const int CFieldNumber = 1; |
| 2444 | private int c_; |
| 2445 | public int C { |
| 2446 | get { return c_; } |
| 2447 | set { |
| 2448 | c_ = value; |
| 2449 | } |
| 2450 | } |
| 2451 | |
| 2452 | public override bool Equals(object other) { |
| 2453 | return Equals(other as ForeignMessage); |
| 2454 | } |
| 2455 | |
| 2456 | public bool Equals(ForeignMessage other) { |
| 2457 | if (ReferenceEquals(other, null)) { |
| 2458 | return false; |
| 2459 | } |
| 2460 | if (ReferenceEquals(other, this)) { |
| 2461 | return true; |
| 2462 | } |
| 2463 | if (C != other.C) return false; |
| 2464 | return true; |
| 2465 | } |
| 2466 | |
| 2467 | public override int GetHashCode() { |
| 2468 | int hash = 1; |
| 2469 | if (C != 0) hash ^= C.GetHashCode(); |
| 2470 | return hash; |
| 2471 | } |
| 2472 | |
| 2473 | public override string ToString() { |
| 2474 | return pb::JsonFormatter.Default.Format(this); |
| 2475 | } |
| 2476 | |
| 2477 | public void WriteTo(pb::CodedOutputStream output) { |
| 2478 | if (C != 0) { |
| 2479 | output.WriteRawTag(8); |
| 2480 | output.WriteInt32(C); |
| 2481 | } |
| 2482 | } |
| 2483 | |
| 2484 | public int CalculateSize() { |
| 2485 | int size = 0; |
| 2486 | if (C != 0) { |
| 2487 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(C); |
| 2488 | } |
| 2489 | return size; |
| 2490 | } |
| 2491 | |
| 2492 | public void MergeFrom(ForeignMessage other) { |
| 2493 | if (other == null) { |
| 2494 | return; |
| 2495 | } |
| 2496 | if (other.C != 0) { |
| 2497 | C = other.C; |
| 2498 | } |
| 2499 | } |
| 2500 | |
| 2501 | public void MergeFrom(pb::CodedInputStream input) { |
| 2502 | uint tag; |
Jon Skeet | 1a57ad8 | 2015-08-05 11:23:52 +0100 | [diff] [blame] | 2503 | while ((tag = input.ReadTag()) != 0) { |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 2504 | switch(tag) { |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 2505 | default: |
Jon Skeet | 5bdc572 | 2015-08-06 11:40:43 +0100 | [diff] [blame] | 2506 | input.SkipLastField(); |
Jon Skeet | 044c36e | 2015-08-04 09:25:38 +0100 | [diff] [blame] | 2507 | break; |
| 2508 | case 8: { |
| 2509 | C = input.ReadInt32(); |
| 2510 | break; |
| 2511 | } |
| 2512 | } |
| 2513 | } |
| 2514 | } |
| 2515 | |
| 2516 | } |
| 2517 | |
| 2518 | #endregion |
| 2519 | |
| 2520 | } |
| 2521 | |
| 2522 | #endregion Designer generated code |